diff --git a/.castiron.stats.yml b/.castiron.stats.yml index 7fe3b55a3..98f91c439 100644 --- a/.castiron.stats.yml +++ b/.castiron.stats.yml @@ -1,8 +1,8 @@ schema_version: 1 -generation_id: d231f6bf-7ba6-4566-a3b5-1594927f874c -openapi_spec_hash: 0ac5ea4ab2546a188a36a0d370367637 -openapi_transformed_spec_hash: 6be6c39576ec27111cab26c251d2ab65 -config_hash: d92ec885ac2a08b6a4c1ff90420f0327 -codegen_sha: 6b5c1351630844386f6789b2ad525184ae291fcd -codegen_hash: 3590be3fb9d4224b65931fe65334f9aa18348e99332770511100daae78422f50 -public_codegen_sha: 6e84784e4881104d2d9258eee1cd00f2faabda90 +generation_id: 9f7d0c3b-eceb-46c9-af22-f6ea83f34eee +openapi_spec_hash: 0cb51423f74235e850a5f1961f31c167 +openapi_transformed_spec_hash: 70d190d2b54dd216f7280d9fd94363f0 +config_hash: d7b82262337a543ff59106e4a32ead4e +codegen_sha: 849c2727ef14fa3b6999709c51898c1a95a8e585 +codegen_hash: 80ecd85fdd98cca059c6706d619f6a074c7c8a7e14ec9eeab83a6c8bf6cb58ea +public_codegen_sha: b0316f5f64b09f8e007e35d6c26828390bc201be diff --git a/api_reference/openapi.transformed.yml b/api_reference/openapi.transformed.yml index 1cc46fbb4..2e688d6e6 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,7 @@ 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). nullable: false x-oaiTypeLabel: string anyOf: @@ -34069,7 +34113,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 +34137,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 +34160,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 +34169,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 +34181,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 +34261,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 +34281,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 +34347,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 +34419,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 +34430,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 +34497,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 +34513,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 +34524,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 +34539,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 +34652,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 +34688,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 +34937,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 +35000,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 +35031,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 +35053,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 +35066,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 +35737,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 +35799,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 +37276,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 +37292,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 +37782,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 +37803,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 +38039,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 @@ -39475,6 +39524,26 @@ components: - auto - type: 'null' description: The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. + action: + anyOf: + - $ref: '#/components/schemas/ImageGenActionEnum' + - type: 'null' + description: The action used for image generation. + background: + anyOf: + - $ref: '#/components/schemas/ImageBackground' + - type: 'null' + description: The background setting used for generation. + output_format: + anyOf: + - $ref: '#/components/schemas/ImageOutputFormat' + - type: 'null' + description: The output format used for generation. + revised_prompt: + anyOf: + - type: string + - type: 'null' + description: The prompt that was used after any model prompt rewriting. required: - type - id @@ -39730,11 +39799,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 +40798,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 +40830,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 +41008,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 +41020,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 +41180,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 +41195,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 +41407,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 +41423,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 +41474,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 +41581,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 +41596,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 +41611,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 +41626,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 +41641,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 +41710,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 +41791,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 +41799,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 +41818,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 +41834,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 +41881,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 +41892,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 +41959,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 +41970,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 +42472,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 +42520,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 +42602,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 +42653,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 +42770,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 +43256,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: @@ -43198,7 +43280,15 @@ components: anyOf: - type: boolean description: Create the service account without default roles or an API key. + example: false + - 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 +43607,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 +43984,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 +46309,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 +46571,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 +47155,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 +48711,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 +48742,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 +48773,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 +50108,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 +50508,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 +51160,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 +52218,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 +52292,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 +52301,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 +52509,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 +53504,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 +53539,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 +53572,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 +53591,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 +54365,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 +54558,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 +54572,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 +55776,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 +55798,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 +57001,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 +57113,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 +57129,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 +57217,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 +57465,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 +57543,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 +57641,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 +57781,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 +57831,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 +57969,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 +57984,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 +57999,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 +58014,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 +58029,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 +58044,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 +58059,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 +58078,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 +58093,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 +58108,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 +58123,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 +58138,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 +58153,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 +58168,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 +58183,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 +58198,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 +58213,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 +58224,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 +58255,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 +58276,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 +58480,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 +58505,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 +58534,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 +58543,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 +58570,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 +58581,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 +58621,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 +58806,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 +58841,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 +58872,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 +58907,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 +58929,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 +58973,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 +59335,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 +60449,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 +60565,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 +61228,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 +61279,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 +61872,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 +61916,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 +61962,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 +62008,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 +62412,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 +62944,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: @@ -63048,6 +63163,24 @@ components: - completed - failed - incomplete + ImageGenActionEnum: + type: string + enum: + - generate + - edit + - auto + ImageBackground: + type: string + enum: + - transparent + - opaque + - auto + ImageOutputFormat: + type: string + enum: + - png + - webp + - jpeg ClickButtonType: type: string enum: @@ -63426,7 +63559,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 +63624,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 +63638,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 +63672,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: @@ -63577,12 +63710,6 @@ components: - high - low description: 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`. - ImageGenActionEnum: - type: string - enum: - - generate - - edit - - auto LocalShellToolParam: properties: type: @@ -63802,7 +63929,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 +64116,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 +64289,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 +64909,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 +65254,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 +65893,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 +67090,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 +67108,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 +67125,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 +67208,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 +67238,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 +68692,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 +68710,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 +68727,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 +68880,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 +69007,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 +69081,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 +69096,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 +69118,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 +69160,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 +69189,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 +69291,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 +69447,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 +70047,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 +70079,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 +70195,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 +70301,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 +70323,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 +70354,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 +70518,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 +70940,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: @@ -71806,11 +71946,43 @@ components: - auto - type: 'null' description: The quality of the image generated by the image generation tool call. One of `low`, `medium`, `high`, `xhigh`, `max`, or `auto`. + action: + anyOf: + - $ref: '#/components/schemas/BetaImageGenActionEnum' + - type: 'null' + description: The action used for image generation. + background: + anyOf: + - $ref: '#/components/schemas/BetaImageBackground' + - type: 'null' + description: The background setting used for generation. + output_format: + anyOf: + - $ref: '#/components/schemas/BetaImageOutputFormat' + - type: 'null' + description: The output format used for generation. + revised_prompt: + anyOf: + - type: string + - type: 'null' + description: The prompt that was used after any model prompt rewriting. required: - type - id - status - result + BetaImageOutputFormat: + type: string + enum: + - png + - webp + - jpeg + BetaImageBackground: + type: string + enum: + - transparent + - opaque + - auto BetaCompactionSummaryItemParam: properties: agent: @@ -71840,14 +72012,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 +72586,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 +72758,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 +72821,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 +73061,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 +73384,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 +73872,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 +73902,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 +73927,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 +73947,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 +74631,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 +75285,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 +75703,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 +76006,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 +76031,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 +76045,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 +76067,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 +76109,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 +76171,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 +76179,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 +76198,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 +79584,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 +80767,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 +80791,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 +80814,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 +80929,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 +81270,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 +81342,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 +81353,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 +81412,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 +81424,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 +81665,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 +81851,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 +82020,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 +82081,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 +82320,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 +82331,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/openai-java-core/src/main/kotlin/com/openai/models/FunctionDefinition.kt b/openai-java-core/src/main/kotlin/com/openai/models/FunctionDefinition.kt index a1a2e178e..04ccaeda1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/FunctionDefinition.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/FunctionDefinition.kt @@ -59,7 +59,7 @@ private constructor( /** * 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. * @@ -74,7 +74,7 @@ private constructor( * 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). + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -185,8 +185,8 @@ private constructor( /** * 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 + * [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. @@ -209,7 +209,7 @@ private constructor( * 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). */ fun strict(strict: Boolean?) = strict(JsonField.ofNullable(strict)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/FunctionParameters.kt b/openai-java-core/src/main/kotlin/com/openai/models/FunctionParameters.kt index c344d79b8..7bf35e3f1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/FunctionParameters.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/FunctionParameters.kt @@ -12,7 +12,7 @@ import java.util.Objects /** * 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. * diff --git a/openai-java-core/src/main/kotlin/com/openai/models/Reasoning.kt b/openai-java-core/src/main/kotlin/com/openai/models/Reasoning.kt index 167cc89c9..746f96fad 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/Reasoning.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/Reasoning.kt @@ -18,7 +18,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * Configuration options for [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * Configuration options for + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ class Reasoning @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -62,7 +63,7 @@ private constructor( * `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 model-specific + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific * support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -207,8 +208,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ fun effort(effort: ReasoningEffort?) = effort(JsonField.ofNullable(effort)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/ReasoningEffort.kt b/openai-java-core/src/main/kotlin/com/openai/models/ReasoningEffort.kt index d858e4de7..b8b8ebb69 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/ReasoningEffort.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/ReasoningEffort.kt @@ -11,8 +11,9 @@ import com.openai.errors.OpenAIInvalidDataException * 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 model-specific support. + * support every value. See the + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific + * support. */ class ReasoningEffort @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatJsonSchema.kt b/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatJsonSchema.kt index d54b16f74..2d87dd333 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatJsonSchema.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatJsonSchema.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ResponseFormatJsonSchema @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -266,7 +266,7 @@ private constructor( * 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://platform.openai.com/docs/guides/structured-outputs). + * [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -397,7 +397,7 @@ private constructor( * 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://platform.openai.com/docs/guides/structured-outputs). + * [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). */ fun strict(strict: Boolean?) = strict(JsonField.ofNullable(strict)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextGrammar.kt b/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextGrammar.kt index 2833d110c..5636b9d38 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextGrammar.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextGrammar.kt @@ -17,7 +17,7 @@ import java.util.Objects /** * 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). */ class ResponseFormatTextGrammar @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextPython.kt b/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextPython.kt index 1f06226f0..9b05d2ba9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextPython.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/ResponseFormatTextPython.kt @@ -15,8 +15,8 @@ import java.util.Objects /** * 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. */ class ResponseFormatTextPython @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/auditlogs/AuditLogListParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/auditlogs/AuditLogListParams.kt index 27cbdd803..6767565c2 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/auditlogs/AuditLogListParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/auditlogs/AuditLogListParams.kt @@ -60,7 +60,7 @@ private constructor( /** * 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). */ fun eventTypes(): Optional> = Optional.ofNullable(eventTypes) @@ -201,7 +201,7 @@ private constructor( /** * 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). */ fun eventTypes(eventTypes: List?) = apply { this.eventTypes = eventTypes?.toMutableList() diff --git a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/ProjectCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/ProjectCreateParams.kt index ac265aa91..3a9928a91 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/ProjectCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/ProjectCreateParams.kt @@ -50,7 +50,7 @@ private constructor( /** * 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`. * @@ -62,7 +62,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -179,7 +179,7 @@ private constructor( /** * 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`. */ @@ -203,7 +203,7 @@ private constructor( /** * 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. */ fun residency(residency: ProjectResidency?) = apply { body.residency(residency) } @@ -406,7 +406,7 @@ private constructor( /** * 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`. * @@ -419,7 +419,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -540,7 +540,7 @@ private constructor( /** * 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`. */ @@ -564,7 +564,7 @@ private constructor( /** * 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. */ fun residency(residency: ProjectResidency?) = residency(JsonField.ofNullable(residency)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKey.kt b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKey.kt index 26df36a68..917da0bda 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKey.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKey.kt @@ -30,6 +30,7 @@ private constructor( private val owner: JsonField, private val ownerProjectAccess: JsonField, private val redactedValue: JsonField, + private val expiresAt: JsonField, private val additionalProperties: MutableMap, ) { @@ -49,6 +50,7 @@ private constructor( @JsonProperty("redacted_value") @ExcludeMissing redactedValue: JsonField = JsonMissing.of(), + @JsonProperty("expires_at") @ExcludeMissing expiresAt: JsonField = JsonMissing.of(), ) : this( id, createdAt, @@ -58,6 +60,7 @@ private constructor( owner, ownerProjectAccess, redactedValue, + expiresAt, mutableMapOf(), ) @@ -129,6 +132,14 @@ private constructor( */ fun redactedValue(): String = redactedValue.getRequired("redacted_value") + /** + * The Unix timestamp (in seconds) when the API key expires, or null if it does not expire. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun expiresAt(): Optional = expiresAt.getOptional("expires_at") + /** * Returns the raw JSON value of [id]. * @@ -183,6 +194,13 @@ private constructor( @ExcludeMissing fun _redactedValue(): JsonField = redactedValue + /** + * Returns the raw JSON value of [expiresAt]. + * + * Unlike [expiresAt], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("expires_at") @ExcludeMissing fun _expiresAt(): JsonField = expiresAt + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -225,6 +243,7 @@ private constructor( private var owner: JsonField? = null private var ownerProjectAccess: JsonField? = null private var redactedValue: JsonField? = null + private var expiresAt: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -237,6 +256,7 @@ private constructor( owner = projectApiKey.owner ownerProjectAccess = projectApiKey.ownerProjectAccess redactedValue = projectApiKey.redactedValue + expiresAt = projectApiKey.expiresAt additionalProperties = projectApiKey.additionalProperties.toMutableMap() } @@ -347,6 +367,29 @@ private constructor( this.redactedValue = redactedValue } + /** + * The Unix timestamp (in seconds) when the API key expires, or null if it does not expire. + */ + fun expiresAt(expiresAt: Long?) = expiresAt(JsonField.ofNullable(expiresAt)) + + /** + * Alias for [Builder.expiresAt]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun expiresAt(expiresAt: Long) = expiresAt(expiresAt as Long?) + + /** Alias for calling [Builder.expiresAt] with `expiresAt.orElse(null)`. */ + fun expiresAt(expiresAt: Optional) = expiresAt(expiresAt.getOrNull()) + + /** + * Sets [Builder.expiresAt] to an arbitrary JSON value. + * + * You should usually call [Builder.expiresAt] with a well-typed [Long] value instead. This + * method is primarily for setting the field to an undocumented or not yet supported value. + */ + fun expiresAt(expiresAt: JsonField) = apply { this.expiresAt = expiresAt } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -394,6 +437,7 @@ private constructor( checkRequired("owner", owner), checkRequired("ownerProjectAccess", ownerProjectAccess), checkRequired("redactedValue", redactedValue), + expiresAt, additionalProperties.toMutableMap(), ) } @@ -425,6 +469,7 @@ private constructor( owner().validate() ownerProjectAccess().validate() redactedValue() + expiresAt() validated = true } @@ -450,7 +495,8 @@ private constructor( object_.let { if (it == JsonValue.from("organization.project.api_key")) 1 else 0 } + (owner.asKnown().getOrNull()?.validity() ?: 0) + (ownerProjectAccess.asKnown().getOrNull()?.validity() ?: 0) + - (if (redactedValue.asKnown().isPresent) 1 else 0) + (if (redactedValue.asKnown().isPresent) 1 else 0) + + (if (expiresAt.asKnown().isPresent) 1 else 0) class Owner @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -1608,6 +1654,7 @@ private constructor( owner == other.owner && ownerProjectAccess == other.ownerProjectAccess && redactedValue == other.redactedValue && + expiresAt == other.expiresAt && additionalProperties == other.additionalProperties } @@ -1621,6 +1668,7 @@ private constructor( owner, ownerProjectAccess, redactedValue, + expiresAt, additionalProperties, ) } @@ -1628,5 +1676,5 @@ private constructor( override fun hashCode(): Int = hashCode override fun toString() = - "ProjectApiKey{id=$id, createdAt=$createdAt, lastUsedAt=$lastUsedAt, name=$name, object_=$object_, owner=$owner, ownerProjectAccess=$ownerProjectAccess, redactedValue=$redactedValue, additionalProperties=$additionalProperties}" + "ProjectApiKey{id=$id, createdAt=$createdAt, lastUsedAt=$lastUsedAt, name=$name, object_=$object_, owner=$owner, ownerProjectAccess=$ownerProjectAccess, redactedValue=$redactedValue, expiresAt=$expiresAt, additionalProperties=$additionalProperties}" } diff --git a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParams.kt index 185971a43..795854cd4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParams.kt @@ -50,6 +50,17 @@ private constructor( */ fun createServiceAccountOnly(): Optional = body.createServiceAccountOnly() + /** + * 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. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun expiresInSeconds(): Optional = body.expiresInSeconds() + /** * Returns the raw JSON value of [name]. * @@ -65,6 +76,14 @@ private constructor( */ fun _createServiceAccountOnly(): JsonField = body._createServiceAccountOnly() + /** + * Returns the raw JSON value of [expiresInSeconds]. + * + * Unlike [expiresInSeconds], this method doesn't throw if the JSON field has an unexpected + * type. + */ + fun _expiresInSeconds(): JsonField = body._expiresInSeconds() + fun _additionalBodyProperties(): Map = body._additionalProperties() /** Additional headers to send with the request. */ @@ -116,6 +135,7 @@ private constructor( * Otherwise, it's more convenient to use the top-level setters instead: * - [name] * - [createServiceAccountOnly] + * - [expiresInSeconds] */ fun body(body: Body) = apply { this.body = body.toBuilder() } @@ -161,6 +181,38 @@ private constructor( body.createServiceAccountOnly(createServiceAccountOnly) } + /** + * 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. + */ + fun expiresInSeconds(expiresInSeconds: Long?) = apply { + body.expiresInSeconds(expiresInSeconds) + } + + /** + * Alias for [Builder.expiresInSeconds]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun expiresInSeconds(expiresInSeconds: Long) = expiresInSeconds(expiresInSeconds as Long?) + + /** Alias for calling [Builder.expiresInSeconds] with `expiresInSeconds.orElse(null)`. */ + fun expiresInSeconds(expiresInSeconds: Optional) = + expiresInSeconds(expiresInSeconds.getOrNull()) + + /** + * Sets [Builder.expiresInSeconds] to an arbitrary JSON value. + * + * You should usually call [Builder.expiresInSeconds] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun expiresInSeconds(expiresInSeconds: JsonField) = apply { + body.expiresInSeconds(expiresInSeconds) + } + fun additionalBodyProperties(additionalBodyProperties: Map) = apply { body.additionalProperties(additionalBodyProperties) } @@ -316,6 +368,7 @@ private constructor( private constructor( private val name: JsonField, private val createServiceAccountOnly: JsonField, + private val expiresInSeconds: JsonField, private val additionalProperties: MutableMap, ) { @@ -325,7 +378,10 @@ private constructor( @JsonProperty("create_service_account_only") @ExcludeMissing createServiceAccountOnly: JsonField = JsonMissing.of(), - ) : this(name, createServiceAccountOnly, mutableMapOf()) + @JsonProperty("expires_in_seconds") + @ExcludeMissing + expiresInSeconds: JsonField = JsonMissing.of(), + ) : this(name, createServiceAccountOnly, expiresInSeconds, mutableMapOf()) /** * The name of the service account being created. @@ -344,6 +400,17 @@ private constructor( fun createServiceAccountOnly(): Optional = createServiceAccountOnly.getOptional("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. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun expiresInSeconds(): Optional = expiresInSeconds.getOptional("expires_in_seconds") + /** * Returns the raw JSON value of [name]. * @@ -361,6 +428,16 @@ private constructor( @ExcludeMissing fun _createServiceAccountOnly(): JsonField = createServiceAccountOnly + /** + * Returns the raw JSON value of [expiresInSeconds]. + * + * Unlike [expiresInSeconds], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("expires_in_seconds") + @ExcludeMissing + fun _expiresInSeconds(): JsonField = expiresInSeconds + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -391,12 +468,14 @@ private constructor( private var name: JsonField? = null private var createServiceAccountOnly: JsonField = JsonMissing.of() + private var expiresInSeconds: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(body: Body) = apply { name = body.name createServiceAccountOnly = body.createServiceAccountOnly + expiresInSeconds = body.expiresInSeconds additionalProperties = body.additionalProperties.toMutableMap() } @@ -442,6 +521,41 @@ private constructor( this.createServiceAccountOnly = createServiceAccountOnly } + /** + * 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. + */ + fun expiresInSeconds(expiresInSeconds: Long?) = + expiresInSeconds(JsonField.ofNullable(expiresInSeconds)) + + /** + * Alias for [Builder.expiresInSeconds]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun expiresInSeconds(expiresInSeconds: Long) = + expiresInSeconds(expiresInSeconds as Long?) + + /** + * Alias for calling [Builder.expiresInSeconds] with `expiresInSeconds.orElse(null)`. + */ + fun expiresInSeconds(expiresInSeconds: Optional) = + expiresInSeconds(expiresInSeconds.getOrNull()) + + /** + * Sets [Builder.expiresInSeconds] to an arbitrary JSON value. + * + * You should usually call [Builder.expiresInSeconds] with a well-typed [Long] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun expiresInSeconds(expiresInSeconds: JsonField) = apply { + this.expiresInSeconds = expiresInSeconds + } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -477,6 +591,7 @@ private constructor( Body( checkRequired("name", name), createServiceAccountOnly, + expiresInSeconds, additionalProperties.toMutableMap(), ) } @@ -499,6 +614,7 @@ private constructor( name() createServiceAccountOnly() + expiresInSeconds() validated = true } @@ -519,7 +635,8 @@ private constructor( @JvmSynthetic internal fun validity(): Int = (if (name.asKnown().isPresent) 1 else 0) + - (if (createServiceAccountOnly.asKnown().isPresent) 1 else 0) + (if (createServiceAccountOnly.asKnown().isPresent) 1 else 0) + + (if (expiresInSeconds.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { @@ -529,17 +646,18 @@ private constructor( return other is Body && name == other.name && createServiceAccountOnly == other.createServiceAccountOnly && + expiresInSeconds == other.expiresInSeconds && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(name, createServiceAccountOnly, additionalProperties) + Objects.hash(name, createServiceAccountOnly, expiresInSeconds, additionalProperties) } override fun hashCode(): Int = hashCode override fun toString() = - "Body{name=$name, createServiceAccountOnly=$createServiceAccountOnly, additionalProperties=$additionalProperties}" + "Body{name=$name, createServiceAccountOnly=$createServiceAccountOnly, expiresInSeconds=$expiresInSeconds, additionalProperties=$additionalProperties}" } override fun equals(other: Any?): Boolean { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponse.kt index 3bb3f4789..2214077b7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponse.kt @@ -348,6 +348,7 @@ private constructor( private val name: JsonField, private val object_: JsonValue, private val value: JsonField, + private val expiresAt: JsonField, private val additionalProperties: MutableMap, ) { @@ -360,7 +361,10 @@ private constructor( @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(), @JsonProperty("object") @ExcludeMissing object_: JsonValue = JsonMissing.of(), @JsonProperty("value") @ExcludeMissing value: JsonField = JsonMissing.of(), - ) : this(id, createdAt, name, object_, value, mutableMapOf()) + @JsonProperty("expires_at") + @ExcludeMissing + expiresAt: JsonField = JsonMissing.of(), + ) : this(id, createdAt, name, object_, value, expiresAt, mutableMapOf()) /** * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -399,6 +403,14 @@ private constructor( */ fun value(): String = value.getRequired("value") + /** + * The Unix timestamp (in seconds) when the API key expires, or null if it does not expire. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun expiresAt(): Optional = expiresAt.getOptional("expires_at") + /** * Returns the raw JSON value of [id]. * @@ -427,6 +439,13 @@ private constructor( */ @JsonProperty("value") @ExcludeMissing fun _value(): JsonField = value + /** + * Returns the raw JSON value of [expiresAt]. + * + * Unlike [expiresAt], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("expires_at") @ExcludeMissing fun _expiresAt(): JsonField = expiresAt + @JsonAnySetter private fun putAdditionalProperty(key: String, value: JsonValue) { additionalProperties.put(key, value) @@ -464,6 +483,7 @@ private constructor( private var object_: JsonValue = JsonValue.from("organization.project.service_account.api_key") private var value: JsonField? = null + private var expiresAt: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic @@ -473,6 +493,7 @@ private constructor( name = apiKey.name object_ = apiKey.object_ value = apiKey.value + expiresAt = apiKey.expiresAt additionalProperties = apiKey.additionalProperties.toMutableMap() } @@ -534,6 +555,31 @@ private constructor( */ fun value(value: JsonField) = apply { this.value = value } + /** + * The Unix timestamp (in seconds) when the API key expires, or null if it does not + * expire. + */ + fun expiresAt(expiresAt: Long?) = expiresAt(JsonField.ofNullable(expiresAt)) + + /** + * Alias for [Builder.expiresAt]. + * + * This unboxed primitive overload exists for backwards compatibility. + */ + fun expiresAt(expiresAt: Long) = expiresAt(expiresAt as Long?) + + /** Alias for calling [Builder.expiresAt] with `expiresAt.orElse(null)`. */ + fun expiresAt(expiresAt: Optional) = expiresAt(expiresAt.getOrNull()) + + /** + * Sets [Builder.expiresAt] to an arbitrary JSON value. + * + * You should usually call [Builder.expiresAt] with a well-typed [Long] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun expiresAt(expiresAt: JsonField) = apply { this.expiresAt = expiresAt } + fun additionalProperties(additionalProperties: Map) = apply { this.additionalProperties.clear() putAllAdditionalProperties(additionalProperties) @@ -575,6 +621,7 @@ private constructor( checkRequired("name", name), object_, checkRequired("value", value), + expiresAt, additionalProperties.toMutableMap(), ) } @@ -604,6 +651,7 @@ private constructor( } } value() + expiresAt() validated = true } @@ -630,7 +678,8 @@ private constructor( if (it == JsonValue.from("organization.project.service_account.api_key")) 1 else 0 } + - (if (value.asKnown().isPresent) 1 else 0) + (if (value.asKnown().isPresent) 1 else 0) + + (if (expiresAt.asKnown().isPresent) 1 else 0) override fun equals(other: Any?): Boolean { if (this === other) { @@ -643,17 +692,18 @@ private constructor( name == other.name && object_ == other.object_ && value == other.value && + expiresAt == other.expiresAt && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, createdAt, name, object_, value, additionalProperties) + Objects.hash(id, createdAt, name, object_, value, expiresAt, additionalProperties) } override fun hashCode(): Int = hashCode override fun toString() = - "ApiKey{id=$id, createdAt=$createdAt, name=$name, object_=$object_, value=$value, additionalProperties=$additionalProperties}" + "ApiKey{id=$id, createdAt=$createdAt, name=$name, object_=$object_, value=$value, expiresAt=$expiresAt, additionalProperties=$additionalProperties}" } /** diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt index dbc6b06f7..26a3cf26b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt @@ -53,7 +53,8 @@ private constructor( fun input(): String = body.input() /** - * One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, + * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -66,7 +67,7 @@ private constructor( * `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). + * [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -221,7 +222,8 @@ private constructor( fun input(input: JsonField) = apply { body.input(input) } /** - * One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, + * 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`. */ fun model(model: SpeechModel) = apply { body.model(model) } @@ -248,7 +250,7 @@ private constructor( * `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). + * [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). */ fun voice(voice: Voice) = apply { body.voice(voice) } @@ -529,7 +531,8 @@ private constructor( fun input(): String = input.getRequired("input") /** - * One of the available [TTS models](https://platform.openai.com/docs/models#tts): `tts-1`, + * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -542,7 +545,7 @@ private constructor( * `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). + * [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -708,8 +711,9 @@ private constructor( fun input(input: JsonField) = apply { this.input = input } /** - * 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`. */ fun model(model: SpeechModel) = model(JsonField.of(model)) @@ -737,7 +741,7 @@ private constructor( * `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). */ fun voice(voice: Voice) = voice(JsonField.of(voice)) @@ -962,7 +966,7 @@ private constructor( * `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). + * [Text to speech guide](https://developers.openai.com/api/docs/guides/text-to-speech#voice-options). */ @JsonDeserialize(using = Voice.Deserializer::class) @JsonSerialize(using = Voice.Serializer::class) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParams.kt index 21594148f..fe6f27d16 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParams.kt @@ -145,8 +145,8 @@ private constructor( /** * 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`. + * [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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -580,8 +580,9 @@ private constructor( /** * 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`. + * [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`. */ fun prompt(prompt: String) = apply { body.prompt(prompt) } @@ -946,8 +947,9 @@ private constructor( /** * 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`. + * [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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1451,8 +1453,8 @@ private constructor( /** * 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 + * [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`. */ fun prompt(prompt: String) = prompt(MultipartField.of(prompt)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionStreamEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionStreamEvent.kt index c4b824223..ea86ec22f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionStreamEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionStreamEvent.kt @@ -21,7 +21,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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`. */ @JsonDeserialize(using = TranscriptionStreamEvent.Deserializer::class) @@ -37,7 +37,7 @@ private constructor( /** * 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`. */ fun transcriptTextSegment(): Optional = @@ -46,7 +46,7 @@ private constructor( /** * 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`. */ fun transcriptTextDelta(): Optional = @@ -55,7 +55,7 @@ private constructor( /** * 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`. */ fun transcriptTextDone(): Optional = @@ -70,7 +70,7 @@ private constructor( /** * 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`. */ fun asTranscriptTextSegment(): TranscriptionTextSegmentEvent = @@ -79,7 +79,7 @@ private constructor( /** * 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`. */ fun asTranscriptTextDelta(): TranscriptionTextDeltaEvent = @@ -88,7 +88,7 @@ private constructor( /** * 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`. */ fun asTranscriptTextDone(): TranscriptionTextDoneEvent = @@ -237,7 +237,7 @@ private constructor( /** * 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`. */ @JvmStatic @@ -247,7 +247,7 @@ private constructor( /** * 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`. */ @JvmStatic @@ -257,7 +257,7 @@ private constructor( /** * 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`. */ @JvmStatic @@ -274,7 +274,7 @@ private constructor( /** * 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`. */ fun visitTranscriptTextSegment(transcriptTextSegment: TranscriptionTextSegmentEvent): T @@ -282,7 +282,7 @@ private constructor( /** * 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`. */ fun visitTranscriptTextDelta(transcriptTextDelta: TranscriptionTextDeltaEvent): T @@ -290,7 +290,7 @@ private constructor( /** * 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`. */ fun visitTranscriptTextDone(transcriptTextDone: TranscriptionTextDoneEvent): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDeltaEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDeltaEvent.kt index 9b3ebb489..a6278aa94 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDeltaEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDeltaEvent.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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`. */ class TranscriptionTextDeltaEvent @@ -68,7 +68,7 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -176,7 +176,7 @@ private constructor( /** * 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`. */ fun logprobs(logprobs: List) = logprobs(JsonField.of(logprobs)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDoneEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDoneEvent.kt index 937044064..7534c5df9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDoneEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextDoneEvent.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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`. */ class TranscriptionTextDoneEvent @@ -81,7 +81,7 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -228,7 +228,7 @@ private constructor( /** * 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`. */ fun logprobs(logprobs: List) = logprobs(JsonField.of(logprobs)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextSegmentEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextSegmentEvent.kt index 03c88ce65..f782a41f8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextSegmentEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionTextSegmentEvent.kt @@ -18,7 +18,7 @@ import java.util.Objects /** * 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`. */ class TranscriptionTextSegmentEvent diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/translations/TranslationCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/translations/TranslationCreateParams.kt index a4f47e9a0..13a74808f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/audio/translations/TranslationCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/translations/TranslationCreateParams.kt @@ -56,7 +56,7 @@ private constructor( /** * 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 + * [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should be in * English. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -231,8 +231,8 @@ private constructor( /** * 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. + * [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should + * be in English. */ fun prompt(prompt: String) = apply { body.prompt(prompt) } @@ -467,8 +467,8 @@ private constructor( /** * 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. + * [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) should + * be in English. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -649,8 +649,8 @@ private constructor( /** * 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. + * [prompt](https://developers.openai.com/api/docs/guides/speech-to-text#prompting) + * should be in English. */ fun prompt(prompt: String) = prompt(MultipartField.of(prompt)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/batches/Batch.kt b/openai-java-core/src/main/kotlin/com/openai/models/batches/Batch.kt index 644af02cd..8ac52690c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/batches/Batch.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/batches/Batch.kt @@ -271,7 +271,7 @@ private constructor( /** * 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 + * [model guide](https://developers.openai.com/api/docs/models) to browse and compare available * models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -776,7 +776,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ fun model(model: String) = model(JsonField.of(model)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchCreateParams.kt index e204fbef1..88569b553 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchCreateParams.kt @@ -53,13 +53,13 @@ private constructor( /** * 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. + * [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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -217,13 +217,14 @@ private constructor( /** * 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. + * [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. */ fun inputFileId(inputFileId: String) = apply { body.inputFileId(inputFileId) } @@ -482,13 +483,14 @@ private constructor( /** * 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. + * [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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -646,12 +648,13 @@ private constructor( /** * 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 + * [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. */ fun inputFileId(inputFileId: String) = inputFileId(JsonField.of(inputFileId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchUsage.kt b/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchUsage.kt index bb1ece9a1..ce1770459 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchUsage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/batches/BatchUsage.kt @@ -364,7 +364,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -420,7 +420,7 @@ private constructor( /** * 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). */ fun cachedTokens(cachedTokens: Long) = cachedTokens(JsonField.of(cachedTokens)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/Assistant.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/Assistant.kt index 11c0eff5e..97a63f21a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/Assistant.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/Assistant.kt @@ -136,9 +136,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -177,13 +177,13 @@ private constructor( /** * 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 + * [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. @@ -471,9 +471,9 @@ private constructor( /** * 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. */ fun model(model: String) = model(JsonField.of(model)) @@ -563,13 +563,13 @@ private constructor( /** * 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. @@ -1137,8 +1137,8 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -1186,9 +1186,9 @@ private constructor( } /** - * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -1320,7 +1320,7 @@ private constructor( /** * 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. * @@ -1372,7 +1372,7 @@ private constructor( /** * 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/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt index 6775505ef..6bdf4f02d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt @@ -50,9 +50,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -101,7 +101,7 @@ private constructor( * `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 model-specific + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific * support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -111,13 +111,13 @@ private constructor( /** * 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 + * [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. @@ -304,9 +304,9 @@ private constructor( /** * 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. */ fun model(model: ChatModel) = apply { body.model(model) } @@ -402,8 +402,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = apply { body.reasoningEffort(reasoningEffort) @@ -426,13 +426,13 @@ private constructor( /** * 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. @@ -814,9 +814,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -866,8 +866,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -877,13 +877,13 @@ private constructor( /** * 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. @@ -1094,9 +1094,10 @@ private constructor( /** * 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. */ fun model(model: ChatModel) = model(JsonField.of(model)) @@ -1199,7 +1200,7 @@ private constructor( * `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. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = @@ -1222,14 +1223,14 @@ private constructor( /** * 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. @@ -1887,8 +1888,8 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -1936,8 +1937,8 @@ private constructor( } /** - * 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 + * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -2074,7 +2075,7 @@ private constructor( /** * 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. * @@ -2086,7 +2087,7 @@ private constructor( /** * 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. * @@ -2150,7 +2151,7 @@ private constructor( /** * 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. */ @@ -2182,7 +2183,7 @@ private constructor( /** * 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. */ @@ -2321,10 +2322,10 @@ private constructor( chunkingStrategy.getOptional("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -2448,10 +2449,10 @@ private constructor( chunkingStrategy(ChunkingStrategy.Static.builder().static_(static_).build()) /** - * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantStreamEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantStreamEvent.kt index ac520108a..95eb7fece 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantStreamEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantStreamEvent.kt @@ -51,8 +51,8 @@ import kotlin.jvm.optionals.getOrNull * * 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 - * integrate the Assistants API with streaming. + * [Assistants API quickstart](https://developers.openai.com/api/docs/assistants/migration) to learn + * how to integrate the Assistants API with streaming. */ @JsonDeserialize(using = AssistantStreamEvent.Deserializer::class) @JsonSerialize(using = AssistantStreamEvent.Serializer::class) @@ -86,155 +86,152 @@ private constructor( ) { /** - * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is + * Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun threadCreated(): Optional = Optional.ofNullable(threadCreated) /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun threadRunCreated(): Optional = Optional.ofNullable(threadRunCreated) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `queued` status. */ fun threadRunQueued(): Optional = Optional.ofNullable(threadRunQueued) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an * `in_progress` status. */ fun threadRunInProgress(): Optional = Optional.ofNullable(threadRunInProgress) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `requires_action` status. */ fun threadRunRequiresAction(): Optional = Optional.ofNullable(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. */ fun threadRunCompleted(): Optional = Optional.ofNullable(threadRunCompleted) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with * status `incomplete`. */ fun threadRunIncomplete(): Optional = Optional.ofNullable(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. */ fun threadRunFailed(): Optional = Optional.ofNullable(threadRunFailed) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `cancelling` status. */ fun threadRunCancelling(): Optional = Optional.ofNullable(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. */ fun threadRunCancelled(): Optional = Optional.ofNullable(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. */ fun threadRunExpired(): Optional = Optional.ofNullable(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. */ fun threadRunStepCreated(): Optional = Optional.ofNullable(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. */ fun threadRunStepInProgress(): Optional = Optional.ofNullable(threadRunStepInProgress) /** * 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. */ fun threadRunStepDelta(): Optional = Optional.ofNullable(threadRunStepDelta) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun threadRunStepCompleted(): Optional = Optional.ofNullable(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. */ fun threadRunStepFailed(): Optional = Optional.ofNullable(threadRunStepFailed) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun threadRunStepCancelled(): Optional = Optional.ofNullable(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. */ fun threadRunStepExpired(): Optional = Optional.ofNullable(threadRunStepExpired) /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun threadMessageCreated(): Optional = Optional.ofNullable(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. */ fun threadMessageInProgress(): Optional = Optional.ofNullable(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. */ fun threadMessageDelta(): Optional = Optional.ofNullable(threadMessageDelta) /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun threadMessageCompleted(): Optional = Optional.ofNullable(threadMessageCompleted) /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends * before it is completed. */ fun threadMessageIncomplete(): Optional = Optional.ofNullable(threadMessageIncomplete) /** - * Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) + * 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. */ fun errorEvent(): Optional = Optional.ofNullable(errorEvent) @@ -288,159 +285,156 @@ private constructor( fun isErrorEvent(): Boolean = errorEvent != null /** - * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is + * Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun asThreadCreated(): ThreadCreated = threadCreated.getOrThrow("threadCreated") /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun asThreadRunCreated(): ThreadRunCreated = threadRunCreated.getOrThrow("threadRunCreated") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `queued` status. */ fun asThreadRunQueued(): ThreadRunQueued = threadRunQueued.getOrThrow("threadRunQueued") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an * `in_progress` status. */ fun asThreadRunInProgress(): ThreadRunInProgress = threadRunInProgress.getOrThrow("threadRunInProgress") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `requires_action` status. */ fun asThreadRunRequiresAction(): ThreadRunRequiresAction = threadRunRequiresAction.getOrThrow("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. */ fun asThreadRunCompleted(): ThreadRunCompleted = threadRunCompleted.getOrThrow("threadRunCompleted") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with * status `incomplete`. */ fun asThreadRunIncomplete(): ThreadRunIncomplete = threadRunIncomplete.getOrThrow("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. */ fun asThreadRunFailed(): ThreadRunFailed = threadRunFailed.getOrThrow("threadRunFailed") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `cancelling` status. */ fun asThreadRunCancelling(): ThreadRunCancelling = threadRunCancelling.getOrThrow("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. */ fun asThreadRunCancelled(): ThreadRunCancelled = threadRunCancelled.getOrThrow("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. */ fun asThreadRunExpired(): ThreadRunExpired = threadRunExpired.getOrThrow("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. */ fun asThreadRunStepCreated(): ThreadRunStepCreated = threadRunStepCreated.getOrThrow("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. */ fun asThreadRunStepInProgress(): ThreadRunStepInProgress = threadRunStepInProgress.getOrThrow("threadRunStepInProgress") /** * 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. */ fun asThreadRunStepDelta(): ThreadRunStepDelta = threadRunStepDelta.getOrThrow("threadRunStepDelta") /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun asThreadRunStepCompleted(): ThreadRunStepCompleted = threadRunStepCompleted.getOrThrow("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. */ fun asThreadRunStepFailed(): ThreadRunStepFailed = threadRunStepFailed.getOrThrow("threadRunStepFailed") /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun asThreadRunStepCancelled(): ThreadRunStepCancelled = threadRunStepCancelled.getOrThrow("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. */ fun asThreadRunStepExpired(): ThreadRunStepExpired = threadRunStepExpired.getOrThrow("threadRunStepExpired") /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun asThreadMessageCreated(): ThreadMessageCreated = threadMessageCreated.getOrThrow("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. */ fun asThreadMessageInProgress(): ThreadMessageInProgress = threadMessageInProgress.getOrThrow("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. */ fun asThreadMessageDelta(): ThreadMessageDelta = threadMessageDelta.getOrThrow("threadMessageDelta") /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun asThreadMessageCompleted(): ThreadMessageCompleted = threadMessageCompleted.getOrThrow("threadMessageCompleted") /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends * before it is completed. */ fun asThreadMessageIncomplete(): ThreadMessageIncomplete = threadMessageIncomplete.getOrThrow("threadMessageIncomplete") /** - * Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) + * 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. */ fun asErrorEvent(): ErrorEvent = errorEvent.getOrThrow("errorEvent") @@ -853,7 +847,7 @@ private constructor( companion object { /** - * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) + * Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) * is created. */ @JvmStatic @@ -861,7 +855,7 @@ private constructor( AssistantStreamEvent(threadCreated = threadCreated) /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ @JvmStatic @@ -869,7 +863,7 @@ private constructor( AssistantStreamEvent(threadRunCreated = threadRunCreated) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `queued` status. */ @JvmStatic @@ -877,7 +871,7 @@ private constructor( AssistantStreamEvent(threadRunQueued = threadRunQueued) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * an `in_progress` status. */ @JvmStatic @@ -885,7 +879,7 @@ private constructor( AssistantStreamEvent(threadRunInProgress = threadRunInProgress) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `requires_action` status. */ @JvmStatic @@ -893,7 +887,7 @@ private constructor( AssistantStreamEvent(threadRunRequiresAction = threadRunRequiresAction) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ @JvmStatic @@ -901,22 +895,22 @@ private constructor( AssistantStreamEvent(threadRunCompleted = 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`. */ @JvmStatic fun ofThreadRunIncomplete(threadRunIncomplete: ThreadRunIncomplete) = AssistantStreamEvent(threadRunIncomplete = 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. */ @JvmStatic fun ofThreadRunFailed(threadRunFailed: ThreadRunFailed) = AssistantStreamEvent(threadRunFailed = threadRunFailed) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `cancelling` status. */ @JvmStatic @@ -924,7 +918,7 @@ private constructor( AssistantStreamEvent(threadRunCancelling = threadRunCancelling) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ @JvmStatic @@ -932,15 +926,14 @@ private constructor( AssistantStreamEvent(threadRunCancelled = 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. */ @JvmStatic fun ofThreadRunExpired(threadRunExpired: ThreadRunExpired) = AssistantStreamEvent(threadRunExpired = threadRunExpired) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * created. */ @JvmStatic @@ -948,9 +941,8 @@ private constructor( AssistantStreamEvent(threadRunStepCreated = 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. */ @JvmStatic fun ofThreadRunStepInProgress(threadRunStepInProgress: ThreadRunStepInProgress) = @@ -958,16 +950,15 @@ private constructor( /** * 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. */ @JvmStatic fun ofThreadRunStepDelta(threadRunStepDelta: ThreadRunStepDelta) = AssistantStreamEvent(threadRunStepDelta = threadRunStepDelta) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ @JvmStatic @@ -975,16 +966,15 @@ private constructor( AssistantStreamEvent(threadRunStepCompleted = 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. */ @JvmStatic fun ofThreadRunStepFailed(threadRunStepFailed: ThreadRunStepFailed) = AssistantStreamEvent(threadRunStepFailed = threadRunStepFailed) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ @JvmStatic @@ -992,23 +982,23 @@ private constructor( AssistantStreamEvent(threadRunStepCancelled = 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. */ @JvmStatic fun ofThreadRunStepExpired(threadRunStepExpired: ThreadRunStepExpired) = AssistantStreamEvent(threadRunStepExpired = 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. */ @JvmStatic fun ofThreadMessageCreated(threadMessageCreated: ThreadMessageCreated) = AssistantStreamEvent(threadMessageCreated = threadMessageCreated) /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) * moves to an `in_progress` state. */ @JvmStatic @@ -1017,7 +1007,7 @@ private constructor( /** * Occurs when parts of a - * [Message](https://platform.openai.com/docs/api-reference/messages/object) are being + * [Message](https://developers.openai.com/api/docs/assistants/migration) are being * streamed. */ @JvmStatic @@ -1025,24 +1015,25 @@ private constructor( AssistantStreamEvent(threadMessageDelta = 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. */ @JvmStatic fun ofThreadMessageCompleted(threadMessageCompleted: ThreadMessageCompleted) = AssistantStreamEvent(threadMessageCompleted = 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. */ @JvmStatic fun ofThreadMessageIncomplete(threadMessageIncomplete: ThreadMessageIncomplete) = AssistantStreamEvent(threadMessageIncomplete = 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. */ @JvmStatic fun ofErrorEvent(errorEvent: ErrorEvent) = AssistantStreamEvent(errorEvent = errorEvent) @@ -1055,150 +1046,147 @@ private constructor( interface Visitor { /** - * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) + * Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) * is created. */ fun visitThreadCreated(threadCreated: ThreadCreated): T /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun visitThreadRunCreated(threadRunCreated: ThreadRunCreated): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `queued` status. */ fun visitThreadRunQueued(threadRunQueued: ThreadRunQueued): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * an `in_progress` status. */ fun visitThreadRunInProgress(threadRunInProgress: ThreadRunInProgress): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `requires_action` status. */ fun visitThreadRunRequiresAction(threadRunRequiresAction: ThreadRunRequiresAction): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun visitThreadRunCompleted(threadRunCompleted: ThreadRunCompleted): T /** - * 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`. */ fun visitThreadRunIncomplete(threadRunIncomplete: ThreadRunIncomplete): T /** - * 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. */ fun visitThreadRunFailed(threadRunFailed: ThreadRunFailed): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `cancelling` status. */ fun visitThreadRunCancelling(threadRunCancelling: ThreadRunCancelling): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun visitThreadRunCancelled(threadRunCancelled: ThreadRunCancelled): T /** - * 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. */ fun visitThreadRunExpired(threadRunExpired: ThreadRunExpired): T /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun visitThreadRunStepCreated(threadRunStepCreated: ThreadRunStepCreated): T /** - * 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. */ fun visitThreadRunStepInProgress(threadRunStepInProgress: ThreadRunStepInProgress): T /** * 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. */ fun visitThreadRunStepDelta(threadRunStepDelta: ThreadRunStepDelta): T /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun visitThreadRunStepCompleted(threadRunStepCompleted: ThreadRunStepCompleted): T /** - * 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. */ fun visitThreadRunStepFailed(threadRunStepFailed: ThreadRunStepFailed): T /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun visitThreadRunStepCancelled(threadRunStepCancelled: ThreadRunStepCancelled): T /** - * 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. */ fun visitThreadRunStepExpired(threadRunStepExpired: ThreadRunStepExpired): T /** - * 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. */ fun visitThreadMessageCreated(threadMessageCreated: ThreadMessageCreated): T /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) * moves to an `in_progress` state. */ fun visitThreadMessageInProgress(threadMessageInProgress: ThreadMessageInProgress): T /** * Occurs when parts of a - * [Message](https://platform.openai.com/docs/api-reference/messages/object) are being + * [Message](https://developers.openai.com/api/docs/assistants/migration) are being * streamed. */ fun visitThreadMessageDelta(threadMessageDelta: ThreadMessageDelta): T /** - * 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. */ fun visitThreadMessageCompleted(threadMessageCompleted: ThreadMessageCompleted): T /** - * 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. */ fun visitThreadMessageIncomplete(threadMessageIncomplete: ThreadMessageIncomplete): T /** - * 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. */ fun visitErrorEvent(errorEvent: ErrorEvent): T @@ -1404,7 +1392,7 @@ private constructor( } /** - * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is + * Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is * created. */ class ThreadCreated @@ -1425,7 +1413,7 @@ private constructor( /** * Represents a thread that contains - * [messages](https://platform.openai.com/docs/api-reference/messages). + * [messages](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1508,7 +1496,7 @@ private constructor( /** * Represents a thread that contains - * [messages](https://platform.openai.com/docs/api-reference/messages). + * [messages](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Thread) = data(JsonField.of(data)) @@ -1656,7 +1644,7 @@ private constructor( } /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ class ThreadRunCreated @@ -1675,7 +1663,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1741,7 +1729,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -1871,7 +1859,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `queued` status. */ class ThreadRunQueued @@ -1890,7 +1878,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1956,7 +1944,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2086,7 +2074,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an * `in_progress` status. */ class ThreadRunInProgress @@ -2105,7 +2093,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2171,7 +2159,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2301,7 +2289,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `requires_action` status. */ class ThreadRunRequiresAction @@ -2320,7 +2308,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2386,7 +2374,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2516,7 +2504,8 @@ private constructor( } /** - * 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. */ class ThreadRunCompleted @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -2534,7 +2523,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2600,7 +2589,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2730,7 +2719,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with * status `incomplete`. */ class ThreadRunIncomplete @@ -2749,7 +2738,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2815,7 +2804,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2944,7 +2933,7 @@ private constructor( "ThreadRunIncomplete{data=$data, event=$event, additionalProperties=$additionalProperties}" } - /** 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. */ class ThreadRunFailed @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( @@ -2961,7 +2950,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -3027,7 +3016,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -3157,7 +3146,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `cancelling` status. */ class ThreadRunCancelling @@ -3176,7 +3165,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -3242,7 +3231,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -3372,7 +3361,8 @@ private constructor( } /** - * 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. */ class ThreadRunCancelled @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -3390,7 +3380,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -3456,7 +3446,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -3585,7 +3575,7 @@ private constructor( "ThreadRunCancelled{data=$data, event=$event, additionalProperties=$additionalProperties}" } - /** 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. */ class ThreadRunExpired @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( @@ -3602,7 +3592,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -3668,7 +3658,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -3798,8 +3788,8 @@ private constructor( } /** - * 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. */ class ThreadRunStepCreated @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -4009,9 +3999,8 @@ private constructor( } /** - * 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. */ class ThreadRunStepInProgress @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -4222,8 +4211,7 @@ private constructor( /** * 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. */ class ThreadRunStepDelta @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -4437,8 +4425,7 @@ private constructor( } /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ class ThreadRunStepCompleted @@ -4649,8 +4636,7 @@ private constructor( } /** - * 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. */ class ThreadRunStepFailed @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -4860,8 +4846,7 @@ private constructor( } /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ class ThreadRunStepCancelled @@ -5072,8 +5057,8 @@ private constructor( } /** - * 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. */ class ThreadRunStepExpired @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -5283,7 +5268,7 @@ private constructor( } /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * created. */ class ThreadMessageCreated @@ -5302,7 +5287,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -5368,7 +5353,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) @@ -5498,8 +5483,8 @@ private constructor( } /** - * 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. */ class ThreadMessageInProgress @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -5517,7 +5502,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -5583,7 +5568,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) @@ -5713,8 +5698,8 @@ private constructor( } /** - * 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. */ class ThreadMessageDelta @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -5926,7 +5911,7 @@ private constructor( } /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ class ThreadMessageCompleted @@ -5945,7 +5930,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -6011,7 +5996,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) @@ -6141,7 +6126,7 @@ private constructor( } /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends * before it is completed. */ class ThreadMessageIncomplete @@ -6160,7 +6145,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -6226,7 +6211,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) @@ -6356,7 +6341,7 @@ private constructor( } /** - * Occurs when an [error](https://platform.openai.com/docs/guides/error-codes#api-errors) + * 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. */ class ErrorEvent diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantUpdateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantUpdateParams.kt index 2ed61a606..b6d14a9fa 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantUpdateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantUpdateParams.kt @@ -71,9 +71,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -93,7 +93,7 @@ private constructor( * `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 model-specific + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific * support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -103,13 +103,13 @@ private constructor( /** * 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 + * [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. @@ -355,9 +355,9 @@ private constructor( /** * 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. */ fun model(model: Model) = apply { body.model(model) } @@ -396,8 +396,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = apply { body.reasoningEffort(reasoningEffort) @@ -420,13 +420,13 @@ private constructor( /** * 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. @@ -838,9 +838,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -860,8 +860,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -871,13 +871,13 @@ private constructor( /** * 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. @@ -1142,9 +1142,10 @@ private constructor( /** * 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. */ fun model(model: Model) = model(JsonField.of(model)) @@ -1186,7 +1187,7 @@ private constructor( * `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. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = @@ -1209,14 +1210,14 @@ private constructor( /** * 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. @@ -1672,9 +1673,9 @@ private constructor( /** * 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. */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -2247,8 +2248,9 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -2297,9 +2299,9 @@ private constructor( /** * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -2431,7 +2433,7 @@ private constructor( /** * 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. * @@ -2483,7 +2485,7 @@ private constructor( /** * 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/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/FileSearchTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/FileSearchTool.kt index fd1c46e68..87fb884f0 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/FileSearchTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/FileSearchTool.kt @@ -217,7 +217,7 @@ private constructor( * 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) + * [file search tool documentation](https://developers.openai.com/api/docs/guides/tools-file-search#retrieval-customization) * for more information. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -230,7 +230,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -298,7 +298,7 @@ private constructor( * * 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. */ fun maxNumResults(maxNumResults: Long) = maxNumResults(JsonField.of(maxNumResults)) @@ -319,7 +319,7 @@ private constructor( * 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. */ fun rankingOptions(rankingOptions: RankingOptions) = @@ -409,7 +409,7 @@ private constructor( * 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. */ class RankingOptions diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/MessageStreamEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/MessageStreamEvent.kt index a33b7158a..b5ec76094 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/MessageStreamEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/MessageStreamEvent.kt @@ -30,8 +30,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. */ @JsonDeserialize(using = MessageStreamEvent.Deserializer::class) @JsonSerialize(using = MessageStreamEvent.Serializer::class) @@ -46,34 +45,34 @@ private constructor( ) { /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun threadMessageCreated(): Optional = Optional.ofNullable(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. */ fun threadMessageInProgress(): Optional = Optional.ofNullable(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. */ fun threadMessageDelta(): Optional = Optional.ofNullable(threadMessageDelta) /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun threadMessageCompleted(): Optional = Optional.ofNullable(threadMessageCompleted) /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends * before it is completed. */ fun threadMessageIncomplete(): Optional = @@ -90,35 +89,35 @@ private constructor( fun isThreadMessageIncomplete(): Boolean = threadMessageIncomplete != null /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun asThreadMessageCreated(): ThreadMessageCreated = threadMessageCreated.getOrThrow("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. */ fun asThreadMessageInProgress(): ThreadMessageInProgress = threadMessageInProgress.getOrThrow("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. */ fun asThreadMessageDelta(): ThreadMessageDelta = threadMessageDelta.getOrThrow("threadMessageDelta") /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun asThreadMessageCompleted(): ThreadMessageCompleted = threadMessageCompleted.getOrThrow("threadMessageCompleted") /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends * before it is completed. */ fun asThreadMessageIncomplete(): ThreadMessageIncomplete = @@ -295,15 +294,15 @@ private constructor( companion object { /** - * 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. */ @JvmStatic fun ofThreadMessageCreated(threadMessageCreated: ThreadMessageCreated) = MessageStreamEvent(threadMessageCreated = threadMessageCreated) /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) * moves to an `in_progress` state. */ @JvmStatic @@ -312,7 +311,7 @@ private constructor( /** * Occurs when parts of a - * [Message](https://platform.openai.com/docs/api-reference/messages/object) are being + * [Message](https://developers.openai.com/api/docs/assistants/migration) are being * streamed. */ @JvmStatic @@ -320,16 +319,16 @@ private constructor( MessageStreamEvent(threadMessageDelta = 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. */ @JvmStatic fun ofThreadMessageCompleted(threadMessageCompleted: ThreadMessageCompleted) = MessageStreamEvent(threadMessageCompleted = 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. */ @JvmStatic fun ofThreadMessageIncomplete(threadMessageIncomplete: ThreadMessageIncomplete) = @@ -343,33 +342,33 @@ private constructor( interface Visitor { /** - * 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. */ fun visitThreadMessageCreated(threadMessageCreated: ThreadMessageCreated): T /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) * moves to an `in_progress` state. */ fun visitThreadMessageInProgress(threadMessageInProgress: ThreadMessageInProgress): T /** * Occurs when parts of a - * [Message](https://platform.openai.com/docs/api-reference/messages/object) are being + * [Message](https://developers.openai.com/api/docs/assistants/migration) are being * streamed. */ fun visitThreadMessageDelta(threadMessageDelta: ThreadMessageDelta): T /** - * 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. */ fun visitThreadMessageCompleted(threadMessageCompleted: ThreadMessageCompleted): T /** - * 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. */ fun visitThreadMessageIncomplete(threadMessageIncomplete: ThreadMessageIncomplete): T @@ -450,7 +449,7 @@ private constructor( } /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * created. */ class ThreadMessageCreated @@ -469,7 +468,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -535,7 +534,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) @@ -665,8 +664,8 @@ private constructor( } /** - * 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. */ class ThreadMessageInProgress @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -684,7 +683,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -750,7 +749,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) @@ -880,8 +879,8 @@ private constructor( } /** - * 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. */ class ThreadMessageDelta @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -1093,7 +1092,7 @@ private constructor( } /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) is + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ class ThreadMessageCompleted @@ -1112,7 +1111,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1178,7 +1177,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) @@ -1308,7 +1307,7 @@ private constructor( } /** - * Occurs when a [message](https://platform.openai.com/docs/api-reference/messages/object) ends + * Occurs when a [message](https://developers.openai.com/api/docs/assistants/migration) ends * before it is completed. */ class ThreadMessageIncomplete @@ -1327,7 +1326,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1393,7 +1392,7 @@ private constructor( /** * Represents a message within a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Message) = data(JsonField.of(data)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStepStreamEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStepStreamEvent.kt index d284b92c5..f5438c687 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStepStreamEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStepStreamEvent.kt @@ -30,8 +30,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. */ @JsonDeserialize(using = RunStepStreamEvent.Deserializer::class) @JsonSerialize(using = RunStepStreamEvent.Serializer::class) @@ -48,53 +47,48 @@ private constructor( ) { /** - * 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. */ fun threadRunStepCreated(): Optional = Optional.ofNullable(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. */ fun threadRunStepInProgress(): Optional = Optional.ofNullable(threadRunStepInProgress) /** * 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. */ fun threadRunStepDelta(): Optional = Optional.ofNullable(threadRunStepDelta) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun threadRunStepCompleted(): Optional = Optional.ofNullable(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. */ fun threadRunStepFailed(): Optional = Optional.ofNullable(threadRunStepFailed) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun threadRunStepCancelled(): Optional = Optional.ofNullable(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. */ fun threadRunStepExpired(): Optional = Optional.ofNullable(threadRunStepExpired) @@ -114,54 +108,49 @@ private constructor( fun isThreadRunStepExpired(): Boolean = threadRunStepExpired != null /** - * 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. */ fun asThreadRunStepCreated(): ThreadRunStepCreated = threadRunStepCreated.getOrThrow("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. */ fun asThreadRunStepInProgress(): ThreadRunStepInProgress = threadRunStepInProgress.getOrThrow("threadRunStepInProgress") /** * 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. */ fun asThreadRunStepDelta(): ThreadRunStepDelta = threadRunStepDelta.getOrThrow("threadRunStepDelta") /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun asThreadRunStepCompleted(): ThreadRunStepCompleted = threadRunStepCompleted.getOrThrow("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. */ fun asThreadRunStepFailed(): ThreadRunStepFailed = threadRunStepFailed.getOrThrow("threadRunStepFailed") /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun asThreadRunStepCancelled(): ThreadRunStepCancelled = threadRunStepCancelled.getOrThrow("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. */ fun asThreadRunStepExpired(): ThreadRunStepExpired = threadRunStepExpired.getOrThrow("threadRunStepExpired") @@ -361,8 +350,7 @@ private constructor( companion object { /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * created. */ @JvmStatic @@ -370,9 +358,8 @@ private constructor( RunStepStreamEvent(threadRunStepCreated = 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. */ @JvmStatic fun ofThreadRunStepInProgress(threadRunStepInProgress: ThreadRunStepInProgress) = @@ -380,16 +367,15 @@ private constructor( /** * 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. */ @JvmStatic fun ofThreadRunStepDelta(threadRunStepDelta: ThreadRunStepDelta) = RunStepStreamEvent(threadRunStepDelta = threadRunStepDelta) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ @JvmStatic @@ -397,16 +383,15 @@ private constructor( RunStepStreamEvent(threadRunStepCompleted = 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. */ @JvmStatic fun ofThreadRunStepFailed(threadRunStepFailed: ThreadRunStepFailed) = RunStepStreamEvent(threadRunStepFailed = threadRunStepFailed) /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ @JvmStatic @@ -414,8 +399,8 @@ private constructor( RunStepStreamEvent(threadRunStepCancelled = 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. */ @JvmStatic fun ofThreadRunStepExpired(threadRunStepExpired: ThreadRunStepExpired) = @@ -429,49 +414,45 @@ private constructor( interface Visitor { /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun visitThreadRunStepCreated(threadRunStepCreated: ThreadRunStepCreated): T /** - * 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. */ fun visitThreadRunStepInProgress(threadRunStepInProgress: ThreadRunStepInProgress): T /** * 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. */ fun visitThreadRunStepDelta(threadRunStepDelta: ThreadRunStepDelta): T /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun visitThreadRunStepCompleted(threadRunStepCompleted: ThreadRunStepCompleted): T /** - * 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. */ fun visitThreadRunStepFailed(threadRunStepFailed: ThreadRunStepFailed): T /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun visitThreadRunStepCancelled(threadRunStepCancelled: ThreadRunStepCancelled): T /** - * 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. */ fun visitThreadRunStepExpired(threadRunStepExpired: ThreadRunStepExpired): T @@ -566,8 +547,8 @@ private constructor( } /** - * 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. */ class ThreadRunStepCreated @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -777,9 +758,8 @@ private constructor( } /** - * 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. */ class ThreadRunStepInProgress @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -990,8 +970,7 @@ private constructor( /** * 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. */ class ThreadRunStepDelta @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -1205,8 +1184,7 @@ private constructor( } /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ class ThreadRunStepCompleted @@ -1417,8 +1395,7 @@ private constructor( } /** - * 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. */ class ThreadRunStepFailed @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -1628,8 +1605,7 @@ private constructor( } /** - * Occurs when a - * [run step](https://platform.openai.com/docs/api-reference/run-steps/step-object) is + * Occurs when a [run step](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ class ThreadRunStepCancelled @@ -1840,8 +1816,8 @@ private constructor( } /** - * 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. */ class ThreadRunStepExpired @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStreamEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStreamEvent.kt index bdfe1e6bd..a7114ecb3 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStreamEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/RunStreamEvent.kt @@ -29,7 +29,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. */ @JsonDeserialize(using = RunStreamEvent.Deserializer::class) @JsonSerialize(using = RunStreamEvent.Serializer::class) @@ -49,59 +49,61 @@ private constructor( ) { /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun threadRunCreated(): Optional = Optional.ofNullable(threadRunCreated) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `queued` status. */ fun threadRunQueued(): Optional = Optional.ofNullable(threadRunQueued) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an * `in_progress` status. */ fun threadRunInProgress(): Optional = Optional.ofNullable(threadRunInProgress) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `requires_action` status. */ fun threadRunRequiresAction(): Optional = Optional.ofNullable(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. */ fun threadRunCompleted(): Optional = Optional.ofNullable(threadRunCompleted) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with * status `incomplete`. */ fun threadRunIncomplete(): Optional = Optional.ofNullable(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. */ fun threadRunFailed(): Optional = Optional.ofNullable(threadRunFailed) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `cancelling` status. */ fun threadRunCancelling(): Optional = Optional.ofNullable(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. */ fun threadRunCancelled(): Optional = Optional.ofNullable(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. */ fun threadRunExpired(): Optional = Optional.ofNullable(threadRunExpired) fun isThreadRunCreated(): Boolean = threadRunCreated != null @@ -125,61 +127,63 @@ private constructor( fun isThreadRunExpired(): Boolean = threadRunExpired != null /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun asThreadRunCreated(): ThreadRunCreated = threadRunCreated.getOrThrow("threadRunCreated") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `queued` status. */ fun asThreadRunQueued(): ThreadRunQueued = threadRunQueued.getOrThrow("threadRunQueued") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an * `in_progress` status. */ fun asThreadRunInProgress(): ThreadRunInProgress = threadRunInProgress.getOrThrow("threadRunInProgress") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `requires_action` status. */ fun asThreadRunRequiresAction(): ThreadRunRequiresAction = threadRunRequiresAction.getOrThrow("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. */ fun asThreadRunCompleted(): ThreadRunCompleted = threadRunCompleted.getOrThrow("threadRunCompleted") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with * status `incomplete`. */ fun asThreadRunIncomplete(): ThreadRunIncomplete = threadRunIncomplete.getOrThrow("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. */ fun asThreadRunFailed(): ThreadRunFailed = threadRunFailed.getOrThrow("threadRunFailed") /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `cancelling` status. */ fun asThreadRunCancelling(): ThreadRunCancelling = threadRunCancelling.getOrThrow("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. */ fun asThreadRunCancelled(): ThreadRunCancelled = threadRunCancelled.getOrThrow("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. */ fun asThreadRunExpired(): ThreadRunExpired = threadRunExpired.getOrThrow("threadRunExpired") fun _json(): Optional = Optional.ofNullable(_json) @@ -399,7 +403,7 @@ private constructor( companion object { /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ @JvmStatic @@ -407,7 +411,7 @@ private constructor( RunStreamEvent(threadRunCreated = threadRunCreated) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `queued` status. */ @JvmStatic @@ -415,7 +419,7 @@ private constructor( RunStreamEvent(threadRunQueued = threadRunQueued) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * an `in_progress` status. */ @JvmStatic @@ -423,7 +427,7 @@ private constructor( RunStreamEvent(threadRunInProgress = threadRunInProgress) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `requires_action` status. */ @JvmStatic @@ -431,7 +435,7 @@ private constructor( RunStreamEvent(threadRunRequiresAction = threadRunRequiresAction) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ @JvmStatic @@ -439,22 +443,22 @@ private constructor( RunStreamEvent(threadRunCompleted = 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`. */ @JvmStatic fun ofThreadRunIncomplete(threadRunIncomplete: ThreadRunIncomplete) = RunStreamEvent(threadRunIncomplete = 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. */ @JvmStatic fun ofThreadRunFailed(threadRunFailed: ThreadRunFailed) = RunStreamEvent(threadRunFailed = threadRunFailed) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `cancelling` status. */ @JvmStatic @@ -462,7 +466,7 @@ private constructor( RunStreamEvent(threadRunCancelling = threadRunCancelling) /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ @JvmStatic @@ -470,7 +474,7 @@ private constructor( RunStreamEvent(threadRunCancelled = 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. */ @JvmStatic fun ofThreadRunExpired(threadRunExpired: ThreadRunExpired) = @@ -483,60 +487,60 @@ private constructor( interface Visitor { /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ fun visitThreadRunCreated(threadRunCreated: ThreadRunCreated): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `queued` status. */ fun visitThreadRunQueued(threadRunQueued: ThreadRunQueued): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * an `in_progress` status. */ fun visitThreadRunInProgress(threadRunInProgress: ThreadRunInProgress): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `requires_action` status. */ fun visitThreadRunRequiresAction(threadRunRequiresAction: ThreadRunRequiresAction): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * completed. */ fun visitThreadRunCompleted(threadRunCompleted: ThreadRunCompleted): T /** - * 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`. */ fun visitThreadRunIncomplete(threadRunIncomplete: ThreadRunIncomplete): T /** - * 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. */ fun visitThreadRunFailed(threadRunFailed: ThreadRunFailed): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to * a `cancelling` status. */ fun visitThreadRunCancelling(threadRunCancelling: ThreadRunCancelling): T /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) is * cancelled. */ fun visitThreadRunCancelled(threadRunCancelled: ThreadRunCancelled): T /** - * 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. */ fun visitThreadRunExpired(threadRunExpired: ThreadRunExpired): T @@ -647,7 +651,7 @@ private constructor( } /** - * Occurs when a new [run](https://platform.openai.com/docs/api-reference/runs/object) is + * Occurs when a new [run](https://developers.openai.com/api/docs/assistants/migration) is * created. */ class ThreadRunCreated @@ -666,7 +670,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -732,7 +736,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -862,7 +866,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `queued` status. */ class ThreadRunQueued @@ -881,7 +885,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -947,7 +951,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -1077,7 +1081,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to an + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to an * `in_progress` status. */ class ThreadRunInProgress @@ -1096,7 +1100,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1162,7 +1166,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -1292,7 +1296,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `requires_action` status. */ class ThreadRunRequiresAction @@ -1311,7 +1315,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1377,7 +1381,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -1507,7 +1511,8 @@ private constructor( } /** - * 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. */ class ThreadRunCompleted @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -1525,7 +1530,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1591,7 +1596,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -1721,7 +1726,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) ends with + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) ends with * status `incomplete`. */ class ThreadRunIncomplete @@ -1740,7 +1745,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1806,7 +1811,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -1935,7 +1940,7 @@ private constructor( "ThreadRunIncomplete{data=$data, event=$event, additionalProperties=$additionalProperties}" } - /** 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. */ class ThreadRunFailed @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( @@ -1952,7 +1957,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2018,7 +2023,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2148,7 +2153,7 @@ private constructor( } /** - * Occurs when a [run](https://platform.openai.com/docs/api-reference/runs/object) moves to a + * Occurs when a [run](https://developers.openai.com/api/docs/assistants/migration) moves to a * `cancelling` status. */ class ThreadRunCancelling @@ -2167,7 +2172,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2233,7 +2238,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2363,7 +2368,8 @@ private constructor( } /** - * 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. */ class ThreadRunCancelled @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -2381,7 +2387,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2447,7 +2453,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) @@ -2576,7 +2582,7 @@ private constructor( "ThreadRunCancelled{data=$data, event=$event, additionalProperties=$additionalProperties}" } - /** 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. */ class ThreadRunExpired @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( @@ -2593,7 +2599,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2659,7 +2665,7 @@ private constructor( /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Run) = data(JsonField.of(data)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/ThreadStreamEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/ThreadStreamEvent.kt index 7b23403ab..133ab5898 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/ThreadStreamEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/ThreadStreamEvent.kt @@ -19,7 +19,7 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * Occurs when a new [thread](https://platform.openai.com/docs/api-reference/threads/object) is + * Occurs when a new [thread](https://developers.openai.com/api/docs/assistants/migration) is * created. */ class ThreadStreamEvent @@ -40,7 +40,7 @@ private constructor( /** * Represents a thread that contains - * [messages](https://platform.openai.com/docs/api-reference/messages). + * [messages](https://developers.openai.com/api/docs/assistants/migration). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -123,7 +123,7 @@ private constructor( /** * Represents a thread that contains - * [messages](https://platform.openai.com/docs/api-reference/messages). + * [messages](https://developers.openai.com/api/docs/assistants/migration). */ fun data(data: Thread) = data(JsonField.of(data)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerTool.kt index 518edbf9f..ba43c9059 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerTool.kt @@ -15,7 +15,7 @@ import java.util.Objects /** * 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). */ class BetaComputerTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerUsePreviewTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerUsePreviewTool.kt index 533187d48..8c4852d85 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerUsePreviewTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaComputerUsePreviewTool.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaComputerUsePreviewTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaCustomTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaCustomTool.kt index 89d62aacd..3e9dc2781 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaCustomTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaCustomTool.kt @@ -32,7 +32,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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) */ class BetaCustomTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFileSearchTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFileSearchTool.kt index 4d6bc416f..566cea6ad 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFileSearchTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFileSearchTool.kt @@ -33,7 +33,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaFileSearchTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFunctionTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFunctionTool.kt index 36439f7cf..310ae14f6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFunctionTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaFunctionTool.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaFunctionTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaNamespaceTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaNamespaceTool.kt index 44b1e7899..44a794187 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaNamespaceTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaNamespaceTool.kt @@ -344,7 +344,7 @@ private constructor( /** * 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) */ fun custom(): Optional = Optional.ofNullable(custom) @@ -356,7 +356,7 @@ private constructor( /** * 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) */ fun asCustom(): BetaCustomTool = custom.getOrThrow("custom") @@ -478,7 +478,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofCustom(custom: BetaCustomTool) = Tool(custom = custom) } @@ -490,7 +490,7 @@ private constructor( /** * 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) */ fun visitCustom(custom: BetaCustomTool): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponse.kt index 66b2c85e4..189abd2ad 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponse.kt @@ -263,8 +263,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -329,16 +329,16 @@ private constructor( * * 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). + * 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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can + * also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -359,7 +359,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -387,7 +387,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -416,8 +416,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -427,7 +427,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -446,7 +446,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -468,7 +468,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -488,7 +488,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -500,7 +500,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -513,12 +513,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. @@ -545,8 +545,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -590,7 +590,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1113,7 +1113,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ fun model(model: Model) = model(JsonField.of(model)) @@ -1501,16 +1501,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -1679,7 +1679,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = background(JsonField.ofNullable(background)) @@ -1752,7 +1752,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = maxOutputTokens(JsonField.ofNullable(maxOutputTokens)) @@ -1826,8 +1826,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = previousResponseId(JsonField.ofNullable(previousResponseId)) @@ -1851,7 +1851,7 @@ private constructor( /** * 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). */ fun prompt(prompt: BetaResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -1912,7 +1912,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = promptCacheKey(JsonField.ofNullable(promptCacheKey)) @@ -1955,7 +1955,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -1992,7 +1992,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -2013,7 +2013,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = safetyIdentifier(JsonField.ofNullable(safetyIdentifier)) @@ -2039,12 +2039,12 @@ private constructor( * 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`. @@ -2088,8 +2088,8 @@ private constructor( /** * 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) */ fun text(text: BetaResponseTextConfig) = text(JsonField.of(text)) @@ -2170,7 +2170,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = user(JsonField.of(user)) @@ -3042,8 +3042,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -3826,7 +3826,7 @@ private constructor( /** * 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). */ fun betaToolChoiceTypes(): Optional = Optional.ofNullable(betaToolChoiceTypes) @@ -3892,7 +3892,7 @@ private constructor( /** * 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). */ fun asBetaToolChoiceTypes(): BetaToolChoiceTypes = betaToolChoiceTypes.getOrThrow("betaToolChoiceTypes") @@ -4196,7 +4196,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes) = @@ -4259,7 +4259,7 @@ private constructor( /** * 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). */ fun visitBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes): T @@ -8709,7 +8709,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -8863,7 +8863,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ class Reasoning @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -8905,8 +8905,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -9052,7 +9052,7 @@ private constructor( * `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. */ fun effort(effort: Effort?) = effort(JsonField.ofNullable(effort)) @@ -9383,8 +9383,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ class Effort @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -10035,12 +10035,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItem.kt index 73b8bed3f..917e2d2a9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItem.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaResponseCompactionItem @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItemParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItemParam.kt index 4d47f9e33..e45d166cf 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItemParam.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCompactionItemParam.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaResponseCompactionItemParam @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseComputerToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseComputerToolCall.kt index 5a105e08d..aece3e5f8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseComputerToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseComputerToolCall.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * A tool call to a computer use tool. See the - * [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more + * [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more * information. */ class BetaResponseComputerToolCall diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseContent.kt index dcc9c907d..320539984 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseContent.kt @@ -46,7 +46,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -79,7 +79,7 @@ private constructor( /** * 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). */ fun asInputImage(): BetaResponseInputImage = inputImage.getOrThrow("inputImage") @@ -257,7 +257,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImage) = @@ -295,7 +295,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: BetaResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCustomToolCallOutput.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCustomToolCallOutput.kt index bfd48a787..5fbcc3ef8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCustomToolCallOutput.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseCustomToolCallOutput.kt @@ -632,7 +632,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -650,7 +650,7 @@ private constructor( /** * 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). */ fun asInputImage(): BetaResponseInputImage = inputImage.getOrThrow("inputImage") @@ -796,7 +796,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImage) = @@ -819,7 +819,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: BetaResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFileSearchToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFileSearchToolCall.kt index afc8405d8..0c697ce71 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFileSearchToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFileSearchToolCall.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ class BetaResponseFileSearchToolCall diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextConfig.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextConfig.kt index 7dc4526aa..b1e72e2d9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextConfig.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextConfig.kt @@ -23,7 +23,7 @@ import kotlin.jvm.optionals.getOrNull * * 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. * @@ -47,7 +47,7 @@ private constructor( /** * 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). */ fun jsonSchema(): Optional = Optional.ofNullable(jsonSchema) @@ -70,7 +70,7 @@ private constructor( /** * 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). */ fun asJsonSchema(): BetaResponseFormatTextJsonSchemaConfig = jsonSchema.getOrThrow("jsonSchema") @@ -225,7 +225,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofJsonSchema(jsonSchema: BetaResponseFormatTextJsonSchemaConfig) = @@ -254,7 +254,7 @@ private constructor( /** * 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). */ fun visitJsonSchema(jsonSchema: BetaResponseFormatTextJsonSchemaConfig): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextJsonSchemaConfig.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextJsonSchemaConfig.kt index ab9402917..24cd47feb 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextJsonSchemaConfig.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFormatTextJsonSchemaConfig.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaResponseFormatTextJsonSchemaConfig @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -88,7 +88,7 @@ private constructor( * 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://platform.openai.com/docs/guides/structured-outputs). + * [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -234,7 +234,7 @@ private constructor( * 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://platform.openai.com/docs/guides/structured-outputs). + * [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). */ fun strict(strict: Boolean?) = strict(JsonField.ofNullable(strict)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionCallOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionCallOutputItem.kt index 2edd582d1..89c79cee5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionCallOutputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionCallOutputItem.kt @@ -34,7 +34,7 @@ private constructor( /** * 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) */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -52,7 +52,7 @@ private constructor( /** * 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) */ fun asInputImage(): BetaResponseInputImageContent = inputImage.getOrThrow("inputImage") @@ -192,7 +192,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImageContent) = @@ -215,7 +215,7 @@ private constructor( /** * 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) */ fun visitInputImage(inputImage: BetaResponseInputImageContent): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCall.kt index 0e6fb65d5..04e84a6ab 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCall.kt @@ -30,7 +30,7 @@ import kotlin.jvm.optionals.getOrNull /** * A tool call to run a function. See the - * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more * information. */ class BetaResponseFunctionToolCall diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallItem.kt index 5afe0fd8f..0e678904d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallItem.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * A tool call to run a function. See the - * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more * information. */ class BetaResponseFunctionToolCallItem diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallOutputItem.kt index 47e80a5b8..679050849 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallOutputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionToolCallOutputItem.kt @@ -785,7 +785,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -803,7 +803,7 @@ private constructor( /** * 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). */ fun asInputImage(): BetaResponseInputImage = inputImage.getOrThrow("inputImage") @@ -949,7 +949,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImage) = @@ -972,7 +972,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: BetaResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionWebSearch.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionWebSearch.kt index c446ddbea..e8bb140e0 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionWebSearch.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseFunctionWebSearch.kt @@ -32,7 +32,7 @@ import kotlin.jvm.optionals.getOrNull /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ class BetaResponseFunctionWebSearch diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputContent.kt index d938724c0..907bdd658 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputContent.kt @@ -34,7 +34,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -52,7 +52,7 @@ private constructor( /** * 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). */ fun asInputImage(): BetaResponseInputImage = inputImage.getOrThrow("inputImage") @@ -190,7 +190,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImage) = @@ -213,7 +213,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: BetaResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImage.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImage.kt index 539d04eb1..e057836ba 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImage.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaResponseInputImage @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImageContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImageContent.kt index a8432a24e..0dfc27f6c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImageContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputImageContent.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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) */ class BetaResponseInputImageContent @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputItem.kt index 178f13d59..7e280d183 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInputItem.kt @@ -102,7 +102,7 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun fileSearchCall(): Optional = @@ -110,8 +110,8 @@ private constructor( /** * 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. */ fun computerCall(): Optional = Optional.ofNullable(computerCall) @@ -120,7 +120,7 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun webSearchCall(): Optional = @@ -128,8 +128,8 @@ private constructor( /** * 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. */ fun functionCall(): Optional = Optional.ofNullable(functionCall) @@ -162,13 +162,13 @@ private constructor( * 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). */ fun reasoning(): Optional = Optional.ofNullable(reasoning) /** * 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). */ fun compaction(): Optional = Optional.ofNullable(compaction) @@ -324,7 +324,7 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun asFileSearchCall(): BetaResponseFileSearchToolCall = @@ -332,8 +332,8 @@ private constructor( /** * 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. */ fun asComputerCall(): BetaResponseComputerToolCall = computerCall.getOrThrow("computerCall") @@ -343,15 +343,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun asWebSearchCall(): BetaResponseFunctionWebSearch = webSearchCall.getOrThrow("webSearchCall") /** * 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. */ fun asFunctionCall(): BetaResponseFunctionToolCall = functionCall.getOrThrow("functionCall") @@ -385,13 +385,13 @@ private constructor( * 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). */ fun asReasoning(): BetaResponseReasoningItem = reasoning.getOrThrow("reasoning") /** * 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). */ fun asCompaction(): BetaResponseCompactionItemParam = compaction.getOrThrow("compaction") @@ -996,8 +996,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFileSearchCall(fileSearchCall: BetaResponseFileSearchToolCall) = @@ -1005,8 +1005,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofComputerCall(computerCall: BetaResponseComputerToolCall) = @@ -1019,8 +1019,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofWebSearchCall(webSearchCall: BetaResponseFunctionWebSearch) = @@ -1028,8 +1028,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFunctionCall(functionCall: BetaResponseFunctionToolCall) = @@ -1077,7 +1077,7 @@ private constructor( * 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). */ @JvmStatic fun ofReasoning(reasoning: BetaResponseReasoningItem) = @@ -1085,7 +1085,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofCompaction(compaction: BetaResponseCompactionItemParam) = @@ -1203,15 +1203,15 @@ private constructor( /** * 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. */ fun visitFileSearchCall(fileSearchCall: BetaResponseFileSearchToolCall): T /** * 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. */ fun visitComputerCall(computerCall: BetaResponseComputerToolCall): T @@ -1220,15 +1220,15 @@ private constructor( /** * 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. */ fun visitWebSearchCall(webSearchCall: BetaResponseFunctionWebSearch): T /** * 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. */ fun visitFunctionCall(functionCall: BetaResponseFunctionToolCall): T @@ -1260,13 +1260,13 @@ private constructor( * 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). */ fun visitReasoning(reasoning: BetaResponseReasoningItem): T /** * 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). */ fun visitCompaction(compaction: BetaResponseCompactionItemParam): T @@ -5622,7 +5622,7 @@ private constructor( /** * 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) */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -5643,7 +5643,7 @@ private constructor( /** * 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) */ fun asInputImage(): BetaResponseInputImageContent = inputImage.getOrThrow("inputImage") @@ -5789,7 +5789,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImageContent) = @@ -5814,7 +5814,7 @@ private constructor( /** * 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) */ fun visitInputImage(inputImage: BetaResponseInputImageContent): T @@ -10882,8 +10882,12 @@ private constructor( private val result: JsonField, private val status: JsonField, private val type: JsonValue, + private val action: JsonField, private val agent: JsonField, + private val background: JsonField, + private val outputFormat: JsonField, private val quality: JsonField, + private val revisedPrompt: JsonField, private val size: JsonField, private val additionalProperties: MutableMap, ) { @@ -10894,10 +10898,33 @@ private constructor( @JsonProperty("result") @ExcludeMissing result: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), @JsonProperty("agent") @ExcludeMissing agent: JsonField = JsonMissing.of(), + @JsonProperty("background") + @ExcludeMissing + background: JsonField = JsonMissing.of(), + @JsonProperty("output_format") + @ExcludeMissing + outputFormat: JsonField = JsonMissing.of(), @JsonProperty("quality") @ExcludeMissing quality: JsonField = JsonMissing.of(), + @JsonProperty("revised_prompt") + @ExcludeMissing + revisedPrompt: JsonField = JsonMissing.of(), @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), - ) : this(id, result, status, type, agent, quality, size, mutableMapOf()) + ) : this( + id, + result, + status, + type, + action, + agent, + background, + outputFormat, + quality, + revisedPrompt, + size, + mutableMapOf(), + ) /** * The unique ID of the image generation call. @@ -10936,6 +10963,14 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * The action used for image generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + /** * The agent that produced this item. * @@ -10944,6 +10979,22 @@ private constructor( */ fun agent(): Optional = agent.getOptional("agent") + /** + * The background setting used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun background(): Optional = background.getOptional("background") + + /** + * The output format used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun outputFormat(): Optional = outputFormat.getOptional("output_format") + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -10953,6 +11004,14 @@ private constructor( */ fun quality(): Optional = quality.getOptional("quality") + /** + * The prompt that was used after any model prompt rewriting. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun revisedPrompt(): Optional = revisedPrompt.getOptional("revised_prompt") + /** * The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. * @@ -10982,6 +11041,13 @@ private constructor( */ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + /** * Returns the raw JSON value of [agent]. * @@ -10989,6 +11055,25 @@ private constructor( */ @JsonProperty("agent") @ExcludeMissing fun _agent(): JsonField = agent + /** + * Returns the raw JSON value of [background]. + * + * Unlike [background], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("background") + @ExcludeMissing + fun _background(): JsonField = background + + /** + * Returns the raw JSON value of [outputFormat]. + * + * Unlike [outputFormat], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_format") + @ExcludeMissing + fun _outputFormat(): JsonField = outputFormat + /** * Returns the raw JSON value of [quality]. * @@ -10996,6 +11081,16 @@ private constructor( */ @JsonProperty("quality") @ExcludeMissing fun _quality(): JsonField = quality + /** + * Returns the raw JSON value of [revisedPrompt]. + * + * Unlike [revisedPrompt], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("revised_prompt") + @ExcludeMissing + fun _revisedPrompt(): JsonField = revisedPrompt + /** * Returns the raw JSON value of [size]. * @@ -11037,8 +11132,12 @@ private constructor( private var result: JsonField? = null private var status: JsonField? = null private var type: JsonValue = JsonValue.from("image_generation_call") + private var action: JsonField = JsonMissing.of() private var agent: JsonField = JsonMissing.of() + private var background: JsonField = JsonMissing.of() + private var outputFormat: JsonField = JsonMissing.of() private var quality: JsonField = JsonMissing.of() + private var revisedPrompt: JsonField = JsonMissing.of() private var size: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -11048,8 +11147,12 @@ private constructor( result = imageGenerationCall.result status = imageGenerationCall.status type = imageGenerationCall.type + action = imageGenerationCall.action agent = imageGenerationCall.agent + background = imageGenerationCall.background + outputFormat = imageGenerationCall.outputFormat quality = imageGenerationCall.quality + revisedPrompt = imageGenerationCall.revisedPrompt size = imageGenerationCall.size additionalProperties = imageGenerationCall.additionalProperties.toMutableMap() } @@ -11107,6 +11210,21 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** The action used for image generation. */ + fun action(action: Action?) = action(JsonField.ofNullable(action)) + + /** Alias for calling [Builder.action] with `action.orElse(null)`. */ + fun action(action: Optional) = action(action.getOrNull()) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + /** The agent that produced this item. */ fun agent(agent: Agent?) = agent(JsonField.ofNullable(agent)) @@ -11122,6 +11240,42 @@ private constructor( */ fun agent(agent: JsonField) = apply { this.agent = agent } + /** The background setting used for generation. */ + fun background(background: Background?) = background(JsonField.ofNullable(background)) + + /** Alias for calling [Builder.background] with `background.orElse(null)`. */ + fun background(background: Optional) = background(background.getOrNull()) + + /** + * Sets [Builder.background] to an arbitrary JSON value. + * + * You should usually call [Builder.background] with a well-typed [Background] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun background(background: JsonField) = apply { + this.background = background + } + + /** The output format used for generation. */ + fun outputFormat(outputFormat: OutputFormat?) = + outputFormat(JsonField.ofNullable(outputFormat)) + + /** Alias for calling [Builder.outputFormat] with `outputFormat.orElse(null)`. */ + fun outputFormat(outputFormat: Optional) = + outputFormat(outputFormat.getOrNull()) + + /** + * Sets [Builder.outputFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.outputFormat] with a well-typed [OutputFormat] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputFormat(outputFormat: JsonField) = apply { + this.outputFormat = outputFormat + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -11140,6 +11294,25 @@ private constructor( */ fun quality(quality: JsonField) = apply { this.quality = quality } + /** The prompt that was used after any model prompt rewriting. */ + fun revisedPrompt(revisedPrompt: String?) = + revisedPrompt(JsonField.ofNullable(revisedPrompt)) + + /** Alias for calling [Builder.revisedPrompt] with `revisedPrompt.orElse(null)`. */ + fun revisedPrompt(revisedPrompt: Optional) = + revisedPrompt(revisedPrompt.getOrNull()) + + /** + * Sets [Builder.revisedPrompt] to an arbitrary JSON value. + * + * You should usually call [Builder.revisedPrompt] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun revisedPrompt(revisedPrompt: JsonField) = apply { + this.revisedPrompt = revisedPrompt + } + /** The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. */ fun size(size: Size?) = size(JsonField.ofNullable(size)) @@ -11202,8 +11375,12 @@ private constructor( checkRequired("result", result), checkRequired("status", status), type, + action, agent, + background, + outputFormat, quality, + revisedPrompt, size, additionalProperties.toMutableMap(), ) @@ -11233,8 +11410,12 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } agent().ifPresent { it.validate() } + background().ifPresent { it.validate() } + outputFormat().ifPresent { it.validate() } quality().ifPresent { it.validate() } + revisedPrompt() size() validated = true } @@ -11259,8 +11440,12 @@ private constructor( (if (result.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + type.let { if (it == JsonValue.from("image_generation_call")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + (agent.asKnown().getOrNull()?.validity() ?: 0) + + (background.asKnown().getOrNull()?.validity() ?: 0) + + (outputFormat.asKnown().getOrNull()?.validity() ?: 0) + (quality.asKnown().getOrNull()?.validity() ?: 0) + + (if (revisedPrompt.asKnown().isPresent) 1 else 0) + (if (size.asKnown().isPresent) 1 else 0) /** The status of the image generation call. */ @@ -11415,6 +11600,152 @@ private constructor( override fun toString() = value.toString() } + /** The action used for image generation. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** The agent that produced this item. */ class Agent @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -11595,6 +11926,302 @@ private constructor( "Agent{agentName=$agentName, additionalProperties=$additionalProperties}" } + /** The background setting used for generation. */ + class Background @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val TRANSPARENT = of("transparent") + + @JvmField val OPAQUE = of("opaque") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Background(JsonField.of(value)) + } + + /** An enum containing [Background]'s known values. */ + enum class Known { + TRANSPARENT, + OPAQUE, + AUTO, + } + + /** + * An enum containing [Background]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Background] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + TRANSPARENT, + OPAQUE, + AUTO, + /** + * An enum member indicating that [Background] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + TRANSPARENT -> Value.TRANSPARENT + OPAQUE -> Value.OPAQUE + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + TRANSPARENT -> Known.TRANSPARENT + OPAQUE -> Known.OPAQUE + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Background: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Background = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Background && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The output format used for generation. */ + class OutputFormat @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PNG = of("png") + + @JvmField val WEBP = of("webp") + + @JvmField val JPEG = of("jpeg") + + @JvmStatic fun of(value: String) = OutputFormat(JsonField.of(value)) + } + + /** An enum containing [OutputFormat]'s known values. */ + enum class Known { + PNG, + WEBP, + JPEG, + } + + /** + * An enum containing [OutputFormat]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [OutputFormat] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PNG, + WEBP, + JPEG, + /** + * An enum member indicating that [OutputFormat] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PNG -> Value.PNG + WEBP -> Value.WEBP + JPEG -> Value.JPEG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PNG -> Known.PNG + WEBP -> Known.WEBP + JPEG -> Known.JPEG + else -> throw OpenAIInvalidDataException("Unknown OutputFormat: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): OutputFormat = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is OutputFormat && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -11917,20 +12544,37 @@ private constructor( result == other.result && status == other.status && type == other.type && + action == other.action && agent == other.agent && + background == other.background && + outputFormat == other.outputFormat && quality == other.quality && + revisedPrompt == other.revisedPrompt && size == other.size && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, result, status, type, agent, quality, size, additionalProperties) + Objects.hash( + id, + result, + status, + type, + action, + agent, + background, + outputFormat, + quality, + revisedPrompt, + size, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, agent=$agent, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, action=$action, agent=$agent, background=$background, outputFormat=$outputFormat, quality=$quality, revisedPrompt=$revisedPrompt, size=$size, additionalProperties=$additionalProperties}" } /** A tool call to run a command on the local shell. */ diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseItem.kt index cb4e9c5f4..fb5681838 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseItem.kt @@ -81,7 +81,7 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun fileSearchCall(): Optional = @@ -89,8 +89,8 @@ private constructor( /** * 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. */ fun computerCall(): Optional = Optional.ofNullable(computerCall) @@ -99,7 +99,7 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun webSearchCall(): Optional = @@ -107,8 +107,8 @@ private constructor( /** * 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. */ fun functionCall(): Optional = Optional.ofNullable(functionCall) @@ -141,7 +141,7 @@ private constructor( * 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). */ fun reasoning(): Optional = Optional.ofNullable(reasoning) @@ -151,7 +151,7 @@ private constructor( /** * 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). */ fun compaction(): Optional = Optional.ofNullable(compaction) @@ -281,7 +281,7 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun asFileSearchCall(): BetaResponseFileSearchToolCall = @@ -289,8 +289,8 @@ private constructor( /** * 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. */ fun asComputerCall(): BetaResponseComputerToolCall = computerCall.getOrThrow("computerCall") @@ -299,15 +299,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun asWebSearchCall(): BetaResponseFunctionWebSearch = webSearchCall.getOrThrow("webSearchCall") /** * 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. */ fun asFunctionCall(): BetaResponseFunctionToolCallItem = functionCall.getOrThrow("functionCall") @@ -339,7 +339,7 @@ private constructor( * 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). */ fun asReasoning(): BetaResponseReasoningItem = reasoning.getOrThrow("reasoning") @@ -349,7 +349,7 @@ private constructor( /** * 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). */ fun asCompaction(): BetaResponseCompactionItem = compaction.getOrThrow("compaction") @@ -916,8 +916,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFileSearchCall(fileSearchCall: BetaResponseFileSearchToolCall) = @@ -925,8 +925,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofComputerCall(computerCall: BetaResponseComputerToolCall) = @@ -938,8 +938,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofWebSearchCall(webSearchCall: BetaResponseFunctionWebSearch) = @@ -947,8 +947,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFunctionCall(functionCall: BetaResponseFunctionToolCallItem) = @@ -994,7 +994,7 @@ private constructor( * 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). */ @JvmStatic fun ofReasoning(reasoning: BetaResponseReasoningItem) = @@ -1008,7 +1008,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofCompaction(compaction: BetaResponseCompactionItem) = @@ -1098,15 +1098,15 @@ private constructor( /** * 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. */ fun visitFileSearchCall(fileSearchCall: BetaResponseFileSearchToolCall): T /** * 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. */ fun visitComputerCall(computerCall: BetaResponseComputerToolCall): T @@ -1114,15 +1114,15 @@ private constructor( /** * 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. */ fun visitWebSearchCall(webSearchCall: BetaResponseFunctionWebSearch): T /** * 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. */ fun visitFunctionCall(functionCall: BetaResponseFunctionToolCallItem): T @@ -1150,7 +1150,7 @@ private constructor( * 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). */ fun visitReasoning(reasoning: BetaResponseReasoningItem): T @@ -1160,7 +1160,7 @@ private constructor( /** * 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). */ fun visitCompaction(compaction: BetaResponseCompactionItem): T @@ -2007,7 +2007,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -2063,7 +2063,7 @@ private constructor( /** * 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). */ fun asInputImage(): BetaResponseInputImage = inputImage.getOrThrow("inputImage") @@ -2321,7 +2321,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImage) = @@ -2370,7 +2370,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: BetaResponseInputImage): T @@ -7729,8 +7729,12 @@ private constructor( private val result: JsonField, private val status: JsonField, private val type: JsonValue, + private val action: JsonField, private val agent: JsonField, + private val background: JsonField, + private val outputFormat: JsonField, private val quality: JsonField, + private val revisedPrompt: JsonField, private val size: JsonField, private val additionalProperties: MutableMap, ) { @@ -7741,10 +7745,33 @@ private constructor( @JsonProperty("result") @ExcludeMissing result: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), @JsonProperty("agent") @ExcludeMissing agent: JsonField = JsonMissing.of(), + @JsonProperty("background") + @ExcludeMissing + background: JsonField = JsonMissing.of(), + @JsonProperty("output_format") + @ExcludeMissing + outputFormat: JsonField = JsonMissing.of(), @JsonProperty("quality") @ExcludeMissing quality: JsonField = JsonMissing.of(), + @JsonProperty("revised_prompt") + @ExcludeMissing + revisedPrompt: JsonField = JsonMissing.of(), @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), - ) : this(id, result, status, type, agent, quality, size, mutableMapOf()) + ) : this( + id, + result, + status, + type, + action, + agent, + background, + outputFormat, + quality, + revisedPrompt, + size, + mutableMapOf(), + ) /** * The unique ID of the image generation call. @@ -7783,6 +7810,14 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * The action used for image generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + /** * The agent that produced this item. * @@ -7791,6 +7826,22 @@ private constructor( */ fun agent(): Optional = agent.getOptional("agent") + /** + * The background setting used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun background(): Optional = background.getOptional("background") + + /** + * The output format used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun outputFormat(): Optional = outputFormat.getOptional("output_format") + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -7800,6 +7851,14 @@ private constructor( */ fun quality(): Optional = quality.getOptional("quality") + /** + * The prompt that was used after any model prompt rewriting. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun revisedPrompt(): Optional = revisedPrompt.getOptional("revised_prompt") + /** * The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. * @@ -7829,6 +7888,13 @@ private constructor( */ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + /** * Returns the raw JSON value of [agent]. * @@ -7836,6 +7902,25 @@ private constructor( */ @JsonProperty("agent") @ExcludeMissing fun _agent(): JsonField = agent + /** + * Returns the raw JSON value of [background]. + * + * Unlike [background], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("background") + @ExcludeMissing + fun _background(): JsonField = background + + /** + * Returns the raw JSON value of [outputFormat]. + * + * Unlike [outputFormat], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_format") + @ExcludeMissing + fun _outputFormat(): JsonField = outputFormat + /** * Returns the raw JSON value of [quality]. * @@ -7843,6 +7928,16 @@ private constructor( */ @JsonProperty("quality") @ExcludeMissing fun _quality(): JsonField = quality + /** + * Returns the raw JSON value of [revisedPrompt]. + * + * Unlike [revisedPrompt], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("revised_prompt") + @ExcludeMissing + fun _revisedPrompt(): JsonField = revisedPrompt + /** * Returns the raw JSON value of [size]. * @@ -7884,8 +7979,12 @@ private constructor( private var result: JsonField? = null private var status: JsonField? = null private var type: JsonValue = JsonValue.from("image_generation_call") + private var action: JsonField = JsonMissing.of() private var agent: JsonField = JsonMissing.of() + private var background: JsonField = JsonMissing.of() + private var outputFormat: JsonField = JsonMissing.of() private var quality: JsonField = JsonMissing.of() + private var revisedPrompt: JsonField = JsonMissing.of() private var size: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -7895,8 +7994,12 @@ private constructor( result = imageGenerationCall.result status = imageGenerationCall.status type = imageGenerationCall.type + action = imageGenerationCall.action agent = imageGenerationCall.agent + background = imageGenerationCall.background + outputFormat = imageGenerationCall.outputFormat quality = imageGenerationCall.quality + revisedPrompt = imageGenerationCall.revisedPrompt size = imageGenerationCall.size additionalProperties = imageGenerationCall.additionalProperties.toMutableMap() } @@ -7954,6 +8057,21 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** The action used for image generation. */ + fun action(action: Action?) = action(JsonField.ofNullable(action)) + + /** Alias for calling [Builder.action] with `action.orElse(null)`. */ + fun action(action: Optional) = action(action.getOrNull()) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + /** The agent that produced this item. */ fun agent(agent: Agent?) = agent(JsonField.ofNullable(agent)) @@ -7969,6 +8087,42 @@ private constructor( */ fun agent(agent: JsonField) = apply { this.agent = agent } + /** The background setting used for generation. */ + fun background(background: Background?) = background(JsonField.ofNullable(background)) + + /** Alias for calling [Builder.background] with `background.orElse(null)`. */ + fun background(background: Optional) = background(background.getOrNull()) + + /** + * Sets [Builder.background] to an arbitrary JSON value. + * + * You should usually call [Builder.background] with a well-typed [Background] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun background(background: JsonField) = apply { + this.background = background + } + + /** The output format used for generation. */ + fun outputFormat(outputFormat: OutputFormat?) = + outputFormat(JsonField.ofNullable(outputFormat)) + + /** Alias for calling [Builder.outputFormat] with `outputFormat.orElse(null)`. */ + fun outputFormat(outputFormat: Optional) = + outputFormat(outputFormat.getOrNull()) + + /** + * Sets [Builder.outputFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.outputFormat] with a well-typed [OutputFormat] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputFormat(outputFormat: JsonField) = apply { + this.outputFormat = outputFormat + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -7987,6 +8141,25 @@ private constructor( */ fun quality(quality: JsonField) = apply { this.quality = quality } + /** The prompt that was used after any model prompt rewriting. */ + fun revisedPrompt(revisedPrompt: String?) = + revisedPrompt(JsonField.ofNullable(revisedPrompt)) + + /** Alias for calling [Builder.revisedPrompt] with `revisedPrompt.orElse(null)`. */ + fun revisedPrompt(revisedPrompt: Optional) = + revisedPrompt(revisedPrompt.getOrNull()) + + /** + * Sets [Builder.revisedPrompt] to an arbitrary JSON value. + * + * You should usually call [Builder.revisedPrompt] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun revisedPrompt(revisedPrompt: JsonField) = apply { + this.revisedPrompt = revisedPrompt + } + /** The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. */ fun size(size: Size?) = size(JsonField.ofNullable(size)) @@ -8049,8 +8222,12 @@ private constructor( checkRequired("result", result), checkRequired("status", status), type, + action, agent, + background, + outputFormat, quality, + revisedPrompt, size, additionalProperties.toMutableMap(), ) @@ -8080,8 +8257,12 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } agent().ifPresent { it.validate() } + background().ifPresent { it.validate() } + outputFormat().ifPresent { it.validate() } quality().ifPresent { it.validate() } + revisedPrompt() size() validated = true } @@ -8106,8 +8287,12 @@ private constructor( (if (result.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + type.let { if (it == JsonValue.from("image_generation_call")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + (agent.asKnown().getOrNull()?.validity() ?: 0) + + (background.asKnown().getOrNull()?.validity() ?: 0) + + (outputFormat.asKnown().getOrNull()?.validity() ?: 0) + (quality.asKnown().getOrNull()?.validity() ?: 0) + + (if (revisedPrompt.asKnown().isPresent) 1 else 0) + (if (size.asKnown().isPresent) 1 else 0) /** The status of the image generation call. */ @@ -8262,6 +8447,152 @@ private constructor( override fun toString() = value.toString() } + /** The action used for image generation. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** The agent that produced this item. */ class Agent @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -8442,6 +8773,302 @@ private constructor( "Agent{agentName=$agentName, additionalProperties=$additionalProperties}" } + /** The background setting used for generation. */ + class Background @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val TRANSPARENT = of("transparent") + + @JvmField val OPAQUE = of("opaque") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Background(JsonField.of(value)) + } + + /** An enum containing [Background]'s known values. */ + enum class Known { + TRANSPARENT, + OPAQUE, + AUTO, + } + + /** + * An enum containing [Background]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Background] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + TRANSPARENT, + OPAQUE, + AUTO, + /** + * An enum member indicating that [Background] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + TRANSPARENT -> Value.TRANSPARENT + OPAQUE -> Value.OPAQUE + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + TRANSPARENT -> Known.TRANSPARENT + OPAQUE -> Known.OPAQUE + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Background: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Background = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Background && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The output format used for generation. */ + class OutputFormat @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PNG = of("png") + + @JvmField val WEBP = of("webp") + + @JvmField val JPEG = of("jpeg") + + @JvmStatic fun of(value: String) = OutputFormat(JsonField.of(value)) + } + + /** An enum containing [OutputFormat]'s known values. */ + enum class Known { + PNG, + WEBP, + JPEG, + } + + /** + * An enum containing [OutputFormat]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [OutputFormat] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PNG, + WEBP, + JPEG, + /** + * An enum member indicating that [OutputFormat] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PNG -> Value.PNG + WEBP -> Value.WEBP + JPEG -> Value.JPEG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PNG -> Known.PNG + WEBP -> Known.WEBP + JPEG -> Known.JPEG + else -> throw OpenAIInvalidDataException("Unknown OutputFormat: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): OutputFormat = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is OutputFormat && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -8764,20 +9391,37 @@ private constructor( result == other.result && status == other.status && type == other.type && + action == other.action && agent == other.agent && + background == other.background && + outputFormat == other.outputFormat && quality == other.quality && + revisedPrompt == other.revisedPrompt && size == other.size && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, result, status, type, agent, quality, size, additionalProperties) + Objects.hash( + id, + result, + status, + type, + action, + agent, + background, + outputFormat, + quality, + revisedPrompt, + size, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, agent=$agent, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, action=$action, agent=$agent, background=$background, outputFormat=$outputFormat, quality=$quality, revisedPrompt=$revisedPrompt, size=$size, additionalProperties=$additionalProperties}" } /** A tool call to run a command on the local shell. */ diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseOutputItem.kt index 831b34ce3..4f8444f8f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseOutputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseOutputItem.kt @@ -74,7 +74,7 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun fileSearchCall(): Optional = @@ -82,8 +82,8 @@ private constructor( /** * 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. */ fun functionCall(): Optional = Optional.ofNullable(functionCall) @@ -99,7 +99,7 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun webSearchCall(): Optional = @@ -107,8 +107,8 @@ private constructor( /** * 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. */ fun computerCall(): Optional = Optional.ofNullable(computerCall) @@ -119,7 +119,7 @@ private constructor( * 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). */ fun reasoning(): Optional = Optional.ofNullable(reasoning) @@ -136,7 +136,7 @@ private constructor( /** * 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). */ fun compaction(): Optional = Optional.ofNullable(compaction) @@ -257,7 +257,7 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun asFileSearchCall(): BetaResponseFileSearchToolCall = @@ -265,8 +265,8 @@ private constructor( /** * 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. */ fun asFunctionCall(): BetaResponseFunctionToolCall = functionCall.getOrThrow("functionCall") @@ -282,15 +282,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun asWebSearchCall(): BetaResponseFunctionWebSearch = webSearchCall.getOrThrow("webSearchCall") /** * 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. */ fun asComputerCall(): BetaResponseComputerToolCall = computerCall.getOrThrow("computerCall") @@ -301,7 +301,7 @@ private constructor( * 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). */ fun asReasoning(): BetaResponseReasoningItem = reasoning.getOrThrow("reasoning") @@ -318,7 +318,7 @@ private constructor( /** * 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). */ fun asCompaction(): BetaResponseCompactionItem = compaction.getOrThrow("compaction") @@ -845,8 +845,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFileSearchCall(fileSearchCall: BetaResponseFileSearchToolCall) = @@ -854,8 +854,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFunctionCall(functionCall: BetaResponseFunctionToolCall) = @@ -879,8 +879,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofWebSearchCall(webSearchCall: BetaResponseFunctionWebSearch) = @@ -888,8 +888,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofComputerCall(computerCall: BetaResponseComputerToolCall) = @@ -903,7 +903,7 @@ private constructor( * 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). */ @JvmStatic fun ofReasoning(reasoning: BetaResponseReasoningItem) = @@ -929,7 +929,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofCompaction(compaction: BetaResponseCompactionItem) = @@ -1015,15 +1015,15 @@ private constructor( /** * 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. */ fun visitFileSearchCall(fileSearchCall: BetaResponseFileSearchToolCall): T /** * 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. */ fun visitFunctionCall(functionCall: BetaResponseFunctionToolCall): T @@ -1037,15 +1037,15 @@ private constructor( /** * 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. */ fun visitWebSearchCall(webSearchCall: BetaResponseFunctionWebSearch): T /** * 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. */ fun visitComputerCall(computerCall: BetaResponseComputerToolCall): T @@ -1055,7 +1055,7 @@ private constructor( * 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). */ fun visitReasoning(reasoning: BetaResponseReasoningItem): T @@ -1071,7 +1071,7 @@ private constructor( /** * 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). */ fun visitCompaction(compaction: BetaResponseCompactionItem): T @@ -1880,7 +1880,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -1936,7 +1936,7 @@ private constructor( /** * 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). */ fun asInputImage(): BetaResponseInputImage = inputImage.getOrThrow("inputImage") @@ -2194,7 +2194,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImage) = @@ -2243,7 +2243,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: BetaResponseInputImage): T @@ -7602,8 +7602,12 @@ private constructor( private val result: JsonField, private val status: JsonField, private val type: JsonValue, + private val action: JsonField, private val agent: JsonField, + private val background: JsonField, + private val outputFormat: JsonField, private val quality: JsonField, + private val revisedPrompt: JsonField, private val size: JsonField, private val additionalProperties: MutableMap, ) { @@ -7614,10 +7618,33 @@ private constructor( @JsonProperty("result") @ExcludeMissing result: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), @JsonProperty("agent") @ExcludeMissing agent: JsonField = JsonMissing.of(), + @JsonProperty("background") + @ExcludeMissing + background: JsonField = JsonMissing.of(), + @JsonProperty("output_format") + @ExcludeMissing + outputFormat: JsonField = JsonMissing.of(), @JsonProperty("quality") @ExcludeMissing quality: JsonField = JsonMissing.of(), + @JsonProperty("revised_prompt") + @ExcludeMissing + revisedPrompt: JsonField = JsonMissing.of(), @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), - ) : this(id, result, status, type, agent, quality, size, mutableMapOf()) + ) : this( + id, + result, + status, + type, + action, + agent, + background, + outputFormat, + quality, + revisedPrompt, + size, + mutableMapOf(), + ) /** * The unique ID of the image generation call. @@ -7656,6 +7683,14 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * The action used for image generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + /** * The agent that produced this item. * @@ -7664,6 +7699,22 @@ private constructor( */ fun agent(): Optional = agent.getOptional("agent") + /** + * The background setting used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun background(): Optional = background.getOptional("background") + + /** + * The output format used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun outputFormat(): Optional = outputFormat.getOptional("output_format") + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -7673,6 +7724,14 @@ private constructor( */ fun quality(): Optional = quality.getOptional("quality") + /** + * The prompt that was used after any model prompt rewriting. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun revisedPrompt(): Optional = revisedPrompt.getOptional("revised_prompt") + /** * The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. * @@ -7702,6 +7761,13 @@ private constructor( */ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + /** * Returns the raw JSON value of [agent]. * @@ -7709,6 +7775,25 @@ private constructor( */ @JsonProperty("agent") @ExcludeMissing fun _agent(): JsonField = agent + /** + * Returns the raw JSON value of [background]. + * + * Unlike [background], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("background") + @ExcludeMissing + fun _background(): JsonField = background + + /** + * Returns the raw JSON value of [outputFormat]. + * + * Unlike [outputFormat], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_format") + @ExcludeMissing + fun _outputFormat(): JsonField = outputFormat + /** * Returns the raw JSON value of [quality]. * @@ -7716,6 +7801,16 @@ private constructor( */ @JsonProperty("quality") @ExcludeMissing fun _quality(): JsonField = quality + /** + * Returns the raw JSON value of [revisedPrompt]. + * + * Unlike [revisedPrompt], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("revised_prompt") + @ExcludeMissing + fun _revisedPrompt(): JsonField = revisedPrompt + /** * Returns the raw JSON value of [size]. * @@ -7757,8 +7852,12 @@ private constructor( private var result: JsonField? = null private var status: JsonField? = null private var type: JsonValue = JsonValue.from("image_generation_call") + private var action: JsonField = JsonMissing.of() private var agent: JsonField = JsonMissing.of() + private var background: JsonField = JsonMissing.of() + private var outputFormat: JsonField = JsonMissing.of() private var quality: JsonField = JsonMissing.of() + private var revisedPrompt: JsonField = JsonMissing.of() private var size: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -7768,8 +7867,12 @@ private constructor( result = imageGenerationCall.result status = imageGenerationCall.status type = imageGenerationCall.type + action = imageGenerationCall.action agent = imageGenerationCall.agent + background = imageGenerationCall.background + outputFormat = imageGenerationCall.outputFormat quality = imageGenerationCall.quality + revisedPrompt = imageGenerationCall.revisedPrompt size = imageGenerationCall.size additionalProperties = imageGenerationCall.additionalProperties.toMutableMap() } @@ -7827,6 +7930,21 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** The action used for image generation. */ + fun action(action: Action?) = action(JsonField.ofNullable(action)) + + /** Alias for calling [Builder.action] with `action.orElse(null)`. */ + fun action(action: Optional) = action(action.getOrNull()) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + /** The agent that produced this item. */ fun agent(agent: Agent?) = agent(JsonField.ofNullable(agent)) @@ -7842,6 +7960,42 @@ private constructor( */ fun agent(agent: JsonField) = apply { this.agent = agent } + /** The background setting used for generation. */ + fun background(background: Background?) = background(JsonField.ofNullable(background)) + + /** Alias for calling [Builder.background] with `background.orElse(null)`. */ + fun background(background: Optional) = background(background.getOrNull()) + + /** + * Sets [Builder.background] to an arbitrary JSON value. + * + * You should usually call [Builder.background] with a well-typed [Background] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun background(background: JsonField) = apply { + this.background = background + } + + /** The output format used for generation. */ + fun outputFormat(outputFormat: OutputFormat?) = + outputFormat(JsonField.ofNullable(outputFormat)) + + /** Alias for calling [Builder.outputFormat] with `outputFormat.orElse(null)`. */ + fun outputFormat(outputFormat: Optional) = + outputFormat(outputFormat.getOrNull()) + + /** + * Sets [Builder.outputFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.outputFormat] with a well-typed [OutputFormat] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputFormat(outputFormat: JsonField) = apply { + this.outputFormat = outputFormat + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -7860,6 +8014,25 @@ private constructor( */ fun quality(quality: JsonField) = apply { this.quality = quality } + /** The prompt that was used after any model prompt rewriting. */ + fun revisedPrompt(revisedPrompt: String?) = + revisedPrompt(JsonField.ofNullable(revisedPrompt)) + + /** Alias for calling [Builder.revisedPrompt] with `revisedPrompt.orElse(null)`. */ + fun revisedPrompt(revisedPrompt: Optional) = + revisedPrompt(revisedPrompt.getOrNull()) + + /** + * Sets [Builder.revisedPrompt] to an arbitrary JSON value. + * + * You should usually call [Builder.revisedPrompt] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun revisedPrompt(revisedPrompt: JsonField) = apply { + this.revisedPrompt = revisedPrompt + } + /** The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. */ fun size(size: Size?) = size(JsonField.ofNullable(size)) @@ -7922,8 +8095,12 @@ private constructor( checkRequired("result", result), checkRequired("status", status), type, + action, agent, + background, + outputFormat, quality, + revisedPrompt, size, additionalProperties.toMutableMap(), ) @@ -7953,8 +8130,12 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } agent().ifPresent { it.validate() } + background().ifPresent { it.validate() } + outputFormat().ifPresent { it.validate() } quality().ifPresent { it.validate() } + revisedPrompt() size() validated = true } @@ -7979,8 +8160,12 @@ private constructor( (if (result.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + type.let { if (it == JsonValue.from("image_generation_call")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + (agent.asKnown().getOrNull()?.validity() ?: 0) + + (background.asKnown().getOrNull()?.validity() ?: 0) + + (outputFormat.asKnown().getOrNull()?.validity() ?: 0) + (quality.asKnown().getOrNull()?.validity() ?: 0) + + (if (revisedPrompt.asKnown().isPresent) 1 else 0) + (if (size.asKnown().isPresent) 1 else 0) /** The status of the image generation call. */ @@ -8135,6 +8320,152 @@ private constructor( override fun toString() = value.toString() } + /** The action used for image generation. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** The agent that produced this item. */ class Agent @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -8315,6 +8646,302 @@ private constructor( "Agent{agentName=$agentName, additionalProperties=$additionalProperties}" } + /** The background setting used for generation. */ + class Background @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val TRANSPARENT = of("transparent") + + @JvmField val OPAQUE = of("opaque") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Background(JsonField.of(value)) + } + + /** An enum containing [Background]'s known values. */ + enum class Known { + TRANSPARENT, + OPAQUE, + AUTO, + } + + /** + * An enum containing [Background]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Background] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + TRANSPARENT, + OPAQUE, + AUTO, + /** + * An enum member indicating that [Background] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + TRANSPARENT -> Value.TRANSPARENT + OPAQUE -> Value.OPAQUE + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + TRANSPARENT -> Known.TRANSPARENT + OPAQUE -> Known.OPAQUE + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Background: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Background = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Background && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The output format used for generation. */ + class OutputFormat @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PNG = of("png") + + @JvmField val WEBP = of("webp") + + @JvmField val JPEG = of("jpeg") + + @JvmStatic fun of(value: String) = OutputFormat(JsonField.of(value)) + } + + /** An enum containing [OutputFormat]'s known values. */ + enum class Known { + PNG, + WEBP, + JPEG, + } + + /** + * An enum containing [OutputFormat]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [OutputFormat] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PNG, + WEBP, + JPEG, + /** + * An enum member indicating that [OutputFormat] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PNG -> Value.PNG + WEBP -> Value.WEBP + JPEG -> Value.JPEG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PNG -> Known.PNG + WEBP -> Known.WEBP + JPEG -> Known.JPEG + else -> throw OpenAIInvalidDataException("Unknown OutputFormat: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): OutputFormat = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is OutputFormat && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -8637,20 +9264,37 @@ private constructor( result == other.result && status == other.status && type == other.type && + action == other.action && agent == other.agent && + background == other.background && + outputFormat == other.outputFormat && quality == other.quality && + revisedPrompt == other.revisedPrompt && size == other.size && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, result, status, type, agent, quality, size, additionalProperties) + Objects.hash( + id, + result, + status, + type, + action, + agent, + background, + outputFormat, + quality, + revisedPrompt, + size, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, agent=$agent, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, action=$action, agent=$agent, background=$background, outputFormat=$outputFormat, quality=$quality, revisedPrompt=$revisedPrompt, size=$size, additionalProperties=$additionalProperties}" } /** A tool call to run a command on the local shell. */ diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsePrompt.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsePrompt.kt index ab4f8c582..ed51fd89a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsePrompt.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsePrompt.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaResponsePrompt @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseReasoningItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseReasoningItem.kt index 7bd34e1e7..7c90514a7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseReasoningItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseReasoningItem.kt @@ -24,7 +24,7 @@ import kotlin.jvm.optionals.getOrNull * 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). */ class BetaResponseReasoningItem @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseSteerInputContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseSteerInputContent.kt index 4cefec0cc..8c8cd23f9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseSteerInputContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseSteerInputContent.kt @@ -34,7 +34,7 @@ private constructor( /** * 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) */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -52,7 +52,7 @@ private constructor( /** * 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) */ fun asInputImage(): BetaResponseInputImageContent = inputImage.getOrThrow("inputImage") @@ -192,7 +192,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofInputImage(inputImage: BetaResponseInputImageContent) = @@ -215,7 +215,7 @@ private constructor( /** * 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) */ fun visitInputImage(inputImage: BetaResponseInputImageContent): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseTextConfig.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseTextConfig.kt index 057032fb6..2cf2a3cce 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseTextConfig.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseTextConfig.kt @@ -20,8 +20,8 @@ import kotlin.jvm.optionals.getOrNull /** * 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) */ class BetaResponseTextConfig @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -46,7 +46,7 @@ private constructor( * * 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. * @@ -124,7 +124,7 @@ private constructor( * * 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/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseUsage.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseUsage.kt index e5d774799..e1b668a09 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseUsage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseUsage.kt @@ -376,7 +376,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -460,7 +460,7 @@ private constructor( /** * 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). */ fun cachedTokens(cachedTokens: Long) = cachedTokens(JsonField.of(cachedTokens)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsesClientEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsesClientEvent.kt index d7a66ccc1..b827e9aea 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsesClientEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsesClientEvent.kt @@ -634,7 +634,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -686,11 +686,11 @@ private constructor( * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -712,7 +712,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -745,7 +745,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -781,8 +781,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -792,7 +792,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -802,7 +802,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -817,7 +817,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -831,7 +831,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -851,7 +851,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -863,7 +863,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -876,12 +876,12 @@ private constructor( * 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`. @@ -899,7 +899,8 @@ private constructor( /** * 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). + * subject to the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -911,7 +912,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -952,8 +953,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -976,16 +977,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1033,7 +1034,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1446,7 +1447,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = background(JsonField.ofNullable(background)) @@ -1590,11 +1591,12 @@ private constructor( * 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) */ fun input(input: Input) = input(JsonField.of(input)) @@ -1642,7 +1644,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = maxOutputTokens(JsonField.ofNullable(maxOutputTokens)) @@ -1722,8 +1724,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: Model) = model(JsonField.of(model)) @@ -1811,7 +1813,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -1837,7 +1839,7 @@ private constructor( /** * 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). */ fun prompt(prompt: BetaResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -1856,7 +1858,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = promptCacheKey(JsonField.ofNullable(promptCacheKey)) @@ -1884,8 +1886,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + * for current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = promptCacheOptions(JsonField.of(promptCacheOptions)) @@ -1906,7 +1908,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -1944,7 +1946,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -1966,7 +1968,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = safetyIdentifier(JsonField.ofNullable(safetyIdentifier)) @@ -1995,12 +1997,13 @@ private constructor( * 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 @@ -2033,7 +2036,7 @@ private constructor( * 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). */ fun store(store: Boolean?) = store(JsonField.ofNullable(store)) @@ -2061,7 +2064,7 @@ private constructor( * 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. */ fun stream(stream: Boolean?) = stream(JsonField.ofNullable(stream)) @@ -2153,8 +2156,9 @@ private constructor( /** * 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) */ fun text(text: BetaResponseTextConfig) = text(JsonField.of(text)) @@ -2254,15 +2258,17 @@ private constructor( * 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). + * [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). + * about + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). * You can also use custom tools to call your own code. */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -2493,7 +2499,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = user(JsonField.of(user)) @@ -3166,11 +3172,11 @@ private constructor( * 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) */ @JsonDeserialize(using = Input.Deserializer::class) @JsonSerialize(using = Input.Serializer::class) @@ -3528,7 +3534,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -5592,7 +5598,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. */ class PromptCacheOptions @@ -6159,7 +6165,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -6317,7 +6323,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ class Reasoning @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -6365,7 +6371,7 @@ private constructor( * `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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -6514,7 +6520,7 @@ private constructor( * 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. */ fun effort(effort: Effort?) = effort(JsonField.ofNullable(effort)) @@ -6853,7 +6859,7 @@ private constructor( * `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. */ class Effort @JsonCreator private constructor(private val value: JsonField) : @@ -7515,12 +7521,12 @@ private constructor( * 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`. @@ -7920,7 +7926,7 @@ private constructor( /** * 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). */ fun betaToolChoiceTypes(): Optional = Optional.ofNullable(betaToolChoiceTypes) @@ -7988,7 +7994,7 @@ private constructor( /** * 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). */ fun asBetaToolChoiceTypes(): BetaToolChoiceTypes = betaToolChoiceTypes.getOrThrow("betaToolChoiceTypes") @@ -8302,7 +8308,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes) = @@ -8367,7 +8373,7 @@ private constructor( /** * 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). */ fun visitBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaTool.kt index a5cf57a7a..8190a7f5a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaTool.kt @@ -57,38 +57,38 @@ private constructor( /** * 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). */ fun function(): Optional = Optional.ofNullable(function) /** * 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). */ fun fileSearch(): Optional = Optional.ofNullable(fileSearch) /** * 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). */ fun computer(): Optional = Optional.ofNullable(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). */ fun computerUsePreview(): Optional = Optional.ofNullable(computerUsePreview) /** * 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). */ fun webSearch(): Optional = Optional.ofNullable(webSearch) /** * 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). */ fun mcp(): Optional = Optional.ofNullable(mcp) @@ -109,7 +109,7 @@ private constructor( /** * 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) */ fun custom(): Optional = Optional.ofNullable(custom) @@ -121,7 +121,7 @@ private constructor( /** * 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). */ fun webSearchPreview(): Optional = Optional.ofNullable(webSearchPreview) @@ -163,38 +163,38 @@ private constructor( /** * 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). */ fun asFunction(): BetaFunctionTool = function.getOrThrow("function") /** * 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). */ fun asFileSearch(): BetaFileSearchTool = fileSearch.getOrThrow("fileSearch") /** * 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). */ fun asComputer(): BetaComputerTool = computer.getOrThrow("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). */ fun asComputerUsePreview(): BetaComputerUsePreviewTool = computerUsePreview.getOrThrow("computerUsePreview") /** * 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). */ fun asWebSearch(): BetaWebSearchTool = webSearch.getOrThrow("webSearch") /** * 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). */ fun asMcp(): Mcp = mcp.getOrThrow("mcp") @@ -215,7 +215,7 @@ private constructor( /** * 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) */ fun asCustom(): BetaCustomTool = custom.getOrThrow("custom") @@ -227,7 +227,7 @@ private constructor( /** * 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). */ fun asWebSearchPreview(): BetaWebSearchPreviewTool = webSearchPreview.getOrThrow("webSearchPreview") @@ -523,26 +523,26 @@ private constructor( /** * 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). */ @JvmStatic fun ofFunction(function: BetaFunctionTool) = BetaTool(function = function) /** * 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). */ @JvmStatic fun ofFileSearch(fileSearch: BetaFileSearchTool) = BetaTool(fileSearch = fileSearch) /** * 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). */ @JvmStatic fun ofComputer(computer: BetaComputerTool) = BetaTool(computer = 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). */ @JvmStatic fun ofComputerUsePreview(computerUsePreview: BetaComputerUsePreviewTool) = @@ -550,14 +550,14 @@ private constructor( /** * 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). */ @JvmStatic fun ofWebSearch(webSearch: BetaWebSearchTool) = BetaTool(webSearch = webSearch) /** * 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). */ @JvmStatic fun ofMcp(mcp: Mcp) = BetaTool(mcp = mcp) @@ -587,7 +587,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofCustom(custom: BetaCustomTool) = BetaTool(custom = custom) @@ -600,7 +600,7 @@ private constructor( /** * 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). + * the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ @JvmStatic fun ofWebSearchPreview(webSearchPreview: BetaWebSearchPreviewTool) = @@ -616,38 +616,38 @@ private constructor( /** * 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). */ fun visitFunction(function: BetaFunctionTool): T /** * 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). */ fun visitFileSearch(fileSearch: BetaFileSearchTool): T /** * 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). */ fun visitComputer(computer: BetaComputerTool): T /** * 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). */ fun visitComputerUsePreview(computerUsePreview: BetaComputerUsePreviewTool): T /** * 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). */ fun visitWebSearch(webSearch: BetaWebSearchTool): T /** * 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). */ fun visitMcp(mcp: Mcp): T @@ -667,7 +667,7 @@ private constructor( /** * 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) */ fun visitCustom(custom: BetaCustomTool): T @@ -679,7 +679,7 @@ private constructor( /** * 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). + * the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ fun visitWebSearchPreview(webSearchPreview: BetaWebSearchPreviewTool): T @@ -836,7 +836,7 @@ private constructor( /** * 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). */ class Mcp @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -957,7 +957,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` @@ -1294,7 +1294,7 @@ private constructor( * 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: * - Dropbox: `connector_dropbox` @@ -2144,7 +2144,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaToolChoiceTypes.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaToolChoiceTypes.kt index 0f1fffe84..f5b2c3c7a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaToolChoiceTypes.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaToolChoiceTypes.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaToolChoiceTypes @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -35,7 +35,7 @@ private constructor( /** * 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` @@ -97,7 +97,7 @@ private constructor( /** * 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` @@ -189,7 +189,7 @@ private constructor( /** * 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` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchPreviewTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchPreviewTool.kt index 67e781715..ef793350e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchPreviewTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchPreviewTool.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaWebSearchPreviewTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchTool.kt index 68b2fc3f2..49ef7fff5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaWebSearchTool.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class BetaWebSearchTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCancelParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCancelParams.kt index dd2fdee62..0c9d91c7a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCancelParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCancelParams.kt @@ -18,7 +18,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ResponseCancelParams private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCompactParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCompactParams.kt index 9fa7380d8..10fb1ee48 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCompactParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCompactParams.kt @@ -37,9 +37,9 @@ import kotlin.jvm.optionals.getOrNull * 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). */ class ResponseCompactParams private constructor( @@ -54,8 +54,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -84,8 +84,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -107,8 +107,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -129,15 +129,16 @@ private constructor( * 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'. - * 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. + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -272,7 +273,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ fun model(model: Model?) = apply { body.model(model) } @@ -346,8 +347,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = apply { body.previousResponseId(previousResponseId) @@ -396,7 +397,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions?) = apply { @@ -451,11 +452,12 @@ private constructor( * 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 + * 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 @@ -679,7 +681,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -709,8 +711,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -734,7 +736,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -758,11 +760,12 @@ private constructor( * 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 + * 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 @@ -902,8 +905,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: Model?) = model(JsonField.ofNullable(model)) @@ -980,7 +983,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -1031,8 +1034,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + * for current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions?) = promptCacheOptions(JsonField.ofNullable(promptCacheOptions)) @@ -1087,12 +1090,12 @@ private constructor( * 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 + * '[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 @@ -1253,8 +1256,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -2237,8 +2240,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. */ class PromptCacheOptions @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -2871,15 +2874,16 @@ private constructor( * 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'. - * 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. + * 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. */ class ServiceTier @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCreateParams.kt index 7ec8f314f..1312ed09e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/ResponseCreateParams.kt @@ -35,15 +35,15 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. + * 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. */ class ResponseCreateParams private constructor( @@ -57,7 +57,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -106,11 +106,11 @@ private constructor( * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -132,7 +132,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -165,8 +165,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -200,8 +200,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -210,7 +210,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -220,7 +220,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -234,8 +234,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -247,7 +247,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -266,7 +266,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -278,7 +278,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -291,12 +291,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. @@ -314,7 +314,8 @@ private constructor( /** * 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). + * the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -342,8 +343,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -365,16 +366,16 @@ private constructor( * * 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). + * 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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can + * also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -421,7 +422,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -714,7 +715,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = apply { body.background(background) } @@ -843,11 +844,11 @@ private constructor( * 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) */ fun input(input: Input) = apply { body.input(input) } @@ -893,7 +894,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = apply { body.maxOutputTokens(maxOutputTokens) @@ -972,7 +973,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ fun model(model: Model) = apply { body.model(model) } @@ -1054,8 +1055,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = apply { body.previousResponseId(previousResponseId) @@ -1080,7 +1081,7 @@ private constructor( /** * 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). */ fun prompt(prompt: BetaResponsePrompt?) = apply { body.prompt(prompt) } @@ -1099,7 +1100,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = apply { body.promptCacheKey(promptCacheKey) } @@ -1126,7 +1127,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = apply { @@ -1149,7 +1150,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -1187,7 +1188,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = apply { body.reasoning(reasoning) } @@ -1208,7 +1209,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = apply { body.safetyIdentifier(safetyIdentifier) @@ -1235,12 +1236,12 @@ private constructor( * 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`. @@ -1269,7 +1270,8 @@ private constructor( /** * 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). + * subject to the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). */ fun store(store: Boolean?) = apply { body.store(store) } @@ -1340,8 +1342,8 @@ private constructor( /** * 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) */ fun text(text: BetaResponseTextConfig) = apply { body.text(text) } @@ -1447,16 +1449,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. */ fun tools(tools: List) = apply { body.tools(tools) } @@ -1673,7 +1675,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = apply { body.user(user) } @@ -1987,7 +1989,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2039,11 +2041,11 @@ private constructor( * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2065,7 +2067,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2098,7 +2100,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -2134,8 +2136,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2145,7 +2147,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2155,7 +2157,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2170,7 +2172,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -2184,7 +2186,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -2204,7 +2206,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2216,7 +2218,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2229,12 +2231,12 @@ private constructor( * 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`. @@ -2252,7 +2254,8 @@ private constructor( /** * 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). + * subject to the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2280,8 +2283,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2304,16 +2307,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2361,7 +2364,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2740,7 +2743,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = background(JsonField.ofNullable(background)) @@ -2884,11 +2887,12 @@ private constructor( * 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) */ fun input(input: Input) = input(JsonField.of(input)) @@ -2936,7 +2940,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = maxOutputTokens(JsonField.ofNullable(maxOutputTokens)) @@ -3016,8 +3020,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: Model) = model(JsonField.of(model)) @@ -3105,7 +3109,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -3131,7 +3135,7 @@ private constructor( /** * 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). */ fun prompt(prompt: BetaResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -3150,7 +3154,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = promptCacheKey(JsonField.ofNullable(promptCacheKey)) @@ -3178,8 +3182,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + * for current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = promptCacheOptions(JsonField.of(promptCacheOptions)) @@ -3200,7 +3204,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -3238,7 +3242,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -3260,7 +3264,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = safetyIdentifier(JsonField.ofNullable(safetyIdentifier)) @@ -3289,12 +3293,13 @@ private constructor( * 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 @@ -3327,7 +3332,7 @@ private constructor( * 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). */ fun store(store: Boolean?) = store(JsonField.ofNullable(store)) @@ -3400,8 +3405,9 @@ private constructor( /** * 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) */ fun text(text: BetaResponseTextConfig) = text(JsonField.of(text)) @@ -3501,15 +3507,17 @@ private constructor( * 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). + * [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). + * about + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). * You can also use custom tools to call your own code. */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -3740,7 +3748,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = user(JsonField.of(user)) @@ -4468,11 +4476,11 @@ private constructor( * 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) */ @JsonDeserialize(using = Input.Deserializer::class) @JsonSerialize(using = Input.Serializer::class) @@ -4815,8 +4823,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -6830,8 +6838,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. */ class PromptCacheOptions @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -7383,7 +7391,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -7537,7 +7545,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ class Reasoning @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -7579,8 +7587,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -7726,7 +7734,7 @@ private constructor( * `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. */ fun effort(effort: Effort?) = effort(JsonField.ofNullable(effort)) @@ -8057,8 +8065,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ class Effort @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -8709,12 +8717,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. @@ -9104,7 +9112,7 @@ private constructor( /** * 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). */ fun betaToolChoiceTypes(): Optional = Optional.ofNullable(betaToolChoiceTypes) @@ -9170,7 +9178,7 @@ private constructor( /** * 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). */ fun asBetaToolChoiceTypes(): BetaToolChoiceTypes = betaToolChoiceTypes.getOrThrow("betaToolChoiceTypes") @@ -9474,7 +9482,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes) = @@ -9537,7 +9545,7 @@ private constructor( /** * 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). */ fun visitBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/inputtokens/InputTokenCountParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/inputtokens/InputTokenCountParams.kt index 1e40fb788..7cf5cd2c6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/inputtokens/InputTokenCountParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/responses/inputtokens/InputTokenCountParams.kt @@ -104,8 +104,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -132,8 +132,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -142,7 +142,7 @@ private constructor( /** * **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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -152,8 +152,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -418,8 +418,8 @@ private constructor( /** * 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. + * Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and + * compare available models. */ fun model(model: String?) = apply { body.model(model) } @@ -492,8 +492,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = apply { body.previousResponseId(previousResponseId) @@ -518,7 +518,7 @@ private constructor( /** * **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). */ fun reasoning(reasoning: Reasoning?) = apply { body.reasoning(reasoning) } @@ -537,8 +537,8 @@ private constructor( /** * 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) */ fun text(text: Text?) = apply { body.text(text) } @@ -1039,8 +1039,8 @@ private constructor( /** * 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. + * Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and + * compare available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1069,8 +1069,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1080,7 +1080,7 @@ private constructor( /** * **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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1090,8 +1090,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1373,8 +1373,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: String?) = model(JsonField.ofNullable(model)) @@ -1449,7 +1449,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -1475,7 +1475,7 @@ private constructor( /** * **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). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -1494,8 +1494,9 @@ private constructor( /** * 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) */ fun text(text: Text?) = text(JsonField.ofNullable(text)) @@ -2524,7 +2525,7 @@ private constructor( /** * **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). */ class Reasoning @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -2566,8 +2567,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2713,7 +2714,7 @@ private constructor( * `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. */ fun effort(effort: Effort?) = effort(JsonField.ofNullable(effort)) @@ -3044,8 +3045,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ class Effort @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -3693,8 +3694,8 @@ private constructor( /** * 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) */ class Text @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -3719,7 +3720,7 @@ private constructor( * * 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. * @@ -3799,7 +3800,7 @@ private constructor( * * 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. * @@ -4128,7 +4129,7 @@ private constructor( /** * 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). */ fun betaToolChoiceTypes(): Optional = Optional.ofNullable(betaToolChoiceTypes) @@ -4194,7 +4195,7 @@ private constructor( /** * 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). */ fun asBetaToolChoiceTypes(): BetaToolChoiceTypes = betaToolChoiceTypes.getOrThrow("betaToolChoiceTypes") @@ -4498,7 +4499,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes) = @@ -4561,7 +4562,7 @@ private constructor( /** * 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). */ fun visitBetaToolChoiceTypes(betaToolChoiceTypes: BetaToolChoiceTypes): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/AssistantResponseFormatOption.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/AssistantResponseFormatOption.kt index ff64c084b..f71bcf1af 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/AssistantResponseFormatOption.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/AssistantResponseFormatOption.kt @@ -23,13 +23,13 @@ import java.util.Optional /** * 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. @@ -68,7 +68,7 @@ private constructor( /** * 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). */ fun responseFormatJsonSchema(): Optional = Optional.ofNullable(responseFormatJsonSchema) @@ -98,7 +98,7 @@ private constructor( /** * 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). */ fun asResponseFormatJsonSchema(): ResponseFormatJsonSchema = responseFormatJsonSchema.getOrThrow("responseFormatJsonSchema") @@ -274,7 +274,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofResponseFormatJsonSchema(responseFormatJsonSchema: ResponseFormatJsonSchema) = @@ -302,7 +302,7 @@ private constructor( /** * 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). */ fun visitResponseFormatJsonSchema(responseFormatJsonSchema: ResponseFormatJsonSchema): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/Thread.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/Thread.kt index b48356aea..e480d7927 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/Thread.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/Thread.kt @@ -21,7 +21,7 @@ import kotlin.jvm.optionals.getOrNull /** * Represents a thread that contains - * [messages](https://platform.openai.com/docs/api-reference/messages). + * [messages](https://developers.openai.com/api/docs/assistants/migration). */ class Thread @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -663,8 +663,8 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -712,8 +712,8 @@ private constructor( } /** - * 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 + * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -846,7 +846,7 @@ private constructor( /** * 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. * @@ -898,7 +898,7 @@ private constructor( /** * 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/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt index 5d321d306..5cc341bf4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParams.kt @@ -54,7 +54,7 @@ private constructor( ) : Params { /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use * to execute this run. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -107,9 +107,9 @@ private constructor( fun metadata(): Optional = body.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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -118,7 +118,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -128,13 +128,13 @@ private constructor( /** * 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 + * [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. @@ -382,7 +382,7 @@ private constructor( fun body(body: Body) = apply { this.body = body.toBuilder() } /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to * use to execute this run. */ fun assistantId(assistantId: String) = apply { body.assistantId(assistantId) } @@ -506,9 +506,10 @@ private constructor( fun metadata(metadata: JsonField) = apply { body.metadata(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. */ fun model(model: ChatModel?) = apply { body.model(model) } @@ -533,7 +534,7 @@ private constructor( /** * 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. */ fun parallelToolCalls(parallelToolCalls: Boolean) = apply { @@ -553,13 +554,13 @@ private constructor( /** * 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. @@ -1040,7 +1041,7 @@ private constructor( ) /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to * use to execute this run. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -1094,9 +1095,10 @@ private constructor( fun metadata(): Optional = metadata.getOptional("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1105,7 +1107,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -1116,13 +1118,13 @@ private constructor( /** * 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. @@ -1412,8 +1414,9 @@ private constructor( } /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) - * to use to execute this run. + * The ID of the + * [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to + * execute this run. */ fun assistantId(assistantId: String) = assistantId(JsonField.of(assistantId)) @@ -1540,10 +1543,10 @@ private constructor( fun metadata(metadata: JsonField) = apply { this.metadata = 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. */ fun model(model: ChatModel?) = model(JsonField.ofNullable(model)) @@ -1570,7 +1573,7 @@ private constructor( /** * 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. */ fun parallelToolCalls(parallelToolCalls: Boolean) = @@ -1589,14 +1592,14 @@ private constructor( /** * 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. @@ -2184,8 +2187,8 @@ private constructor( ) : this(messages, metadata, toolResources, mutableMapOf()) /** - * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2277,7 +2280,7 @@ private constructor( } /** - * A list of [messages](https://platform.openai.com/docs/api-reference/messages) to + * A list of [messages](https://developers.openai.com/api/docs/assistants/migration) to * start the thread with. */ fun messages(messages: List) = messages(JsonField.of(messages)) @@ -2773,7 +2776,8 @@ private constructor( /** * 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). + * supported on + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun arrayOfContentParts(): Optional> = Optional.ofNullable(arrayOfContentParts) @@ -2788,7 +2792,8 @@ private constructor( /** * 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). + * supported on + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun asArrayOfContentParts(): List = arrayOfContentParts.getOrThrow("arrayOfContentParts") @@ -2922,7 +2927,7 @@ private constructor( * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ @JvmStatic fun ofArrayOfContentParts(arrayOfContentParts: List) = @@ -2942,7 +2947,7 @@ private constructor( * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun visitArrayOfContentParts( arrayOfContentParts: List @@ -4090,8 +4095,8 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. @@ -4142,9 +4147,9 @@ private constructor( } /** - * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -4281,7 +4286,7 @@ private constructor( /** * 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. * @@ -4293,7 +4298,7 @@ private constructor( /** * 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. * @@ -4357,7 +4362,7 @@ private constructor( /** * 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. */ @@ -4389,7 +4394,7 @@ private constructor( /** * 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. */ @@ -4528,10 +4533,10 @@ private constructor( chunkingStrategy.getOptional("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type * (e.g. if the server responded with an unexpected value). @@ -4663,11 +4668,11 @@ private constructor( ) /** - * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -5956,8 +5961,8 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -6005,8 +6010,8 @@ private constructor( } /** - * 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 + * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -6139,7 +6144,7 @@ private constructor( /** * 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. * @@ -6191,7 +6196,7 @@ private constructor( /** * 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/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt index de06c2e0d..f5d84a00b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadCreateParams.kt @@ -46,8 +46,8 @@ private constructor( ) : Params { /** - * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -142,8 +142,8 @@ private constructor( fun body(body: Body) = apply { this.body = body.toBuilder() } /** - * 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. */ fun messages(messages: List) = apply { body.messages(messages) } @@ -373,8 +373,8 @@ private constructor( ) : this(messages, metadata, toolResources, mutableMapOf()) /** - * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -466,7 +466,7 @@ private constructor( } /** - * A list of [messages](https://platform.openai.com/docs/api-reference/messages) to + * A list of [messages](https://developers.openai.com/api/docs/assistants/migration) to * start the thread with. */ fun messages(messages: List) = messages(JsonField.of(messages)) @@ -969,7 +969,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun arrayOfContentParts(): Optional> = Optional.ofNullable(arrayOfContentParts) @@ -984,7 +984,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun asArrayOfContentParts(): List = arrayOfContentParts.getOrThrow("arrayOfContentParts") @@ -1117,7 +1117,8 @@ private constructor( /** * 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). + * supported on + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ @JvmStatic fun ofArrayOfContentParts(arrayOfContentParts: List) = @@ -1136,7 +1137,8 @@ private constructor( /** * 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). + * supported on + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun visitArrayOfContentParts(arrayOfContentParts: List): T @@ -2255,8 +2257,8 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -2304,8 +2306,8 @@ private constructor( } /** - * 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 + * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -2442,7 +2444,7 @@ private constructor( /** * 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. * @@ -2454,7 +2456,7 @@ private constructor( /** * 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. * @@ -2518,7 +2520,7 @@ private constructor( /** * 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. */ @@ -2550,7 +2552,7 @@ private constructor( /** * 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. */ @@ -2689,10 +2691,10 @@ private constructor( chunkingStrategy.getOptional("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -2816,10 +2818,10 @@ private constructor( chunkingStrategy(ChunkingStrategy.Static.builder().static_(static_).build()) /** - * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadUpdateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadUpdateParams.kt index a4485ed6f..2a6d7c8d2 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadUpdateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/ThreadUpdateParams.kt @@ -847,8 +847,8 @@ private constructor( ) : this(fileIds, mutableMapOf()) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if @@ -896,8 +896,8 @@ private constructor( } /** - * 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 + * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -1030,7 +1030,7 @@ private constructor( /** * 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. * @@ -1082,7 +1082,7 @@ private constructor( /** * 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/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFile.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFile.kt index 2890bec0d..6dff653c1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFile.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFile.kt @@ -33,9 +33,9 @@ private constructor( ) : this(fileId, detail, mutableMapOf()) /** - * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -105,9 +105,9 @@ private constructor( } /** - * 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. */ fun fileId(fileId: String) = fileId(JsonField.of(fileId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileContentBlock.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileContentBlock.kt index cf4efda76..bf5405e45 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileContentBlock.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileContentBlock.kt @@ -17,8 +17,8 @@ import java.util.Objects import kotlin.jvm.optionals.getOrNull /** - * 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. */ class ImageFileContentBlock @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDelta.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDelta.kt index 087d86340..fc883434c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDelta.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDelta.kt @@ -41,9 +41,9 @@ private constructor( fun detail(): Optional = detail.getOptional("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -111,9 +111,9 @@ private constructor( fun detail(detail: JsonField) = apply { this.detail = 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. */ fun fileId(fileId: String) = fileId(JsonField.of(fileId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDeltaBlock.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDeltaBlock.kt index 185d23cd1..6046686e6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDeltaBlock.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/ImageFileDeltaBlock.kt @@ -18,8 +18,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. */ class ImageFileDeltaBlock @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/Message.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/Message.kt index 141f58f6f..796b0c245 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/Message.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/Message.kt @@ -33,7 +33,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * Represents a message within a [thread](https://platform.openai.com/docs/api-reference/threads). + * Represents a message within a + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ class Message @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -111,7 +112,7 @@ private constructor( /** * If applicable, the ID of the - * [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this + * [assistant](https://developers.openai.com/api/docs/assistants/migration) that authored this * message. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -203,9 +204,9 @@ private constructor( fun role(): Role = role.getRequired("role") /** - * 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. + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -221,8 +222,8 @@ private constructor( fun status(): Status = status.getRequired("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -419,8 +420,8 @@ private constructor( /** * If applicable, the ID of the - * [assistant](https://platform.openai.com/docs/api-reference/assistants) that authored this - * message. + * [assistant](https://developers.openai.com/api/docs/assistants/migration) that authored + * this message. */ fun assistantId(assistantId: String?) = assistantId(JsonField.ofNullable(assistantId)) @@ -672,9 +673,9 @@ private constructor( fun role(role: JsonField) = apply { this.role = role } /** - * 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. + * 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. */ fun runId(runId: String?) = runId(JsonField.ofNullable(runId)) @@ -704,8 +705,8 @@ private constructor( fun status(status: JsonField) = apply { this.status = 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. */ fun threadId(threadId: String) = threadId(JsonField.of(threadId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContent.kt index 8dde77a93..9c09fa831 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContent.kt @@ -19,8 +19,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. */ @JsonDeserialize(using = MessageContent.Deserializer::class) @JsonSerialize(using = MessageContent.Serializer::class) @@ -34,8 +34,8 @@ private constructor( ) { /** - * 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. */ fun imageFile(): Optional = Optional.ofNullable(imageFile) @@ -57,8 +57,8 @@ private constructor( fun isRefusal(): Boolean = refusal != null /** - * 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. */ fun asImageFile(): ImageFileContentBlock = imageFile.getOrThrow("imageFile") @@ -204,8 +204,8 @@ private constructor( companion object { /** - * 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. */ @JvmStatic fun ofImageFile(imageFile: ImageFileContentBlock) = MessageContent(imageFile = imageFile) @@ -227,8 +227,8 @@ private constructor( interface Visitor { /** - * 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. */ fun visitImageFile(imageFile: ImageFileContentBlock): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentDelta.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentDelta.kt index 12b26876e..e155ccc26 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentDelta.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentDelta.kt @@ -19,8 +19,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. */ @JsonDeserialize(using = MessageContentDelta.Deserializer::class) @JsonSerialize(using = MessageContentDelta.Serializer::class) @@ -34,8 +34,8 @@ private constructor( ) { /** - * 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. */ fun imageFile(): Optional = Optional.ofNullable(imageFile) @@ -57,8 +57,8 @@ private constructor( fun isImageUrl(): Boolean = imageUrl != null /** - * 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. */ fun asImageFile(): ImageFileDeltaBlock = imageFile.getOrThrow("imageFile") @@ -204,8 +204,8 @@ private constructor( companion object { /** - * 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. */ @JvmStatic fun ofImageFile(imageFile: ImageFileDeltaBlock) = MessageContentDelta(imageFile = imageFile) @@ -229,8 +229,8 @@ private constructor( interface Visitor { /** - * 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. */ fun visitImageFile(imageFile: ImageFileDeltaBlock): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentPartParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentPartParam.kt index 7cf3f4177..b066d4537 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentPartParam.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageContentPartParam.kt @@ -19,8 +19,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. */ @JsonDeserialize(using = MessageContentPartParam.Deserializer::class) @JsonSerialize(using = MessageContentPartParam.Serializer::class) @@ -33,8 +33,8 @@ private constructor( ) { /** - * 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. */ fun imageFile(): Optional = Optional.ofNullable(imageFile) @@ -51,8 +51,8 @@ private constructor( fun isText(): Boolean = text != null /** - * 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. */ fun asImageFile(): ImageFileContentBlock = imageFile.getOrThrow("imageFile") @@ -186,8 +186,8 @@ private constructor( companion object { /** - * 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. */ @JvmStatic fun ofImageFile(imageFile: ImageFileContentBlock) = @@ -209,8 +209,8 @@ private constructor( interface Visitor { /** - * 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. */ fun visitImageFile(imageFile: ImageFileContentBlock): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageCreateParams.kt index 754958e40..9c6734a14 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/messages/MessageCreateParams.kt @@ -765,7 +765,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun arrayOfContentParts(): Optional> = Optional.ofNullable(arrayOfContentParts) @@ -780,7 +780,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun asArrayOfContentParts(): List = arrayOfContentParts.getOrThrow("arrayOfContentParts") @@ -909,7 +909,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ @JvmStatic fun ofArrayOfContentParts(arrayOfContentParts: List) = @@ -927,7 +927,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun visitArrayOfContentParts(arrayOfContentParts: List): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RequiredActionFunctionToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RequiredActionFunctionToolCall.kt index b15a53aed..8259119d1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RequiredActionFunctionToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RequiredActionFunctionToolCall.kt @@ -35,8 +35,7 @@ private constructor( /** * 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) + * the [Submit tool outputs to run](https://developers.openai.com/api/docs/assistants/migration) * endpoint. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -126,7 +125,7 @@ private constructor( /** * 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. */ fun id(id: String) = id(JsonField.of(id)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/Run.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/Run.kt index ee031eb21..6ee6f72d7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/Run.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/Run.kt @@ -33,7 +33,7 @@ import kotlin.jvm.optionals.getOrNull /** * Represents an execution run on a - * [thread](https://platform.openai.com/docs/api-reference/threads). + * [thread](https://developers.openai.com/api/docs/assistants/migration). */ class Run @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -167,8 +167,8 @@ private constructor( fun id(): String = id.getRequired("id") /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used for - * execution of this run. + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) used + * for execution of this run. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -226,7 +226,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -273,7 +273,7 @@ private constructor( fun metadata(): Optional = metadata.getOptional("metadata") /** - * The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) + * The model that the [assistant](https://developers.openai.com/api/docs/assistants/migration) * used for this run. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -296,7 +296,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -314,13 +314,13 @@ private constructor( /** * 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 + * [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. @@ -356,7 +356,7 @@ private constructor( fun status(): RunStatus = status.getRequired("status") /** - * The ID of the [thread](https://platform.openai.com/docs/api-reference/threads) that was + * The ID of the [thread](https://developers.openai.com/api/docs/assistants/migration) that was * executed on as a part of this run. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -379,7 +379,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -751,8 +751,8 @@ private constructor( fun id(id: JsonField) = apply { this.id = id } /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) used - * for execution of this run. + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) + * used for execution of this run. */ fun assistantId(assistantId: String) = assistantId(JsonField.of(assistantId)) @@ -883,7 +883,8 @@ private constructor( /** * 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. */ fun instructions(instructions: String) = instructions(JsonField.of(instructions)) @@ -997,8 +998,9 @@ private constructor( fun metadata(metadata: JsonField) = apply { this.metadata = metadata } /** - * The model that the [assistant](https://platform.openai.com/docs/api-reference/assistants) - * used for this run. + * The model that the + * [assistant](https://developers.openai.com/api/docs/assistants/migration) used for this + * run. */ fun model(model: String) = model(JsonField.of(model)) @@ -1026,7 +1028,7 @@ private constructor( /** * 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. */ fun parallelToolCalls(parallelToolCalls: Boolean) = @@ -1067,13 +1069,13 @@ private constructor( /** * 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. @@ -1168,8 +1170,8 @@ private constructor( fun status(status: JsonField) = apply { this.status = 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. */ fun threadId(threadId: String) = threadId(JsonField.of(threadId)) @@ -1220,7 +1222,8 @@ private constructor( /** * 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. */ fun tools(tools: List) = tools(JsonField.of(tools)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RunCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RunCreateParams.kt index 18dab3202..3b693ae94 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RunCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/RunCreateParams.kt @@ -68,13 +68,13 @@ private constructor( * 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. */ fun include(): Optional> = Optional.ofNullable(include) /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to use + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to use * to execute this run. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -100,8 +100,7 @@ private constructor( fun additionalMessages(): Optional> = body.additionalMessages() /** - * Overrides the - * [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) of + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -145,9 +144,9 @@ private constructor( fun metadata(): Optional = body.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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -156,7 +155,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -169,7 +168,7 @@ private constructor( * `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 model-specific + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific * support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -179,13 +178,13 @@ private constructor( /** * 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 + * [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. @@ -423,7 +422,7 @@ private constructor( * 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. */ fun include(include: List?) = apply { @@ -457,7 +456,7 @@ private constructor( fun body(body: Body) = apply { this.body = body.toBuilder() } /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to * use to execute this run. */ fun assistantId(assistantId: String) = apply { body.assistantId(assistantId) } @@ -530,8 +529,7 @@ private constructor( } /** - * Overrides the - * [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) + * 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. */ fun instructions(instructions: String?) = apply { body.instructions(instructions) } @@ -640,9 +638,10 @@ private constructor( fun metadata(metadata: JsonField) = apply { body.metadata(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. */ fun model(model: ChatModel?) = apply { body.model(model) } @@ -667,7 +666,7 @@ private constructor( /** * 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. */ fun parallelToolCalls(parallelToolCalls: Boolean) = apply { @@ -690,8 +689,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = apply { body.reasoningEffort(reasoningEffort) @@ -714,13 +713,13 @@ private constructor( /** * 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. @@ -1184,7 +1183,7 @@ private constructor( ) /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) to + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) to * use to execute this run. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -1213,8 +1212,7 @@ private constructor( additionalMessages.getOptional("additional_messages") /** - * Overrides the - * [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -1259,9 +1257,10 @@ private constructor( fun metadata(): Optional = metadata.getOptional("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1270,7 +1269,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -1284,8 +1283,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1295,13 +1294,13 @@ private constructor( /** * 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. @@ -1587,8 +1586,9 @@ private constructor( } /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) - * to use to execute this run. + * The ID of the + * [assistant](https://developers.openai.com/api/docs/assistants/migration) to use to + * execute this run. */ fun assistantId(assistantId: String) = assistantId(JsonField.of(assistantId)) @@ -1665,8 +1665,8 @@ private constructor( /** * 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. */ fun instructions(instructions: String?) = instructions(JsonField.ofNullable(instructions)) @@ -1776,10 +1776,10 @@ private constructor( fun metadata(metadata: JsonField) = apply { this.metadata = 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. */ fun model(model: ChatModel?) = model(JsonField.ofNullable(model)) @@ -1806,7 +1806,7 @@ private constructor( /** * 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. */ fun parallelToolCalls(parallelToolCalls: Boolean) = @@ -1828,7 +1828,7 @@ private constructor( * `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. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = @@ -1851,14 +1851,14 @@ private constructor( /** * 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. @@ -2602,7 +2602,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun arrayOfContentParts(): Optional> = Optional.ofNullable(arrayOfContentParts) @@ -2617,7 +2617,7 @@ private constructor( /** * 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). + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun asArrayOfContentParts(): List = arrayOfContentParts.getOrThrow("arrayOfContentParts") @@ -2750,7 +2750,8 @@ private constructor( /** * 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). + * supported on + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ @JvmStatic fun ofArrayOfContentParts(arrayOfContentParts: List) = @@ -2769,7 +2770,8 @@ private constructor( /** * 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). + * supported on + * [Vision-compatible models](https://developers.openai.com/api/docs/models). */ fun visitArrayOfContentParts(arrayOfContentParts: List): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterOutputImage.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterOutputImage.kt index cc2d4810f..d7d1e3945 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterOutputImage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterOutputImage.kt @@ -247,7 +247,7 @@ private constructor( ) : this(fileId, mutableMapOf()) /** - * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -291,7 +291,10 @@ private constructor( additionalProperties = image.additionalProperties.toMutableMap() } - /** 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. + */ fun fileId(fileId: String) = fileId(JsonField.of(fileId)) /** diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterToolCall.kt index aa6ae2fed..1ca8ab2be 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/CodeInterpreterToolCall.kt @@ -1138,8 +1138,8 @@ private constructor( ) : this(fileId, mutableMapOf()) /** - * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type * or is unexpectedly missing or null (e.g. if the server responded with an @@ -1196,8 +1196,8 @@ private constructor( } /** - * 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. */ fun fileId(fileId: String) = fileId(JsonField.of(fileId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCall.kt index da84be20f..56421b8a1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCall.kt @@ -277,7 +277,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -374,8 +374,7 @@ private constructor( /** * 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. */ fun output(output: String?) = output(JsonField.ofNullable(output)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCallDelta.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCallDelta.kt index e17c082d3..dd1f31f6f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCallDelta.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/FunctionToolCallDelta.kt @@ -308,7 +308,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -396,8 +396,7 @@ private constructor( /** * 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. */ fun output(output: String?) = output(JsonField.ofNullable(output)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/RunStep.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/RunStep.kt index 3ba399b7c..99147529c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/RunStep.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/RunStep.kt @@ -109,7 +109,7 @@ private constructor( fun id(): String = id.getRequired("id") /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) * associated with the run step. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -193,8 +193,8 @@ private constructor( @JsonProperty("object") @ExcludeMissing fun _object_(): JsonValue = 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -219,7 +219,8 @@ private constructor( fun stepDetails(): StepDetails = stepDetails.getRequired("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -445,7 +446,7 @@ private constructor( fun id(id: JsonField) = apply { this.id = id } /** - * The ID of the [assistant](https://platform.openai.com/docs/api-reference/assistants) + * The ID of the [assistant](https://developers.openai.com/api/docs/assistants/migration) * associated with the run step. */ fun assistantId(assistantId: String) = assistantId(JsonField.of(assistantId)) @@ -611,8 +612,8 @@ private constructor( fun object_(object_: JsonValue) = apply { this.object_ = 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. */ fun runId(runId: String) = runId(JsonField.of(runId)) @@ -689,8 +690,8 @@ private constructor( stepDetails(ToolCallsStepDetails.builder().toolCalls(toolCalls).build()) /** - * 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. */ fun threadId(threadId: String) = threadId(JsonField.of(threadId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepListParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepListParams.kt index b8b84f35f..e1441261f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepListParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepListParams.kt @@ -54,7 +54,7 @@ private constructor( * 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. */ fun include(): Optional> = Optional.ofNullable(include) @@ -153,7 +153,7 @@ private constructor( * 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. */ fun include(include: List?) = apply { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepRetrieveParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepRetrieveParams.kt index 04d5d24e8..b2be804ba 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepRetrieveParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/beta/threads/runs/steps/StepRetrieveParams.kt @@ -35,7 +35,7 @@ private constructor( * 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. */ fun include(): Optional> = Optional.ofNullable(include) @@ -97,7 +97,7 @@ private constructor( * 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. */ fun include(include: List?) = apply { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletion.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletion.kt index 689c4b9fd..724a1dfec 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletion.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletion.kt @@ -155,12 +155,12 @@ private constructor( * 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 + * - 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](/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. + * - 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` @@ -440,12 +440,12 @@ private constructor( * 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 @@ -4847,12 +4847,12 @@ private constructor( * 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 + * - 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](/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. + * - 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` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAssistantMessageParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAssistantMessageParam.kt index 003009326..da1f70f47 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAssistantMessageParam.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAssistantMessageParam.kt @@ -74,7 +74,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -237,7 +237,7 @@ private constructor( /** * 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). */ fun audio(audio: Audio?) = audio(JsonField.ofNullable(audio)) @@ -463,7 +463,7 @@ private constructor( /** * 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). */ class Audio @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -880,7 +880,7 @@ private constructor( } } - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ @JsonDeserialize( using = ChatCompletionRequestAssistantMessageContentPart.Deserializer::class ) @@ -892,9 +892,7 @@ private constructor( private val _json: JsonValue? = null, ) { - /** - * Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). - */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun text(): Optional = Optional.ofNullable(text) fun refusal(): Optional = Optional.ofNullable(refusal) @@ -903,9 +901,7 @@ private constructor( fun isRefusal(): Boolean = refusal != null - /** - * Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). - */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun asText(): ChatCompletionContentPartText = text.getOrThrow("text") fun asRefusal(): ChatCompletionContentPartRefusal = refusal.getOrThrow("refusal") @@ -1036,8 +1032,7 @@ private constructor( companion object { /** - * Learn about - * [text inputs](https://platform.openai.com/docs/guides/text-generation). + * Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ @JvmStatic fun ofText(text: ChatCompletionContentPartText) = @@ -1055,8 +1050,7 @@ private constructor( interface Visitor { /** - * Learn about - * [text inputs](https://platform.openai.com/docs/guides/text-generation). + * Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun visitText(text: ChatCompletionContentPartText): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudio.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudio.kt index 4d87b984a..4219fda8a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudio.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudio.kt @@ -17,7 +17,7 @@ import java.util.Objects /** * 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). + * from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio). */ class ChatCompletionAudio @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt index 236f0edf0..45f84e8c5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt @@ -31,7 +31,7 @@ import kotlin.jvm.optionals.getOrNull /** * Parameters for audio output. Required when audio output is requested with `modalities: - * ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + * ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio). */ class ChatCompletionAudioParam @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionChunk.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionChunk.kt index 1ad40f437..771b96246 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionChunk.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionChunk.kt @@ -33,7 +33,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). + * provided input. [Learn more](https://developers.openai.com/api/docs/guides/streaming-responses). */ class ChatCompletionChunk @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -160,12 +160,12 @@ private constructor( * 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 + * - 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](/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. + * - 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` @@ -450,12 +450,12 @@ private constructor( * 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 @@ -6097,12 +6097,12 @@ private constructor( * 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 + * - 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](/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. + * - 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` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPart.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPart.kt index 6434fdab0..9221ca246 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPart.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPart.kt @@ -27,7 +27,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ +/** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ @JsonDeserialize(using = ChatCompletionContentPart.Deserializer::class) @JsonSerialize(using = ChatCompletionContentPart.Serializer::class) class ChatCompletionContentPart @@ -39,18 +39,19 @@ private constructor( private val _json: JsonValue? = null, ) { - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun text(): Optional = Optional.ofNullable(text) - /** Learn about [image inputs](https://platform.openai.com/docs/guides/vision). */ + /** Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). */ fun imageUrl(): Optional = Optional.ofNullable(imageUrl) - /** Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). */ + /** Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). */ fun inputAudio(): Optional = Optional.ofNullable(inputAudio) /** - * 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. */ fun file(): Optional = Optional.ofNullable(file) @@ -62,17 +63,18 @@ private constructor( fun isFile(): Boolean = file != null - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun asText(): ChatCompletionContentPartText = text.getOrThrow("text") - /** Learn about [image inputs](https://platform.openai.com/docs/guides/vision). */ + /** Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). */ fun asImageUrl(): ChatCompletionContentPartImage = imageUrl.getOrThrow("imageUrl") - /** Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). */ + /** Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). */ fun asInputAudio(): ChatCompletionContentPartInputAudio = inputAudio.getOrThrow("inputAudio") /** - * 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. */ fun asFile(): File = file.getOrThrow("file") @@ -210,22 +212,24 @@ private constructor( companion object { - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ @JvmStatic fun ofText(text: ChatCompletionContentPartText) = ChatCompletionContentPart(text = text) - /** Learn about [image inputs](https://platform.openai.com/docs/guides/vision). */ + /** + * Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). + */ @JvmStatic fun ofImageUrl(imageUrl: ChatCompletionContentPartImage) = ChatCompletionContentPart(imageUrl = imageUrl) - /** Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). */ + /** Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). */ @JvmStatic fun ofInputAudio(inputAudio: ChatCompletionContentPartInputAudio) = ChatCompletionContentPart(inputAudio = inputAudio) /** - * Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text + * Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text * generation. */ @JvmStatic fun ofFile(file: File) = ChatCompletionContentPart(file = file) @@ -237,17 +241,19 @@ private constructor( */ interface Visitor { - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun visitText(text: ChatCompletionContentPartText): T - /** Learn about [image inputs](https://platform.openai.com/docs/guides/vision). */ + /** + * Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). + */ fun visitImageUrl(imageUrl: ChatCompletionContentPartImage): T - /** Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). */ + /** Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). */ fun visitInputAudio(inputAudio: ChatCompletionContentPartInputAudio): T /** - * Learn about [file inputs](https://platform.openai.com/docs/guides/text) for text + * Learn about [file inputs](https://developers.openai.com/api/docs/guides/text) for text * generation. */ fun visitFile(file: File): T @@ -324,7 +330,8 @@ private constructor( } /** - * 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. */ class File @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartImage.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartImage.kt index 92cf76468..03537eedd 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartImage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartImage.kt @@ -18,7 +18,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Learn about [image inputs](https://platform.openai.com/docs/guides/vision). */ +/** Learn about [image inputs](https://developers.openai.com/api/docs/guides/images-vision). */ class ChatCompletionContentPartImage @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( @@ -277,7 +277,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -351,7 +351,7 @@ private constructor( /** * 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). */ fun detail(detail: Detail) = detail(JsonField.of(detail)) @@ -441,7 +441,7 @@ private constructor( /** * 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). */ class Detail @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartInputAudio.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartInputAudio.kt index 293ccfca5..cd8ea9db8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartInputAudio.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartInputAudio.kt @@ -18,7 +18,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Learn about [audio inputs](https://platform.openai.com/docs/guides/audio). */ +/** Learn about [audio inputs](https://developers.openai.com/api/docs/guides/audio). */ class ChatCompletionContentPartInputAudio @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartText.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartText.kt index 4a9bad87f..fd88bab13 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartText.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionContentPartText.kt @@ -17,7 +17,7 @@ import java.util.Objects import java.util.Optional import kotlin.jvm.optionals.getOrNull -/** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ +/** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ class ChatCompletionContentPartText @JsonCreator(mode = JsonCreator.Mode.DISABLED) private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt index ceaf1d93a..1b74e8af4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt @@ -45,21 +45,21 @@ import kotlin.jvm.optionals.getOrNull /** * **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. @@ -73,11 +73,10 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -87,8 +86,8 @@ private constructor( /** * 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. + * Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and + * compare available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -97,7 +96,7 @@ private constructor( /** * Parameters for audio output. Required when audio output is requested with `modalities: - * ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + * ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -170,7 +169,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -178,12 +177,12 @@ private constructor( fun maxCompletionTokens(): Optional = body.maxCompletionTokens() /** - * The maximum number of [tokens](/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. + * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -210,8 +209,8 @@ private constructor( * `["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"]` * @@ -240,7 +239,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -269,7 +268,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -283,8 +282,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -296,7 +295,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -318,7 +317,7 @@ private constructor( * `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 model-specific + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for model-specific * support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -331,7 +330,7 @@ private constructor( * * 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 preferred for models that support @@ -347,7 +346,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -371,12 +370,12 @@ private constructor( * 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 + * - 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](/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. + * - 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` @@ -401,8 +400,8 @@ private constructor( /** * 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. + * [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. * @@ -445,8 +444,8 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -481,7 +480,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -500,7 +499,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -821,11 +820,11 @@ private constructor( /** * A list of messages comprising the conversation so far. Depending on the - * [model](https://platform.openai.com/docs/models) you use, different message types + * [model](https://developers.openai.com/api/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). + * [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). */ fun messages(messages: List) = apply { body.messages(messages) } @@ -995,8 +994,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: ChatModel) = apply { body.model(model) } @@ -1018,7 +1017,7 @@ private constructor( /** * Parameters for audio output. Required when audio output is requested with `modalities: - * ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + * ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio). */ fun audio(audio: ChatCompletionAudioParam?) = apply { body.audio(audio) } @@ -1186,7 +1185,7 @@ private constructor( /** * 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). */ fun maxCompletionTokens(maxCompletionTokens: Long?) = apply { body.maxCompletionTokens(maxCompletionTokens) @@ -1218,12 +1217,12 @@ private constructor( } /** - * The maximum number of [tokens](/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. + * 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). + * with [o-series models](https://developers.openai.com/api/docs/guides/reasoning). */ @Deprecated("deprecated") fun maxTokens(maxTokens: Long?) = apply { body.maxTokens(maxTokens) } @@ -1277,8 +1276,8 @@ private constructor( * `["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"]` */ @@ -1347,7 +1346,7 @@ private constructor( /** * 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. */ fun parallelToolCalls(parallelToolCalls: Boolean) = apply { @@ -1421,7 +1420,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = apply { body.promptCacheKey(promptCacheKey) } @@ -1448,7 +1447,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = apply { @@ -1471,7 +1470,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -1512,8 +1511,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = apply { body.reasoningEffort(reasoningEffort) @@ -1539,7 +1538,7 @@ private constructor( * * 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 preferred for models @@ -1590,7 +1589,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = apply { body.safetyIdentifier(safetyIdentifier) @@ -1668,12 +1667,12 @@ private constructor( * 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 @@ -1723,8 +1722,8 @@ private constructor( /** * 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. + * [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. */ @@ -1848,8 +1847,8 @@ private constructor( /** * 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). */ fun tools(tools: List) = apply { body.tools(tools) } @@ -1971,7 +1970,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = apply { body.user(user) } @@ -2004,8 +2003,7 @@ private constructor( /** * 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). + * the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ fun webSearchOptions(webSearchOptions: WebSearchOptions) = apply { body.webSearchOptions(webSearchOptions) @@ -2346,11 +2344,11 @@ private constructor( /** * A list of messages comprising the conversation so far. Depending on the - * [model](https://platform.openai.com/docs/models) you use, different message types + * [model](https://developers.openai.com/api/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). + * [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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2360,8 +2358,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -2370,7 +2368,7 @@ private constructor( /** * Parameters for audio output. Required when audio output is requested with `modalities: - * ["audio"]`. [Learn more](https://platform.openai.com/docs/guides/audio). + * ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2445,7 +2443,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2454,12 +2452,12 @@ private constructor( maxCompletionTokens.getOptional("max_completion_tokens") /** - * The maximum number of [tokens](/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. + * 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). + * with [o-series models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2487,8 +2485,8 @@ private constructor( * `["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"]` * @@ -2517,7 +2515,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -2548,7 +2546,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2563,7 +2561,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -2577,7 +2575,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -2600,8 +2598,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2614,7 +2612,7 @@ private constructor( * * 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 preferred for models @@ -2631,7 +2629,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2655,12 +2653,12 @@ private constructor( * 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 @@ -2685,8 +2683,8 @@ private constructor( /** * 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. + * [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. * @@ -2732,8 +2730,8 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2768,7 +2766,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2787,8 +2785,7 @@ private constructor( /** * 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). + * the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -3235,11 +3232,11 @@ private constructor( /** * 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). */ fun messages(messages: List) = messages(JsonField.of(messages)) @@ -3441,8 +3438,9 @@ private constructor( /** * 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. + * price points. Refer to the + * [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. */ fun model(model: ChatModel) = model(JsonField.of(model)) @@ -3466,7 +3464,8 @@ private constructor( /** * 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). */ fun audio(audio: ChatCompletionAudioParam?) = audio(JsonField.ofNullable(audio)) @@ -3643,7 +3642,7 @@ private constructor( /** * 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). */ fun maxCompletionTokens(maxCompletionTokens: Long?) = maxCompletionTokens(JsonField.ofNullable(maxCompletionTokens)) @@ -3675,12 +3674,13 @@ private constructor( } /** - * 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). + * compatible with + * [o-series models](https://developers.openai.com/api/docs/guides/reasoning). */ @Deprecated("deprecated") fun maxTokens(maxTokens: Long?) = maxTokens(JsonField.ofNullable(maxTokens)) @@ -3735,8 +3735,8 @@ private constructor( * `["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"]` */ @@ -3815,7 +3815,7 @@ private constructor( /** * 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. */ fun parallelToolCalls(parallelToolCalls: Boolean) = @@ -3888,7 +3888,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = promptCacheKey(JsonField.ofNullable(promptCacheKey)) @@ -3916,8 +3916,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + * for current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = promptCacheOptions(JsonField.of(promptCacheOptions)) @@ -3938,7 +3938,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -3979,7 +3979,7 @@ private constructor( * `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. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = @@ -4006,7 +4006,7 @@ private constructor( * 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 preferred for @@ -4059,7 +4059,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = safetyIdentifier(JsonField.ofNullable(safetyIdentifier)) @@ -4115,12 +4115,13 @@ private constructor( * 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 @@ -4173,8 +4174,8 @@ private constructor( /** * 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. + * [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. */ @@ -4301,8 +4302,8 @@ private constructor( /** * 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). */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -4419,7 +4420,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = user(JsonField.of(user)) @@ -4454,7 +4455,7 @@ private constructor( /** * 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). */ fun webSearchOptions(webSearchOptions: WebSearchOptions) = webSearchOptions(JsonField.of(webSearchOptions)) @@ -5203,8 +5204,8 @@ private constructor( /** * 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 + * [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. @@ -5314,9 +5315,9 @@ private constructor( /** * 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. + * [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. */ @@ -6845,8 +6846,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. */ class PromptCacheOptions @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -7337,7 +7338,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -7494,7 +7495,7 @@ private constructor( * * 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 preferred for models that support @@ -7515,7 +7516,7 @@ private constructor( /** * 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). */ fun jsonSchema(): Optional = Optional.ofNullable(jsonSchema) @@ -7537,7 +7538,7 @@ private constructor( /** * 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). */ fun asJsonSchema(): ResponseFormatJsonSchema = jsonSchema.getOrThrow("jsonSchema") @@ -7681,7 +7682,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofJsonSchema(jsonSchema: ResponseFormatJsonSchema) = @@ -7709,7 +7710,7 @@ private constructor( /** * 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). */ fun visitJsonSchema(jsonSchema: ResponseFormatJsonSchema): T @@ -7787,12 +7788,12 @@ private constructor( * 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 + * - 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](/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. + * - 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` @@ -8319,7 +8320,7 @@ private constructor( /** * 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). */ class WebSearchOptions @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionMessage.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionMessage.kt index c2f02d6ba..827b942b2 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionMessage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionMessage.kt @@ -103,7 +103,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -112,7 +112,7 @@ private constructor( /** * 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). + * from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -281,7 +281,7 @@ private constructor( /** * 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). */ fun annotations(annotations: List) = annotations(JsonField.of(annotations)) @@ -310,7 +310,8 @@ private constructor( /** * 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). + * response from the model. + * [Learn more](https://developers.openai.com/api/docs/guides/audio). */ fun audio(audio: ChatCompletionAudio?) = audio(JsonField.ofNullable(audio)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionPredictionContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionPredictionContent.kt index b14132a2b..727204cfa 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionPredictionContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionPredictionContent.kt @@ -257,8 +257,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text inputs. */ fun arrayOfContentParts(): Optional> = Optional.ofNullable(arrayOfContentParts) @@ -275,8 +275,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text inputs. */ fun asArrayOfContentParts(): List = arrayOfContentParts.getOrThrow("arrayOfContentParts") @@ -407,8 +407,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text inputs. */ @JvmStatic fun ofArrayOfContentParts(arrayOfContentParts: List) = @@ -428,8 +428,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text inputs. */ fun visitArrayOfContentParts( arrayOfContentParts: List diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionStoreMessage.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionStoreMessage.kt index 74d6bc56f..b163a5eb4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionStoreMessage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionStoreMessage.kt @@ -122,7 +122,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -132,7 +132,7 @@ private constructor( /** * 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). + * from the model. [Learn more](https://developers.openai.com/api/docs/guides/audio). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -340,7 +340,7 @@ private constructor( /** * 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). */ fun annotations(annotations: List) = annotations(JsonField.of(annotations)) @@ -370,7 +370,8 @@ private constructor( /** * 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). + * response from the model. + * [Learn more](https://developers.openai.com/api/docs/guides/audio). */ fun audio(audio: ChatCompletionAudio?) = audio(JsonField.ofNullable(audio)) @@ -613,7 +614,7 @@ private constructor( (if (id.asKnown().isPresent) 1 else 0) + (contentParts.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ @JsonDeserialize(using = ContentPart.Deserializer::class) @JsonSerialize(using = ContentPart.Serializer::class) class ContentPart @@ -623,11 +624,13 @@ private constructor( private val _json: JsonValue? = null, ) { - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun chatCompletionContentPartText(): Optional = Optional.ofNullable(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). + */ fun chatCompletionContentPartImage(): Optional = Optional.ofNullable(chatCompletionContentPartImage) @@ -635,11 +638,13 @@ private constructor( fun isChatCompletionContentPartImage(): Boolean = chatCompletionContentPartImage != null - /** Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun asChatCompletionContentPartText(): ChatCompletionContentPartText = chatCompletionContentPartText.getOrThrow("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). + */ fun asChatCompletionContentPartImage(): ChatCompletionContentPartImage = chatCompletionContentPartImage.getOrThrow("chatCompletionContentPartImage") @@ -772,15 +777,16 @@ private constructor( companion object { - /** - * Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). - */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ @JvmStatic fun ofChatCompletionContentPartText( chatCompletionContentPartText: ChatCompletionContentPartText ) = ContentPart(chatCompletionContentPartText = 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). + */ @JvmStatic fun ofChatCompletionContentPartImage( chatCompletionContentPartImage: ChatCompletionContentPartImage @@ -793,14 +799,15 @@ private constructor( */ interface Visitor { - /** - * Learn about [text inputs](https://platform.openai.com/docs/guides/text-generation). - */ + /** Learn about [text inputs](https://developers.openai.com/api/docs/guides/text). */ fun visitChatCompletionContentPartText( chatCompletionContentPartText: ChatCompletionContentPartText ): T - /** Learn about [image inputs](https://platform.openai.com/docs/guides/vision). */ + /** + * Learn about + * [image inputs](https://developers.openai.com/api/docs/guides/images-vision). + */ fun visitChatCompletionContentPartImage( chatCompletionContentPartImage: ChatCompletionContentPartImage ): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionUserMessageParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionUserMessageParam.kt index 5a17982e8..12d4d7039 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionUserMessageParam.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionUserMessageParam.kt @@ -280,8 +280,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text, image, or audio inputs. */ fun arrayOfContentParts(): Optional> = Optional.ofNullable(arrayOfContentParts) @@ -295,8 +295,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text, image, or audio inputs. */ fun asArrayOfContentParts(): List = arrayOfContentParts.getOrThrow("arrayOfContentParts") @@ -424,8 +424,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text, image, or audio inputs. */ @JvmStatic fun ofArrayOfContentParts(arrayOfContentParts: List) = @@ -442,8 +442,8 @@ private constructor( /** * 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. + * [model](https://developers.openai.com/api/docs/models) being used to generate the + * response. Can contain text, image, or audio inputs. */ fun visitArrayOfContentParts(arrayOfContentParts: List): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/completions/CompletionCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/completions/CompletionCreateParams.kt index 113ab958a..654e320a7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/completions/CompletionCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/completions/CompletionCreateParams.kt @@ -48,9 +48,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -99,7 +99,7 @@ private constructor( * verbatim. * * [See more information about frequency and presence - * penalties.](https://platform.openai.com/docs/guides/text-generation) + * penalties.](https://developers.openai.com/api/docs/guides/text) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -111,10 +111,11 @@ private constructor( * * 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. @@ -138,7 +139,8 @@ private constructor( fun logprobs(): Optional = body.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. * [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) @@ -166,7 +168,7 @@ private constructor( * 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) + * penalties.](https://developers.openai.com/api/docs/guides/text) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -240,7 +242,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -421,9 +423,9 @@ private constructor( /** * 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. */ fun model(model: Model) = apply { body.model(model) } @@ -540,7 +542,7 @@ private constructor( * verbatim. * * [See more information about frequency and presence - * penalties.](https://platform.openai.com/docs/guides/text-generation) + * penalties.](https://developers.openai.com/api/docs/guides/text) */ fun frequencyPenalty(frequencyPenalty: Double?) = apply { body.frequencyPenalty(frequencyPenalty) @@ -574,11 +576,11 @@ private constructor( * * 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. @@ -626,7 +628,8 @@ private constructor( fun logprobs(logprobs: JsonField) = apply { body.logprobs(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. @@ -685,7 +688,7 @@ private constructor( * 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) + * penalties.](https://developers.openai.com/api/docs/guides/text) */ fun presencePenalty(presencePenalty: Double?) = apply { body.presencePenalty(presencePenalty) @@ -861,7 +864,7 @@ private constructor( /** * 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). */ fun user(user: String) = apply { body.user(user) } @@ -1094,9 +1097,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -1146,7 +1149,7 @@ private constructor( * verbatim. * * [See more information about frequency and presence - * penalties.](https://platform.openai.com/docs/guides/text-generation) + * penalties.](https://developers.openai.com/api/docs/guides/text) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1158,11 +1161,11 @@ private constructor( * * 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. @@ -1186,7 +1189,8 @@ private constructor( fun logprobs(): Optional = logprobs.getOptional("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. @@ -1215,7 +1219,7 @@ private constructor( * 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) + * penalties.](https://developers.openai.com/api/docs/guides/text) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1291,7 +1295,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1502,9 +1506,10 @@ private constructor( /** * 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. */ fun model(model: Model) = model(JsonField.of(model)) @@ -1625,7 +1630,7 @@ private constructor( * the same line verbatim. * * [See more information about frequency and presence - * penalties.](https://platform.openai.com/docs/guides/text-generation) + * penalties.](https://developers.openai.com/api/docs/guides/text) */ fun frequencyPenalty(frequencyPenalty: Double?) = frequencyPenalty(JsonField.ofNullable(frequencyPenalty)) @@ -1660,11 +1665,11 @@ private constructor( * * 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. @@ -1713,7 +1718,8 @@ private constructor( fun logprobs(logprobs: JsonField) = apply { this.logprobs = 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. @@ -1775,7 +1781,7 @@ private constructor( * topics. * * [See more information about frequency and presence - * penalties.](https://platform.openai.com/docs/guides/text-generation) + * penalties.](https://developers.openai.com/api/docs/guides/text) */ fun presencePenalty(presencePenalty: Double?) = presencePenalty(JsonField.ofNullable(presencePenalty)) @@ -1957,7 +1963,7 @@ private constructor( /** * 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). */ fun user(user: String) = user(JsonField.of(user)) @@ -2152,9 +2158,9 @@ private constructor( /** * 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. */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -2571,10 +2577,11 @@ private constructor( * * 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. diff --git a/openai-java-core/src/main/kotlin/com/openai/models/contentprovenancechecks/ContentProvenanceCheckCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/contentprovenancechecks/ContentProvenanceCheckCreateParams.kt index f5959ed8e..03b650eb9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/contentprovenancechecks/ContentProvenanceCheckCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/contentprovenancechecks/ContentProvenanceCheckCreateParams.kt @@ -23,7 +23,7 @@ import kotlin.io.path.name /** * 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 metadata was stripped or has evidence of diff --git a/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt b/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt index 2012373b8..e6ebe8e25 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt @@ -533,7 +533,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -582,7 +582,7 @@ private constructor( /** * 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). */ fun asInputImage(): ResponseInputImage = inputImage.getOrThrow("inputImage") @@ -816,7 +816,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: ResponseInputImage) = Content(inputImage = inputImage) @@ -856,7 +856,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: ResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt index 8dd28f046..8239a777f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt @@ -65,7 +65,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ @JsonDeserialize(using = ConversationItem.Deserializer::class) @JsonSerialize(using = ConversationItem.Serializer::class) @@ -108,8 +108,8 @@ private constructor( /** * 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. */ fun functionCall(): Optional = Optional.ofNullable(functionCall) @@ -118,14 +118,14 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun fileSearchCall(): Optional = Optional.ofNullable(fileSearchCall) /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun webSearchCall(): Optional = Optional.ofNullable(webSearchCall) @@ -136,8 +136,8 @@ private constructor( /** * 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. */ fun computerCall(): Optional = Optional.ofNullable(computerCall) @@ -162,7 +162,7 @@ private constructor( * 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). */ fun reasoning(): Optional = Optional.ofNullable(reasoning) @@ -172,7 +172,7 @@ private constructor( /** * 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). */ fun compaction(): Optional = Optional.ofNullable(compaction) @@ -284,8 +284,8 @@ private constructor( /** * 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. */ fun asFunctionCall(): ResponseFunctionToolCallItem = functionCall.getOrThrow("functionCall") @@ -294,14 +294,14 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun asFileSearchCall(): ResponseFileSearchToolCall = fileSearchCall.getOrThrow("fileSearchCall") /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun asWebSearchCall(): ResponseFunctionWebSearch = webSearchCall.getOrThrow("webSearchCall") @@ -312,8 +312,8 @@ private constructor( /** * 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. */ fun asComputerCall(): ResponseComputerToolCall = computerCall.getOrThrow("computerCall") @@ -338,7 +338,7 @@ private constructor( * 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). */ fun asReasoning(): ResponseReasoningItem = reasoning.getOrThrow("reasoning") @@ -348,7 +348,7 @@ private constructor( /** * 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). */ fun asCompaction(): ResponseCompactionItem = compaction.getOrThrow("compaction") @@ -843,8 +843,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFunctionCall(functionCall: ResponseFunctionToolCallItem) = @@ -856,8 +856,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFileSearchCall(fileSearchCall: ResponseFileSearchToolCall) = @@ -865,8 +865,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofWebSearchCall(webSearchCall: ResponseFunctionWebSearch) = @@ -879,8 +879,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofComputerCall(computerCall: ResponseComputerToolCall) = @@ -914,7 +914,7 @@ private constructor( * 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). */ @JvmStatic fun ofReasoning(reasoning: ResponseReasoningItem) = ConversationItem(reasoning = reasoning) @@ -927,7 +927,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofCompaction(compaction: ResponseCompactionItem) = @@ -1008,8 +1008,8 @@ private constructor( /** * 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. */ fun visitFunctionCall(functionCall: ResponseFunctionToolCallItem): T @@ -1017,15 +1017,15 @@ private constructor( /** * 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. */ fun visitFileSearchCall(fileSearchCall: ResponseFileSearchToolCall): T /** * 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. */ fun visitWebSearchCall(webSearchCall: ResponseFunctionWebSearch): T @@ -1034,8 +1034,8 @@ private constructor( /** * 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. */ fun visitComputerCall(computerCall: ResponseComputerToolCall): T @@ -1057,7 +1057,7 @@ private constructor( * 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). */ fun visitReasoning(reasoning: ResponseReasoningItem): T @@ -1067,7 +1067,7 @@ private constructor( /** * 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). */ fun visitCompaction(compaction: ResponseCompactionItem): T @@ -1350,7 +1350,11 @@ private constructor( private val result: JsonField, private val status: JsonField, private val type: JsonValue, + private val action: JsonField, + private val background: JsonField, + private val outputFormat: JsonField, private val quality: JsonField, + private val revisedPrompt: JsonField, private val size: JsonField, private val additionalProperties: MutableMap, ) { @@ -1361,9 +1365,31 @@ private constructor( @JsonProperty("result") @ExcludeMissing result: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), + @JsonProperty("background") + @ExcludeMissing + background: JsonField = JsonMissing.of(), + @JsonProperty("output_format") + @ExcludeMissing + outputFormat: JsonField = JsonMissing.of(), @JsonProperty("quality") @ExcludeMissing quality: JsonField = JsonMissing.of(), + @JsonProperty("revised_prompt") + @ExcludeMissing + revisedPrompt: JsonField = JsonMissing.of(), @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), - ) : this(id, result, status, type, quality, size, mutableMapOf()) + ) : this( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + mutableMapOf(), + ) /** * The unique ID of the image generation call. @@ -1402,6 +1428,30 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * The action used for image generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + + /** + * The background setting used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun background(): Optional = background.getOptional("background") + + /** + * The output format used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun outputFormat(): Optional = outputFormat.getOptional("output_format") + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -1411,6 +1461,14 @@ private constructor( */ fun quality(): Optional = quality.getOptional("quality") + /** + * The prompt that was used after any model prompt rewriting. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun revisedPrompt(): Optional = revisedPrompt.getOptional("revised_prompt") + /** * The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. * @@ -1440,6 +1498,32 @@ private constructor( */ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + + /** + * Returns the raw JSON value of [background]. + * + * Unlike [background], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("background") + @ExcludeMissing + fun _background(): JsonField = background + + /** + * Returns the raw JSON value of [outputFormat]. + * + * Unlike [outputFormat], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_format") + @ExcludeMissing + fun _outputFormat(): JsonField = outputFormat + /** * Returns the raw JSON value of [quality]. * @@ -1447,6 +1531,16 @@ private constructor( */ @JsonProperty("quality") @ExcludeMissing fun _quality(): JsonField = quality + /** + * Returns the raw JSON value of [revisedPrompt]. + * + * Unlike [revisedPrompt], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("revised_prompt") + @ExcludeMissing + fun _revisedPrompt(): JsonField = revisedPrompt + /** * Returns the raw JSON value of [size]. * @@ -1488,7 +1582,11 @@ private constructor( private var result: JsonField? = null private var status: JsonField? = null private var type: JsonValue = JsonValue.from("image_generation_call") + private var action: JsonField = JsonMissing.of() + private var background: JsonField = JsonMissing.of() + private var outputFormat: JsonField = JsonMissing.of() private var quality: JsonField = JsonMissing.of() + private var revisedPrompt: JsonField = JsonMissing.of() private var size: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -1498,7 +1596,11 @@ private constructor( result = imageGenerationCall.result status = imageGenerationCall.status type = imageGenerationCall.type + action = imageGenerationCall.action + background = imageGenerationCall.background + outputFormat = imageGenerationCall.outputFormat quality = imageGenerationCall.quality + revisedPrompt = imageGenerationCall.revisedPrompt size = imageGenerationCall.size additionalProperties = imageGenerationCall.additionalProperties.toMutableMap() } @@ -1556,6 +1658,57 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** The action used for image generation. */ + fun action(action: Action?) = action(JsonField.ofNullable(action)) + + /** Alias for calling [Builder.action] with `action.orElse(null)`. */ + fun action(action: Optional) = action(action.getOrNull()) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + + /** The background setting used for generation. */ + fun background(background: Background?) = background(JsonField.ofNullable(background)) + + /** Alias for calling [Builder.background] with `background.orElse(null)`. */ + fun background(background: Optional) = background(background.getOrNull()) + + /** + * Sets [Builder.background] to an arbitrary JSON value. + * + * You should usually call [Builder.background] with a well-typed [Background] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun background(background: JsonField) = apply { + this.background = background + } + + /** The output format used for generation. */ + fun outputFormat(outputFormat: OutputFormat?) = + outputFormat(JsonField.ofNullable(outputFormat)) + + /** Alias for calling [Builder.outputFormat] with `outputFormat.orElse(null)`. */ + fun outputFormat(outputFormat: Optional) = + outputFormat(outputFormat.getOrNull()) + + /** + * Sets [Builder.outputFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.outputFormat] with a well-typed [OutputFormat] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputFormat(outputFormat: JsonField) = apply { + this.outputFormat = outputFormat + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -1574,6 +1727,25 @@ private constructor( */ fun quality(quality: JsonField) = apply { this.quality = quality } + /** The prompt that was used after any model prompt rewriting. */ + fun revisedPrompt(revisedPrompt: String?) = + revisedPrompt(JsonField.ofNullable(revisedPrompt)) + + /** Alias for calling [Builder.revisedPrompt] with `revisedPrompt.orElse(null)`. */ + fun revisedPrompt(revisedPrompt: Optional) = + revisedPrompt(revisedPrompt.getOrNull()) + + /** + * Sets [Builder.revisedPrompt] to an arbitrary JSON value. + * + * You should usually call [Builder.revisedPrompt] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun revisedPrompt(revisedPrompt: JsonField) = apply { + this.revisedPrompt = revisedPrompt + } + /** The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. */ fun size(size: Size?) = size(JsonField.ofNullable(size)) @@ -1636,7 +1808,11 @@ private constructor( checkRequired("result", result), checkRequired("status", status), type, + action, + background, + outputFormat, quality, + revisedPrompt, size, additionalProperties.toMutableMap(), ) @@ -1666,7 +1842,11 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } + background().ifPresent { it.validate() } + outputFormat().ifPresent { it.validate() } quality().ifPresent { it.validate() } + revisedPrompt() size() validated = true } @@ -1691,7 +1871,11 @@ private constructor( (if (result.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + type.let { if (it == JsonValue.from("image_generation_call")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + + (background.asKnown().getOrNull()?.validity() ?: 0) + + (outputFormat.asKnown().getOrNull()?.validity() ?: 0) + (quality.asKnown().getOrNull()?.validity() ?: 0) + + (if (revisedPrompt.asKnown().isPresent) 1 else 0) + (if (size.asKnown().isPresent) 1 else 0) /** The status of the image generation call. */ @@ -1846,6 +2030,448 @@ private constructor( override fun toString() = value.toString() } + /** The action used for image generation. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The background setting used for generation. */ + class Background @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val TRANSPARENT = of("transparent") + + @JvmField val OPAQUE = of("opaque") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Background(JsonField.of(value)) + } + + /** An enum containing [Background]'s known values. */ + enum class Known { + TRANSPARENT, + OPAQUE, + AUTO, + } + + /** + * An enum containing [Background]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Background] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + TRANSPARENT, + OPAQUE, + AUTO, + /** + * An enum member indicating that [Background] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + TRANSPARENT -> Value.TRANSPARENT + OPAQUE -> Value.OPAQUE + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + TRANSPARENT -> Known.TRANSPARENT + OPAQUE -> Known.OPAQUE + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Background: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Background = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Background && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The output format used for generation. */ + class OutputFormat @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PNG = of("png") + + @JvmField val WEBP = of("webp") + + @JvmField val JPEG = of("jpeg") + + @JvmStatic fun of(value: String) = OutputFormat(JsonField.of(value)) + } + + /** An enum containing [OutputFormat]'s known values. */ + enum class Known { + PNG, + WEBP, + JPEG, + } + + /** + * An enum containing [OutputFormat]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [OutputFormat] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PNG, + WEBP, + JPEG, + /** + * An enum member indicating that [OutputFormat] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PNG -> Value.PNG + WEBP -> Value.WEBP + JPEG -> Value.JPEG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PNG -> Known.PNG + WEBP -> Known.WEBP + JPEG -> Known.JPEG + else -> throw OpenAIInvalidDataException("Unknown OutputFormat: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): OutputFormat = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is OutputFormat && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -2168,19 +2794,35 @@ private constructor( result == other.result && status == other.status && type == other.type && + action == other.action && + background == other.background && + outputFormat == other.outputFormat && quality == other.quality && + revisedPrompt == other.revisedPrompt && size == other.size && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, result, status, type, quality, size, additionalProperties) + Objects.hash( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, action=$action, background=$background, outputFormat=$outputFormat, quality=$quality, revisedPrompt=$revisedPrompt, size=$size, additionalProperties=$additionalProperties}" } class AdditionalTools diff --git a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemCreateParams.kt index 41e4c1539..9ae674206 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemCreateParams.kt @@ -53,7 +53,7 @@ private constructor( /** * 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. */ fun include(): Optional> = Optional.ofNullable(include) @@ -122,7 +122,7 @@ private constructor( /** * 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. */ fun include(include: List?) = apply { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemRetrieveParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemRetrieveParams.kt index db92549a9..efae2cad2 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemRetrieveParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemRetrieveParams.kt @@ -28,7 +28,7 @@ private constructor( /** * 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. */ fun include(): Optional> = Optional.ofNullable(include) @@ -81,7 +81,7 @@ private constructor( /** * 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. */ fun include(include: List?) = apply { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/embeddings/Embedding.kt b/openai-java-core/src/main/kotlin/com/openai/models/embeddings/Embedding.kt index f4a46b630..f244f7e32 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/embeddings/Embedding.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/embeddings/Embedding.kt @@ -38,7 +38,7 @@ private constructor( /** * 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). + * listed in the [embedding guide](https://developers.openai.com/api/docs/guides/embeddings). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -150,7 +150,7 @@ private constructor( /** * 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). */ fun embedding(floats: List) = embedding(EmbeddingValue.ofFloats(floats)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/embeddings/EmbeddingCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/embeddings/EmbeddingCreateParams.kt index 620bec18e..1a04e7908 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/embeddings/EmbeddingCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/embeddings/EmbeddingCreateParams.kt @@ -57,9 +57,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -87,7 +87,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -220,9 +220,9 @@ private constructor( /** * 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. */ fun model(model: EmbeddingModel) = apply { body.model(model) } @@ -279,7 +279,7 @@ private constructor( /** * 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). */ fun user(user: String) = apply { body.user(user) } @@ -477,9 +477,9 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -508,7 +508,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -637,9 +637,10 @@ private constructor( /** * 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. */ fun model(model: EmbeddingModel) = model(JsonField.of(model)) @@ -697,7 +698,7 @@ private constructor( /** * 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). */ fun user(user: String) = user(JsonField.of(user)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/EvalCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/EvalCreateParams.kt index 0f9b9c102..6c9c8e037 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/evals/EvalCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/EvalCreateParams.kt @@ -46,7 +46,7 @@ import kotlin.jvm.optionals.getOrNull * 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). + * more information, see the [Evals guide](https://developers.openai.com/api/docs/guides/evals). */ class EvalCreateParams private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/CreateEvalCompletionsRunDataSource.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/CreateEvalCompletionsRunDataSource.kt index 84eb9e844..43bd040b5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/CreateEvalCompletionsRunDataSource.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/CreateEvalCompletionsRunDataSource.kt @@ -4776,8 +4776,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -4790,7 +4790,7 @@ private constructor( * * 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 preferred for models @@ -4960,7 +4960,7 @@ private constructor( * `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. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = @@ -4987,7 +4987,7 @@ private constructor( * 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 preferred for @@ -5183,7 +5183,7 @@ private constructor( * * 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 preferred for models @@ -5205,7 +5205,7 @@ private constructor( /** * 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). */ fun jsonSchema(): Optional = Optional.ofNullable(jsonSchema) @@ -5228,7 +5228,7 @@ private constructor( /** * 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). */ fun asJsonSchema(): ResponseFormatJsonSchema = jsonSchema.getOrThrow("jsonSchema") @@ -5374,7 +5374,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofJsonSchema(jsonSchema: ResponseFormatJsonSchema) = @@ -5402,7 +5402,7 @@ private constructor( /** * 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). */ fun visitJsonSchema(jsonSchema: ResponseFormatJsonSchema): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt index 3911796ba..c9d1a6579 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCancelResponse.kt @@ -2894,8 +2894,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type * (e.g. if the server responded with an unexpected value). @@ -3211,8 +3211,8 @@ private constructor( * `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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6399,7 +6399,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. @@ -6427,9 +6427,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6443,12 +6443,13 @@ private constructor( * 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). + * [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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6590,8 +6591,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6643,9 +6644,10 @@ private constructor( /** * 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) + * - [Text inputs and + * outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ fun text(text: Text) = text(JsonField.of(text)) @@ -6665,13 +6667,14 @@ private constructor( * 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). + * [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). */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -6932,9 +6935,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ class Text @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -6955,7 +6958,7 @@ private constructor( * * 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. * @@ -7016,7 +7019,7 @@ private constructor( * * 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/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt index 2aff497cd..717c717d3 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateParams.kt @@ -2657,8 +2657,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type * (e.g. if the server responded with an unexpected value). @@ -2972,8 +2972,8 @@ private constructor( * `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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6295,7 +6295,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. @@ -6323,9 +6323,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6339,12 +6339,13 @@ private constructor( * 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). + * [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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6486,8 +6487,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6539,9 +6540,10 @@ private constructor( /** * 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) + * - [Text inputs and + * outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ fun text(text: Text) = text(JsonField.of(text)) @@ -6561,13 +6563,14 @@ private constructor( * 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). + * [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). */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -6828,9 +6831,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ class Text @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -6851,7 +6854,7 @@ private constructor( * * 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. * @@ -6912,7 +6915,7 @@ private constructor( * * 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/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt index 34c8bd6a7..7b591a9be 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunCreateResponse.kt @@ -2894,8 +2894,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type * (e.g. if the server responded with an unexpected value). @@ -3211,8 +3211,8 @@ private constructor( * `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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6399,7 +6399,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. @@ -6427,9 +6427,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6443,12 +6443,13 @@ private constructor( * 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). + * [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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6590,8 +6591,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6643,9 +6644,10 @@ private constructor( /** * 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) + * - [Text inputs and + * outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ fun text(text: Text) = text(JsonField.of(text)) @@ -6665,13 +6667,14 @@ private constructor( * 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). + * [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). */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -6932,9 +6935,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ class Text @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -6955,7 +6958,7 @@ private constructor( * * 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. * @@ -7016,7 +7019,7 @@ private constructor( * * 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/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt index 5019560d0..f6fd7ad74 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunListResponse.kt @@ -2894,8 +2894,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type * (e.g. if the server responded with an unexpected value). @@ -3211,8 +3211,8 @@ private constructor( * `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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6399,7 +6399,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. @@ -6427,9 +6427,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6443,12 +6443,13 @@ private constructor( * 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). + * [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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6590,8 +6591,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6643,9 +6644,10 @@ private constructor( /** * 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) + * - [Text inputs and + * outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ fun text(text: Text) = text(JsonField.of(text)) @@ -6665,13 +6667,14 @@ private constructor( * 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). + * [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). */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -6932,9 +6935,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ class Text @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -6955,7 +6958,7 @@ private constructor( * * 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. * @@ -7016,7 +7019,7 @@ private constructor( * * 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/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt index 87a62ca5b..7cb2a48f9 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/evals/runs/RunRetrieveResponse.kt @@ -2894,8 +2894,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type * (e.g. if the server responded with an unexpected value). @@ -3211,8 +3211,8 @@ private constructor( * `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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6399,7 +6399,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. @@ -6427,9 +6427,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6443,12 +6443,13 @@ private constructor( * 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). + * [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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. * if the server responded with an unexpected value). @@ -6590,8 +6591,8 @@ private constructor( * 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 - * model-specific support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) + * for model-specific support. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = reasoningEffort(JsonField.ofNullable(reasoningEffort)) @@ -6643,9 +6644,10 @@ private constructor( /** * 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) + * - [Text inputs and + * outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ fun text(text: Text) = text(JsonField.of(text)) @@ -6665,13 +6667,14 @@ private constructor( * 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). + * [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). */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -6932,9 +6935,9 @@ private constructor( /** * 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) + * - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text) * - [Structured - * Outputs](https://platform.openai.com/docs/guides/structured-outputs) + * Outputs](https://developers.openai.com/api/docs/guides/structured-outputs) */ class Text @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -6955,7 +6958,7 @@ private constructor( * * 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. * @@ -7016,7 +7019,7 @@ private constructor( * * 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/openai-java-core/src/main/kotlin/com/openai/models/files/FileCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/files/FileCreateParams.kt index 96e791f67..8c4bbdfec 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/files/FileCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/files/FileCreateParams.kt @@ -28,16 +28,19 @@ import kotlin.io.path.name * limit. Uploads to this endpoint are rate-limited to 1,000 requests per minute per authenticated * 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 details. + * [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) + * for fine-tuning + * [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). + * required + * [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/openai-java-core/src/main/kotlin/com/openai/models/finetuning/alpha/graders/GraderRunParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/alpha/graders/GraderRunParams.kt index 904cb9755..a1b252957 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/alpha/graders/GraderRunParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/alpha/graders/GraderRunParams.kt @@ -53,7 +53,7 @@ private constructor( /** * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -63,7 +63,7 @@ private constructor( /** * 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. + * See [the guide](https://developers.openai.com/api/docs/guides/graders) for more details. * * This arbitrary value can be deserialized into a custom type using the `convert` method: * ```java @@ -163,9 +163,9 @@ private constructor( /** * 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. + * 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. */ fun modelSample(modelSample: String) = apply { body.modelSample(modelSample) } @@ -180,8 +180,8 @@ private constructor( /** * 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. + * namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for + * more details. */ fun item(item: JsonValue) = apply { body.item(item) } @@ -353,9 +353,9 @@ private constructor( /** * 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. + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -364,8 +364,8 @@ private constructor( /** * 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. + * namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for + * more details. * * This arbitrary value can be deserialized into a custom type using the `convert` method: * ```java @@ -462,9 +462,9 @@ private constructor( /** * 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. + * 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. */ fun modelSample(modelSample: String) = modelSample(JsonField.of(modelSample)) @@ -481,8 +481,8 @@ private constructor( /** * 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. + * namespace. See [the guide](https://developers.openai.com/api/docs/guides/graders) for + * more details. */ fun item(item: JsonValue) = apply { this.item = item } diff --git a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionCreateParams.kt index 49ac10431..c7e40e832 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionCreateParams.kt @@ -23,7 +23,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **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. diff --git a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionDeleteParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionDeleteParams.kt index 10523da36..5d42050be 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionDeleteParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionDeleteParams.kt @@ -13,7 +13,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **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/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionListParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionListParams.kt index 199b5844c..8f6072b77 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionListParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionListParams.kt @@ -14,7 +14,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **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. diff --git a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionRetrieveParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionRetrieveParams.kt index 2d392ff68..dd10d2393 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionRetrieveParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/checkpoints/permissions/PermissionRetrieveParams.kt @@ -14,7 +14,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * **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. diff --git a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt index 11ad8389d..1ef9d8831 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/FineTuningJob.kt @@ -207,7 +207,7 @@ private constructor( /** * 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). + * the [Files API](https://developers.openai.com/api/reference/resources/files/methods/content). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -242,7 +242,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -251,7 +251,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -673,7 +673,7 @@ private constructor( /** * 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). */ fun resultFiles(resultFiles: List) = resultFiles(JsonField.of(resultFiles)) @@ -754,7 +754,7 @@ private constructor( /** * 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). */ fun trainingFile(trainingFile: String) = trainingFile(JsonField.of(trainingFile)) @@ -771,7 +771,7 @@ private constructor( /** * 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). */ fun validationFile(validationFile: String?) = validationFile(JsonField.ofNullable(validationFile)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobCreateParams.kt index 541ba22ce..61d518283 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobCreateParams.kt @@ -43,7 +43,7 @@ import kotlin.jvm.optionals.getOrNull * 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) */ class JobCreateParams private constructor( @@ -54,7 +54,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -64,21 +64,21 @@ private constructor( /** * 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) + * [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) for - * more details. + * See the [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) + * for more details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -155,8 +155,8 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -281,7 +281,7 @@ private constructor( /** * 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). */ fun model(model: Model) = apply { body.model(model) } @@ -304,21 +304,23 @@ private constructor( /** * 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) + * [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) - * for more details. + * See the + * [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for + * more details. */ fun trainingFile(trainingFile: String) = apply { body.trainingFile(trainingFile) } @@ -468,8 +470,9 @@ private constructor( * 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. */ fun validationFile(validationFile: String?) = apply { body.validationFile(validationFile) } @@ -679,7 +682,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -689,21 +692,23 @@ private constructor( /** * 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) + * [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) - * for more details. + * See the + * [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) for + * more details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -781,8 +786,9 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -921,7 +927,7 @@ private constructor( /** * 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). */ fun model(model: Model) = model(JsonField.of(model)) @@ -946,22 +952,23 @@ private constructor( /** * 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) + * [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) for - * more details. + * [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) + * for more details. */ fun trainingFile(trainingFile: String) = trainingFile(JsonField.of(trainingFile)) @@ -1118,8 +1125,8 @@ private constructor( * purpose `fine-tune`. * * See the - * [fine-tuning guide](https://platform.openai.com/docs/guides/model-optimization) for - * more details. + * [fine-tuning guide](https://developers.openai.com/api/docs/guides/model-optimization) + * for more details. */ fun validationFile(validationFile: String?) = validationFile(JsonField.ofNullable(validationFile)) @@ -1281,7 +1288,7 @@ private constructor( /** * 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). */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobRetrieveParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobRetrieveParams.kt index 699e0b9c0..650e56a0c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobRetrieveParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/finetuning/jobs/JobRetrieveParams.kt @@ -12,7 +12,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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) */ class JobRetrieveParams private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/graders/gradermodels/ScoreModelGrader.kt b/openai-java-core/src/main/kotlin/com/openai/models/graders/gradermodels/ScoreModelGrader.kt index 88ed993ab..e17e70e51 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/graders/gradermodels/ScoreModelGrader.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/graders/gradermodels/ScoreModelGrader.kt @@ -1865,8 +1865,8 @@ private constructor( * `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 model-specific - * support. + * [reasoning guide](https://developers.openai.com/api/docs/guides/reasoning) for + * model-specific support. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2014,7 +2014,7 @@ private constructor( * `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. */ fun reasoningEffort(reasoningEffort: ReasoningEffort?) = diff --git a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageCreateVariationParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageCreateVariationParams.kt index 780acfcbc..2443a6eae 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageCreateVariationParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageCreateVariationParams.kt @@ -79,7 +79,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -293,7 +293,7 @@ private constructor( /** * 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). */ fun user(user: String) = apply { body.user(user) } @@ -514,7 +514,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -735,7 +735,7 @@ private constructor( /** * 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). */ fun user(user: String) = user(MultipartField.of(user)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt index 00af1f40f..b03eb2781 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt @@ -196,7 +196,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -730,7 +730,7 @@ private constructor( /** * 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). */ fun user(user: String) = apply { body.user(user) } @@ -1080,7 +1080,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1668,7 +1668,7 @@ private constructor( /** * 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). */ fun user(user: String) = user(MultipartField.of(user)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageGenerateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageGenerateParams.kt index 2a439b77b..2687f3dbc 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageGenerateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageGenerateParams.kt @@ -22,7 +22,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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). */ class ImageGenerateParams private constructor( @@ -172,7 +173,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -618,7 +619,7 @@ private constructor( /** * 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). */ fun user(user: String) = apply { body.user(user) } @@ -981,7 +982,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1469,7 +1470,7 @@ private constructor( /** * 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). */ fun user(user: String) = user(JsonField.of(user)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/moderations/ModerationCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/moderations/ModerationCreateParams.kt index a5b513bae..7ef77a331 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/moderations/ModerationCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/moderations/ModerationCreateParams.kt @@ -33,8 +33,8 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * Classifies if text and/or image inputs are potentially harmful. Learn more in the - * [moderation guide](https://platform.openai.com/docs/guides/moderation). + * Classifies if text and/or image inputs are potentially harmful. Learn more in + * [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). */ class ModerationCreateParams private constructor( @@ -54,8 +54,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -153,8 +152,7 @@ private constructor( /** * 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). */ fun model(model: ModerationModel) = apply { body.model(model) } @@ -346,8 +344,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -438,8 +435,7 @@ private constructor( /** * 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). */ fun model(model: ModerationModel) = model(JsonField.of(model)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/AudioTranscription.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/AudioTranscription.kt index 5d34fadef..437969f83 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/AudioTranscription.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/AudioTranscription.kt @@ -98,7 +98,7 @@ private constructor( /** * 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. @@ -306,7 +306,7 @@ private constructor( /** * 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/openai-java-core/src/main/kotlin/com/openai/models/realtime/OutputAudioBufferClearEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/OutputAudioBufferClearEvent.kt index c0b28c7b2..1ff251346 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/OutputAudioBufferClearEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/OutputAudioBufferClearEvent.kt @@ -19,7 +19,7 @@ import java.util.Optional * **WebRTC/SIP Only:** Emit to cut off the current audio response. This will 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). */ class OutputAudioBufferClearEvent @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigInput.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigInput.kt index a941f725f..b2fa58d9d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigInput.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigInput.kt @@ -65,7 +65,7 @@ private constructor( * 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) + * [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. @@ -215,7 +215,7 @@ private constructor( * 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) + * [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/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeClientEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeClientEvent.kt index 14c5f32eb..01bcb8b6e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeClientEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeClientEvent.kt @@ -110,7 +110,7 @@ private constructor( * **WebRTC/SIP Only:** Emit to cut off the current audio response. This will 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). */ fun outputAudioBufferClear(): Optional = Optional.ofNullable(outputAudioBufferClear) @@ -269,7 +269,7 @@ private constructor( * **WebRTC/SIP Only:** Emit to cut off the current audio response. This will 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). */ fun asOutputAudioBufferClear(): OutputAudioBufferClearEvent = outputAudioBufferClear.getOrThrow("outputAudioBufferClear") @@ -672,7 +672,7 @@ private constructor( * 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). */ @JvmStatic fun ofOutputAudioBufferClear(outputAudioBufferClear: OutputAudioBufferClearEvent) = @@ -826,7 +826,7 @@ private constructor( * 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). */ fun visitOutputAudioBufferClear(outputAudioBufferClear: OutputAudioBufferClearEvent): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateMcpTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateMcpTool.kt index c5b8ee424..c8e6c2bf1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateMcpTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateMcpTool.kt @@ -33,7 +33,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class RealtimeResponseCreateMcpTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -150,7 +150,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` @@ -476,7 +476,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` @@ -1312,7 +1312,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateParams.kt index e86fa51e0..ff4c6f7c5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateParams.kt @@ -195,7 +195,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -682,7 +682,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -1784,7 +1784,7 @@ private constructor( /** * 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). */ @JsonDeserialize(using = Tool.Deserializer::class) @JsonSerialize(using = Tool.Serializer::class) @@ -1801,7 +1801,7 @@ private constructor( /** * 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). */ fun realtimeResponseCreateMcp(): Optional = Optional.ofNullable(realtimeResponseCreateMcp) @@ -1816,7 +1816,7 @@ private constructor( /** * 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). */ fun asRealtimeResponseCreateMcp(): RealtimeResponseCreateMcpTool = realtimeResponseCreateMcp.getOrThrow("realtimeResponseCreateMcp") @@ -1951,7 +1951,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofRealtimeResponseCreateMcp( @@ -1967,7 +1967,7 @@ private constructor( /** * 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). */ fun visitRealtimeResponseCreateMcp( realtimeResponseCreateMcp: RealtimeResponseCreateMcpTool diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeServerEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeServerEvent.kt index d7c19951d..73d1aa713 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeServerEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeServerEvent.kt @@ -331,7 +331,7 @@ private constructor( * **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). */ fun outputAudioBufferStarted(): Optional = Optional.ofNullable(outputAudioBufferStarted) @@ -340,7 +340,7 @@ private constructor( * **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). */ fun outputAudioBufferStopped(): Optional = Optional.ofNullable(outputAudioBufferStopped) @@ -350,7 +350,7 @@ private constructor( * VAD 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). */ fun outputAudioBufferCleared(): Optional = Optional.ofNullable(outputAudioBufferCleared) @@ -779,7 +779,7 @@ private constructor( * **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). */ fun asOutputAudioBufferStarted(): OutputAudioBufferStarted = outputAudioBufferStarted.getOrThrow("outputAudioBufferStarted") @@ -788,7 +788,7 @@ private constructor( * **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). */ fun asOutputAudioBufferStopped(): OutputAudioBufferStopped = outputAudioBufferStopped.getOrThrow("outputAudioBufferStopped") @@ -798,7 +798,7 @@ private constructor( * VAD 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). */ fun asOutputAudioBufferCleared(): OutputAudioBufferCleared = outputAudioBufferCleared.getOrThrow("outputAudioBufferCleared") @@ -2016,7 +2016,7 @@ private constructor( * **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). */ @JvmStatic fun ofOutputAudioBufferStarted(outputAudioBufferStarted: OutputAudioBufferStarted) = @@ -2026,7 +2026,7 @@ private constructor( * **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). */ @JvmStatic fun ofOutputAudioBufferStopped(outputAudioBufferStopped: OutputAudioBufferStopped) = @@ -2037,7 +2037,7 @@ private constructor( * in VAD 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). */ @JvmStatic fun ofOutputAudioBufferCleared(outputAudioBufferCleared: OutputAudioBufferCleared) = @@ -2398,7 +2398,7 @@ private constructor( * **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). */ fun visitOutputAudioBufferStarted(outputAudioBufferStarted: OutputAudioBufferStarted): T @@ -2406,7 +2406,7 @@ private constructor( * **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). */ fun visitOutputAudioBufferStopped(outputAudioBufferStopped: OutputAudioBufferStopped): T @@ -2415,7 +2415,7 @@ private constructor( * in VAD 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). */ fun visitOutputAudioBufferCleared(outputAudioBufferCleared: OutputAudioBufferCleared): T @@ -3288,7 +3288,7 @@ private constructor( * **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). */ class OutputAudioBufferStarted @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -3546,7 +3546,7 @@ private constructor( * **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). */ class OutputAudioBufferStopped @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -3805,7 +3805,7 @@ private constructor( * VAD 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). */ class OutputAudioBufferCleared @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSession.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSession.kt index d64fa1f29..1cc504eec 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSession.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSession.kt @@ -182,7 +182,7 @@ private constructor( * 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) + * [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. @@ -256,7 +256,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -670,7 +670,7 @@ private constructor( * 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) + * [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. @@ -830,7 +830,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequest.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequest.kt index 0e587f744..6db2d2e93 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequest.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequest.kt @@ -203,7 +203,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -618,7 +618,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeToolsConfigUnion.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeToolsConfigUnion.kt index ba6479e3d..161fe2b7e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeToolsConfigUnion.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeToolsConfigUnion.kt @@ -33,7 +33,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ @JsonDeserialize(using = RealtimeToolsConfigUnion.Deserializer::class) @JsonSerialize(using = RealtimeToolsConfigUnion.Serializer::class) @@ -48,7 +48,7 @@ private constructor( /** * 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). */ fun mcp(): Optional = Optional.ofNullable(mcp) @@ -60,7 +60,7 @@ private constructor( /** * 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). */ fun asMcp(): Mcp = mcp.getOrThrow("mcp") @@ -183,7 +183,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofMcp(mcp: Mcp) = RealtimeToolsConfigUnion(mcp = mcp) } @@ -199,7 +199,7 @@ private constructor( /** * 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). */ fun visitMcp(mcp: Mcp): T @@ -261,7 +261,7 @@ private constructor( /** * 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). */ class Mcp @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -382,7 +382,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` @@ -719,7 +719,7 @@ private constructor( * 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: * - Dropbox: `connector_dropbox` @@ -1569,7 +1569,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInput.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInput.kt index e6a4a22b2..a722cd8f8 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInput.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInput.kt @@ -66,7 +66,7 @@ private constructor( * 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) + * [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. @@ -224,7 +224,7 @@ private constructor( * 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) + * [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/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParams.kt index 8d948f07a..206dbb843 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParams.kt @@ -44,7 +44,7 @@ import kotlin.jvm.optionals.getOrNull * connection. * * [Learn more about authentication with client secrets over - * WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + * 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`. @@ -312,7 +312,7 @@ private constructor( /** * 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). */ class Body @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponse.kt index c95ae01b5..f2869f97d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponse.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponse.kt @@ -228,7 +228,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -670,7 +670,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -4479,7 +4479,7 @@ private constructor( /** * 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). */ @JsonDeserialize(using = Tool.Deserializer::class) @JsonSerialize(using = Tool.Serializer::class) @@ -4496,7 +4496,7 @@ private constructor( /** * 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). */ fun mcp(): Optional = Optional.ofNullable(mcp) @@ -4510,7 +4510,7 @@ private constructor( /** * 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). */ fun asMcp(): McpTool = mcp.getOrThrow("mcp") @@ -4636,7 +4636,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofMcp(mcp: McpTool) = Tool(mcp = mcp) } @@ -4649,7 +4649,7 @@ private constructor( /** * 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). */ fun visitMcp(mcp: McpTool): T @@ -4716,7 +4716,7 @@ private constructor( /** * 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). */ class McpTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -4841,7 +4841,7 @@ private constructor( * 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: * - Dropbox: `connector_dropbox` @@ -5188,7 +5188,7 @@ private constructor( * 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: * - Dropbox: `connector_dropbox` @@ -6058,7 +6058,7 @@ private constructor( * 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: * - Dropbox: `connector_dropbox` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerTool.kt index 298800efd..9d887cc93 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerTool.kt @@ -15,7 +15,7 @@ import java.util.Objects /** * 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). */ class ComputerTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerUsePreviewTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerUsePreviewTool.kt index 7213f7e7b..0d58eb21d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerUsePreviewTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ComputerUsePreviewTool.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ComputerUsePreviewTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/CustomTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/CustomTool.kt index 318a8258a..647aff4c3 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/CustomTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/CustomTool.kt @@ -23,7 +23,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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) */ class CustomTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/FileSearchTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/FileSearchTool.kt index 42269110d..8341aa6eb 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/FileSearchTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/FileSearchTool.kt @@ -35,7 +35,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class FileSearchTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/FunctionTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/FunctionTool.kt index 1d236963f..6c0552357 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/FunctionTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/FunctionTool.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class FunctionTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/NamespaceTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/NamespaceTool.kt index f25ace1f8..92e9a845f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/NamespaceTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/NamespaceTool.kt @@ -344,7 +344,7 @@ private constructor( /** * 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) */ fun custom(): Optional = Optional.ofNullable(custom) @@ -356,7 +356,7 @@ private constructor( /** * 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) */ fun asCustom(): CustomTool = custom.getOrThrow("custom") @@ -478,7 +478,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofCustom(custom: CustomTool) = Tool(custom = custom) } @@ -490,7 +490,7 @@ private constructor( /** * 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) */ fun visitCustom(custom: CustomTool): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt index d0c09cbe3..a1a1a3f3b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt @@ -262,8 +262,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -328,16 +328,16 @@ private constructor( * * 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). + * 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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can + * also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -358,7 +358,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -386,7 +386,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -415,8 +415,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -426,7 +426,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -445,7 +445,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -467,7 +467,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -487,7 +487,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -499,7 +499,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -512,12 +512,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. @@ -544,8 +544,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -589,7 +589,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1112,7 +1112,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ fun model(model: ResponsesModel) = model(JsonField.of(model)) @@ -1439,16 +1439,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -1615,7 +1615,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = background(JsonField.ofNullable(background)) @@ -1688,7 +1688,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = maxOutputTokens(JsonField.ofNullable(maxOutputTokens)) @@ -1762,8 +1762,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = previousResponseId(JsonField.ofNullable(previousResponseId)) @@ -1787,7 +1787,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -1848,7 +1848,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = promptCacheKey(JsonField.ofNullable(promptCacheKey)) @@ -1891,7 +1891,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -1928,7 +1928,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -1949,7 +1949,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = safetyIdentifier(JsonField.ofNullable(safetyIdentifier)) @@ -1975,12 +1975,12 @@ private constructor( * 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`. @@ -2024,8 +2024,8 @@ private constructor( /** * 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) */ fun text(text: ResponseTextConfig) = text(JsonField.of(text)) @@ -2106,7 +2106,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = user(JsonField.of(user)) @@ -3011,7 +3011,7 @@ private constructor( /** * 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). */ fun types(): Optional = Optional.ofNullable(types) @@ -3069,7 +3069,7 @@ private constructor( /** * 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). */ fun asTypes(): ToolChoiceTypes = types.getOrThrow("types") @@ -3321,7 +3321,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofTypes(types: ToolChoiceTypes) = ToolChoice(types = types) @@ -3374,7 +3374,7 @@ private constructor( /** * 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). */ fun visitTypes(types: ToolChoiceTypes): T @@ -7816,7 +7816,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -7974,12 +7974,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCancelParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCancelParams.kt index f23b9fd4e..118114e02 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCancelParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCancelParams.kt @@ -14,7 +14,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ResponseCancelParams private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt index 45f2225be..3ebf01cab 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt @@ -37,9 +37,9 @@ import kotlin.jvm.optionals.getOrNull * 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). */ class ResponseCompactParams private constructor( @@ -51,8 +51,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -81,8 +81,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -104,8 +104,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -126,15 +126,16 @@ private constructor( * 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'. - * 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. + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -255,7 +256,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ fun model(model: Model?) = apply { body.model(model) } @@ -326,8 +327,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = apply { body.previousResponseId(previousResponseId) @@ -376,7 +377,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions?) = apply { @@ -431,11 +432,12 @@ private constructor( * 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 + * 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 @@ -652,7 +654,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -682,8 +684,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -707,7 +709,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -731,11 +733,12 @@ private constructor( * 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 + * 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 @@ -875,8 +878,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: Model?) = model(JsonField.ofNullable(model)) @@ -950,7 +953,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -1001,8 +1004,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + * for current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions?) = promptCacheOptions(JsonField.ofNullable(promptCacheOptions)) @@ -1057,12 +1060,12 @@ private constructor( * 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 + * '[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 @@ -1223,8 +1226,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. */ class Model @JsonCreator private constructor(private val value: JsonField) : Enum { @@ -2206,8 +2209,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. */ class PromptCacheOptions @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -2840,15 +2843,16 @@ private constructor( * 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'. - * 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. + * 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. */ class ServiceTier @JsonCreator private constructor(private val value: JsonField) : Enum { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt index 579c10ee5..af9bbd119 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt @@ -18,7 +18,7 @@ import java.util.Optional /** * 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). */ class ResponseCompactionItem @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt index 5074e40de..c5e7af38c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ResponseCompactionItemParam @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseComputerToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseComputerToolCall.kt index 30c5b0820..2a91fb216 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseComputerToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseComputerToolCall.kt @@ -32,7 +32,7 @@ import kotlin.jvm.optionals.getOrNull /** * A tool call to a computer use tool. See the - * [computer use guide](https://platform.openai.com/docs/guides/tools-computer-use) for more + * [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use) for more * information. */ class ResponseComputerToolCall diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseContent.kt index f4ba1e655..7a56fae67 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseContent.kt @@ -46,7 +46,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -79,7 +79,7 @@ private constructor( /** * 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). */ fun asInputImage(): ResponseInputImage = inputImage.getOrThrow("inputImage") @@ -254,7 +254,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: ResponseInputImage) = ResponseContent(inputImage = inputImage) @@ -289,7 +289,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: ResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt index e90805b1b..960d393b4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt @@ -40,15 +40,15 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * 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. + * 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. */ class ResponseCreateParams private constructor( @@ -59,7 +59,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -108,11 +108,11 @@ private constructor( * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -134,7 +134,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -167,8 +167,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -194,8 +194,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -204,7 +204,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -214,7 +214,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -228,8 +228,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -241,7 +241,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -260,7 +260,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -272,7 +272,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -285,12 +285,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. @@ -308,7 +308,8 @@ private constructor( /** * 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). + * the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -336,8 +337,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -359,16 +360,16 @@ private constructor( * * 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). + * 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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You can + * also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -415,7 +416,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -687,7 +688,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = apply { body.background(background) } @@ -814,11 +815,11 @@ private constructor( * 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) */ fun input(input: Input) = apply { body.input(input) } @@ -864,7 +865,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = apply { body.maxOutputTokens(maxOutputTokens) @@ -943,7 +944,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. */ fun model(model: ResponsesModel) = apply { body.model(model) } @@ -1012,8 +1013,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = apply { body.previousResponseId(previousResponseId) @@ -1038,7 +1039,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = apply { body.prompt(prompt) } @@ -1057,7 +1058,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = apply { body.promptCacheKey(promptCacheKey) } @@ -1084,7 +1085,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = apply { @@ -1107,7 +1108,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -1145,7 +1146,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = apply { body.reasoning(reasoning) } @@ -1166,7 +1167,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = apply { body.safetyIdentifier(safetyIdentifier) @@ -1193,12 +1194,12 @@ private constructor( * 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`. @@ -1227,7 +1228,8 @@ private constructor( /** * 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). + * subject to the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). */ fun store(store: Boolean?) = apply { body.store(store) } @@ -1298,8 +1300,8 @@ private constructor( /** * 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) */ fun text(text: ResponseTextConfig) = apply { body.text(text) } @@ -1405,16 +1407,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. */ fun tools(tools: List) = apply { body.tools(tools) } @@ -1644,7 +1646,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = apply { body.user(user) } @@ -1946,7 +1948,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1998,11 +2000,11 @@ private constructor( * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2024,7 +2026,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2057,7 +2059,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -2085,8 +2087,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2096,7 +2098,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2106,7 +2108,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2121,7 +2123,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -2135,7 +2137,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -2155,7 +2157,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2167,7 +2169,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2180,12 +2182,12 @@ private constructor( * 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`. @@ -2203,7 +2205,8 @@ private constructor( /** * 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). + * subject to the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2231,8 +2234,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2255,16 +2258,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2312,7 +2315,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -2678,7 +2681,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = background(JsonField.ofNullable(background)) @@ -2818,11 +2821,12 @@ private constructor( * 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) */ fun input(input: Input) = input(JsonField.of(input)) @@ -2870,7 +2874,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = maxOutputTokens(JsonField.ofNullable(maxOutputTokens)) @@ -2950,8 +2954,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: ResponsesModel) = model(JsonField.of(model)) @@ -3022,7 +3026,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -3048,7 +3052,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -3067,7 +3071,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = promptCacheKey(JsonField.ofNullable(promptCacheKey)) @@ -3095,8 +3099,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + * for current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = promptCacheOptions(JsonField.of(promptCacheOptions)) @@ -3117,7 +3121,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -3155,7 +3159,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -3177,7 +3181,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = safetyIdentifier(JsonField.ofNullable(safetyIdentifier)) @@ -3206,12 +3210,13 @@ private constructor( * 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 @@ -3244,7 +3249,7 @@ private constructor( * 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). */ fun store(store: Boolean?) = store(JsonField.ofNullable(store)) @@ -3317,8 +3322,9 @@ private constructor( /** * 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) */ fun text(text: ResponseTextConfig) = text(JsonField.of(text)) @@ -3388,15 +3394,17 @@ private constructor( * 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). + * [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). + * about + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). * You can also use custom tools to call your own code. */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -3625,7 +3633,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = user(JsonField.of(user)) @@ -4346,11 +4354,11 @@ private constructor( * 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) */ @JsonDeserialize(using = Input.Deserializer::class) @JsonSerialize(using = Input.Serializer::class) @@ -5731,8 +5739,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for + * current details. */ class PromptCacheOptions @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -6284,7 +6292,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -6442,12 +6450,12 @@ private constructor( * 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 + * - 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](/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. + * - 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`. @@ -6835,7 +6843,7 @@ private constructor( /** * 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). */ fun types(): Optional = Optional.ofNullable(types) @@ -6893,7 +6901,7 @@ private constructor( /** * 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). */ fun asTypes(): ToolChoiceTypes = types.getOrThrow("types") @@ -7145,7 +7153,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofTypes(types: ToolChoiceTypes) = ToolChoice(types = types) @@ -7198,7 +7206,7 @@ private constructor( /** * 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). */ fun visitTypes(types: ToolChoiceTypes): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCustomToolCallOutput.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCustomToolCallOutput.kt index 8b1f2a65f..e410765dc 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCustomToolCallOutput.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCustomToolCallOutput.kt @@ -593,7 +593,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -611,7 +611,7 @@ private constructor( /** * 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). */ fun asInputImage(): ResponseInputImage = inputImage.getOrThrow("inputImage") @@ -755,7 +755,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: ResponseInputImage) = @@ -778,7 +778,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: ResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFileSearchToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFileSearchToolCall.kt index c466b8463..0b17d31b3 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFileSearchToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFileSearchToolCall.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ class ResponseFileSearchToolCall diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextConfig.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextConfig.kt index 9e4f5b739..457a271a6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextConfig.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextConfig.kt @@ -25,7 +25,7 @@ import kotlin.jvm.optionals.getOrNull * * 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. * @@ -49,7 +49,7 @@ private constructor( /** * 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). */ fun jsonSchema(): Optional = Optional.ofNullable(jsonSchema) @@ -71,7 +71,7 @@ private constructor( /** * 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). */ fun asJsonSchema(): ResponseFormatTextJsonSchemaConfig = jsonSchema.getOrThrow("jsonSchema") @@ -212,7 +212,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofJsonSchema(jsonSchema: ResponseFormatTextJsonSchemaConfig) = @@ -239,7 +239,7 @@ private constructor( /** * 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). */ fun visitJsonSchema(jsonSchema: ResponseFormatTextJsonSchemaConfig): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextJsonSchemaConfig.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextJsonSchemaConfig.kt index 6194603ce..def47b687 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextJsonSchemaConfig.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFormatTextJsonSchemaConfig.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ResponseFormatTextJsonSchemaConfig @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -88,7 +88,7 @@ private constructor( * 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://platform.openai.com/docs/guides/structured-outputs). + * [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -233,7 +233,7 @@ private constructor( * 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://platform.openai.com/docs/guides/structured-outputs). + * [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs). */ fun strict(strict: Boolean?) = strict(JsonField.ofNullable(strict)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt index 3738df6f1..c9ad7f882 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt @@ -34,7 +34,7 @@ private constructor( /** * 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) */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -52,7 +52,7 @@ private constructor( /** * 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) */ fun asInputImage(): ResponseInputImageContent = inputImage.getOrThrow("inputImage") @@ -192,7 +192,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofInputImage(inputImage: ResponseInputImageContent) = @@ -215,7 +215,7 @@ private constructor( /** * 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) */ fun visitInputImage(inputImage: ResponseInputImageContent): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCall.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCall.kt index 183c5e060..bc10a19cb 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCall.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCall.kt @@ -31,7 +31,7 @@ import kotlin.jvm.optionals.getOrNull /** * A tool call to run a function. See the - * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more * information. */ class ResponseFunctionToolCall diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallItem.kt index f626e3fea..6e1be23f7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallItem.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * A tool call to run a function. See the - * [function calling guide](https://platform.openai.com/docs/guides/function-calling) for more + * [function calling guide](https://developers.openai.com/api/docs/guides/function-calling) for more * information. */ class ResponseFunctionToolCallItem diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallOutputItem.kt index b9c6f54d4..0335bd590 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallOutputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCallOutputItem.kt @@ -736,7 +736,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -754,7 +754,7 @@ private constructor( /** * 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). */ fun asInputImage(): ResponseInputImage = inputImage.getOrThrow("inputImage") @@ -898,7 +898,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: ResponseInputImage) = @@ -921,7 +921,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: ResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt index d47a9b52b..1837ad375 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt @@ -32,7 +32,7 @@ import kotlin.jvm.optionals.getOrNull /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ class ResponseFunctionWebSearch diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputContent.kt index 89b81e0ef..a0ac3cbf4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputContent.kt @@ -34,7 +34,7 @@ private constructor( /** * 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). */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -52,7 +52,7 @@ private constructor( /** * 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). */ fun asInputImage(): ResponseInputImage = inputImage.getOrThrow("inputImage") @@ -188,7 +188,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofInputImage(inputImage: ResponseInputImage) = @@ -210,7 +210,7 @@ private constructor( /** * 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). */ fun visitInputImage(inputImage: ResponseInputImage): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImage.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImage.kt index 67b9e7599..24857978d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImage.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ResponseInputImage @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImageContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImageContent.kt index 0a1a489cb..3296b25f1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImageContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputImageContent.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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) */ class ResponseInputImageContent @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt index 9a1050901..d6da6cd1b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt @@ -99,15 +99,15 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun fileSearchCall(): Optional = Optional.ofNullable(fileSearchCall) /** * 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. */ fun computerCall(): Optional = Optional.ofNullable(computerCall) @@ -116,15 +116,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun webSearchCall(): Optional = Optional.ofNullable(webSearchCall) /** * 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. */ fun functionCall(): Optional = Optional.ofNullable(functionCall) @@ -149,13 +149,13 @@ private constructor( * 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). */ fun reasoning(): Optional = Optional.ofNullable(reasoning) /** * 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). */ fun compaction(): Optional = Optional.ofNullable(compaction) @@ -304,15 +304,15 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun asFileSearchCall(): ResponseFileSearchToolCall = fileSearchCall.getOrThrow("fileSearchCall") /** * 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. */ fun asComputerCall(): ResponseComputerToolCall = computerCall.getOrThrow("computerCall") @@ -322,15 +322,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun asWebSearchCall(): ResponseFunctionWebSearch = webSearchCall.getOrThrow("webSearchCall") /** * 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. */ fun asFunctionCall(): ResponseFunctionToolCall = functionCall.getOrThrow("functionCall") @@ -356,13 +356,13 @@ private constructor( * 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). */ fun asReasoning(): ResponseReasoningItem = reasoning.getOrThrow("reasoning") /** * 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). */ fun asCompaction(): ResponseCompactionItemParam = compaction.getOrThrow("compaction") @@ -939,8 +939,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFileSearchCall(fileSearchCall: ResponseFileSearchToolCall) = @@ -948,8 +948,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofComputerCall(computerCall: ResponseComputerToolCall) = @@ -962,8 +962,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofWebSearchCall(webSearchCall: ResponseFunctionWebSearch) = @@ -971,8 +971,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFunctionCall(functionCall: ResponseFunctionToolCall) = @@ -1007,14 +1007,14 @@ private constructor( * 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). */ @JvmStatic fun ofReasoning(reasoning: ResponseReasoningItem) = ResponseInputItem(reasoning = reasoning) /** * 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). */ @JvmStatic fun ofCompaction(compaction: ResponseCompactionItemParam) = @@ -1133,15 +1133,15 @@ private constructor( /** * 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. */ fun visitFileSearchCall(fileSearchCall: ResponseFileSearchToolCall): T /** * 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. */ fun visitComputerCall(computerCall: ResponseComputerToolCall): T @@ -1150,15 +1150,15 @@ private constructor( /** * 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. */ fun visitWebSearchCall(webSearchCall: ResponseFunctionWebSearch): T /** * 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. */ fun visitFunctionCall(functionCall: ResponseFunctionToolCall): T @@ -1181,13 +1181,13 @@ private constructor( * 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). */ fun visitReasoning(reasoning: ResponseReasoningItem): T /** * 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). */ fun visitCompaction(compaction: ResponseCompactionItemParam): T @@ -5504,7 +5504,11 @@ private constructor( private val result: JsonField, private val status: JsonField, private val type: JsonValue, + private val action: JsonField, + private val background: JsonField, + private val outputFormat: JsonField, private val quality: JsonField, + private val revisedPrompt: JsonField, private val size: JsonField, private val additionalProperties: MutableMap, ) { @@ -5515,9 +5519,31 @@ private constructor( @JsonProperty("result") @ExcludeMissing result: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), + @JsonProperty("background") + @ExcludeMissing + background: JsonField = JsonMissing.of(), + @JsonProperty("output_format") + @ExcludeMissing + outputFormat: JsonField = JsonMissing.of(), @JsonProperty("quality") @ExcludeMissing quality: JsonField = JsonMissing.of(), + @JsonProperty("revised_prompt") + @ExcludeMissing + revisedPrompt: JsonField = JsonMissing.of(), @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), - ) : this(id, result, status, type, quality, size, mutableMapOf()) + ) : this( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + mutableMapOf(), + ) /** * The unique ID of the image generation call. @@ -5556,6 +5582,30 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * The action used for image generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + + /** + * The background setting used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun background(): Optional = background.getOptional("background") + + /** + * The output format used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun outputFormat(): Optional = outputFormat.getOptional("output_format") + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -5565,6 +5615,14 @@ private constructor( */ fun quality(): Optional = quality.getOptional("quality") + /** + * The prompt that was used after any model prompt rewriting. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun revisedPrompt(): Optional = revisedPrompt.getOptional("revised_prompt") + /** * The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. * @@ -5594,6 +5652,32 @@ private constructor( */ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + + /** + * Returns the raw JSON value of [background]. + * + * Unlike [background], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("background") + @ExcludeMissing + fun _background(): JsonField = background + + /** + * Returns the raw JSON value of [outputFormat]. + * + * Unlike [outputFormat], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_format") + @ExcludeMissing + fun _outputFormat(): JsonField = outputFormat + /** * Returns the raw JSON value of [quality]. * @@ -5601,6 +5685,16 @@ private constructor( */ @JsonProperty("quality") @ExcludeMissing fun _quality(): JsonField = quality + /** + * Returns the raw JSON value of [revisedPrompt]. + * + * Unlike [revisedPrompt], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("revised_prompt") + @ExcludeMissing + fun _revisedPrompt(): JsonField = revisedPrompt + /** * Returns the raw JSON value of [size]. * @@ -5642,7 +5736,11 @@ private constructor( private var result: JsonField? = null private var status: JsonField? = null private var type: JsonValue = JsonValue.from("image_generation_call") + private var action: JsonField = JsonMissing.of() + private var background: JsonField = JsonMissing.of() + private var outputFormat: JsonField = JsonMissing.of() private var quality: JsonField = JsonMissing.of() + private var revisedPrompt: JsonField = JsonMissing.of() private var size: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -5652,7 +5750,11 @@ private constructor( result = imageGenerationCall.result status = imageGenerationCall.status type = imageGenerationCall.type + action = imageGenerationCall.action + background = imageGenerationCall.background + outputFormat = imageGenerationCall.outputFormat quality = imageGenerationCall.quality + revisedPrompt = imageGenerationCall.revisedPrompt size = imageGenerationCall.size additionalProperties = imageGenerationCall.additionalProperties.toMutableMap() } @@ -5710,6 +5812,57 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** The action used for image generation. */ + fun action(action: Action?) = action(JsonField.ofNullable(action)) + + /** Alias for calling [Builder.action] with `action.orElse(null)`. */ + fun action(action: Optional) = action(action.getOrNull()) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + + /** The background setting used for generation. */ + fun background(background: Background?) = background(JsonField.ofNullable(background)) + + /** Alias for calling [Builder.background] with `background.orElse(null)`. */ + fun background(background: Optional) = background(background.getOrNull()) + + /** + * Sets [Builder.background] to an arbitrary JSON value. + * + * You should usually call [Builder.background] with a well-typed [Background] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun background(background: JsonField) = apply { + this.background = background + } + + /** The output format used for generation. */ + fun outputFormat(outputFormat: OutputFormat?) = + outputFormat(JsonField.ofNullable(outputFormat)) + + /** Alias for calling [Builder.outputFormat] with `outputFormat.orElse(null)`. */ + fun outputFormat(outputFormat: Optional) = + outputFormat(outputFormat.getOrNull()) + + /** + * Sets [Builder.outputFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.outputFormat] with a well-typed [OutputFormat] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputFormat(outputFormat: JsonField) = apply { + this.outputFormat = outputFormat + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -5728,6 +5881,25 @@ private constructor( */ fun quality(quality: JsonField) = apply { this.quality = quality } + /** The prompt that was used after any model prompt rewriting. */ + fun revisedPrompt(revisedPrompt: String?) = + revisedPrompt(JsonField.ofNullable(revisedPrompt)) + + /** Alias for calling [Builder.revisedPrompt] with `revisedPrompt.orElse(null)`. */ + fun revisedPrompt(revisedPrompt: Optional) = + revisedPrompt(revisedPrompt.getOrNull()) + + /** + * Sets [Builder.revisedPrompt] to an arbitrary JSON value. + * + * You should usually call [Builder.revisedPrompt] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun revisedPrompt(revisedPrompt: JsonField) = apply { + this.revisedPrompt = revisedPrompt + } + /** The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. */ fun size(size: Size?) = size(JsonField.ofNullable(size)) @@ -5790,7 +5962,11 @@ private constructor( checkRequired("result", result), checkRequired("status", status), type, + action, + background, + outputFormat, quality, + revisedPrompt, size, additionalProperties.toMutableMap(), ) @@ -5820,7 +5996,11 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } + background().ifPresent { it.validate() } + outputFormat().ifPresent { it.validate() } quality().ifPresent { it.validate() } + revisedPrompt() size() validated = true } @@ -5845,7 +6025,11 @@ private constructor( (if (result.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + type.let { if (it == JsonValue.from("image_generation_call")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + + (background.asKnown().getOrNull()?.validity() ?: 0) + + (outputFormat.asKnown().getOrNull()?.validity() ?: 0) + (quality.asKnown().getOrNull()?.validity() ?: 0) + + (if (revisedPrompt.asKnown().isPresent) 1 else 0) + (if (size.asKnown().isPresent) 1 else 0) /** The status of the image generation call. */ @@ -6000,6 +6184,448 @@ private constructor( override fun toString() = value.toString() } + /** The action used for image generation. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The background setting used for generation. */ + class Background @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val TRANSPARENT = of("transparent") + + @JvmField val OPAQUE = of("opaque") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Background(JsonField.of(value)) + } + + /** An enum containing [Background]'s known values. */ + enum class Known { + TRANSPARENT, + OPAQUE, + AUTO, + } + + /** + * An enum containing [Background]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Background] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + TRANSPARENT, + OPAQUE, + AUTO, + /** + * An enum member indicating that [Background] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + TRANSPARENT -> Value.TRANSPARENT + OPAQUE -> Value.OPAQUE + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + TRANSPARENT -> Known.TRANSPARENT + OPAQUE -> Known.OPAQUE + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Background: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Background = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Background && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The output format used for generation. */ + class OutputFormat @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PNG = of("png") + + @JvmField val WEBP = of("webp") + + @JvmField val JPEG = of("jpeg") + + @JvmStatic fun of(value: String) = OutputFormat(JsonField.of(value)) + } + + /** An enum containing [OutputFormat]'s known values. */ + enum class Known { + PNG, + WEBP, + JPEG, + } + + /** + * An enum containing [OutputFormat]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [OutputFormat] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PNG, + WEBP, + JPEG, + /** + * An enum member indicating that [OutputFormat] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PNG -> Value.PNG + WEBP -> Value.WEBP + JPEG -> Value.JPEG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PNG -> Known.PNG + WEBP -> Known.WEBP + JPEG -> Known.JPEG + else -> throw OpenAIInvalidDataException("Unknown OutputFormat: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): OutputFormat = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is OutputFormat && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -6322,19 +6948,35 @@ private constructor( result == other.result && status == other.status && type == other.type && + action == other.action && + background == other.background && + outputFormat == other.outputFormat && quality == other.quality && + revisedPrompt == other.revisedPrompt && size == other.size && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, result, status, type, quality, size, additionalProperties) + Objects.hash( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, action=$action, background=$background, outputFormat=$outputFormat, quality=$quality, revisedPrompt=$revisedPrompt, size=$size, additionalProperties=$additionalProperties}" } /** A tool call to run a command on the local shell. */ diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt index 0e678c94c..9242d1c10 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt @@ -78,15 +78,15 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun fileSearchCall(): Optional = Optional.ofNullable(fileSearchCall) /** * 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. */ fun computerCall(): Optional = Optional.ofNullable(computerCall) @@ -95,15 +95,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun webSearchCall(): Optional = Optional.ofNullable(webSearchCall) /** * 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. */ fun functionCall(): Optional = Optional.ofNullable(functionCall) @@ -128,7 +128,7 @@ private constructor( * 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). */ fun reasoning(): Optional = Optional.ofNullable(reasoning) @@ -138,7 +138,7 @@ private constructor( /** * 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). */ fun compaction(): Optional = Optional.ofNullable(compaction) @@ -260,15 +260,15 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun asFileSearchCall(): ResponseFileSearchToolCall = fileSearchCall.getOrThrow("fileSearchCall") /** * 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. */ fun asComputerCall(): ResponseComputerToolCall = computerCall.getOrThrow("computerCall") @@ -277,15 +277,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun asWebSearchCall(): ResponseFunctionWebSearch = webSearchCall.getOrThrow("webSearchCall") /** * 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. */ fun asFunctionCall(): ResponseFunctionToolCallItem = functionCall.getOrThrow("functionCall") @@ -310,7 +310,7 @@ private constructor( * 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). */ fun asReasoning(): ResponseReasoningItem = reasoning.getOrThrow("reasoning") @@ -320,7 +320,7 @@ private constructor( /** * 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). */ fun asCompaction(): ResponseCompactionItem = compaction.getOrThrow("compaction") @@ -843,8 +843,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFileSearchCall(fileSearchCall: ResponseFileSearchToolCall) = @@ -852,8 +852,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofComputerCall(computerCall: ResponseComputerToolCall) = @@ -865,8 +865,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofWebSearchCall(webSearchCall: ResponseFunctionWebSearch) = @@ -874,8 +874,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFunctionCall(functionCall: ResponseFunctionToolCallItem) = @@ -909,7 +909,7 @@ private constructor( * 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). */ @JvmStatic fun ofReasoning(reasoning: ResponseReasoningItem) = ResponseItem(reasoning = reasoning) @@ -922,7 +922,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofCompaction(compaction: ResponseCompactionItem) = ResponseItem(compaction = compaction) @@ -1007,15 +1007,15 @@ private constructor( /** * 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. */ fun visitFileSearchCall(fileSearchCall: ResponseFileSearchToolCall): T /** * 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. */ fun visitComputerCall(computerCall: ResponseComputerToolCall): T @@ -1023,15 +1023,15 @@ private constructor( /** * 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. */ fun visitWebSearchCall(webSearchCall: ResponseFunctionWebSearch): T /** * 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. */ fun visitFunctionCall(functionCall: ResponseFunctionToolCallItem): T @@ -1053,7 +1053,7 @@ private constructor( * 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). */ fun visitReasoning(reasoning: ResponseReasoningItem): T @@ -1063,7 +1063,7 @@ private constructor( /** * 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). */ fun visitCompaction(compaction: ResponseCompactionItem): T @@ -2749,7 +2749,11 @@ private constructor( private val result: JsonField, private val status: JsonField, private val type: JsonValue, + private val action: JsonField, + private val background: JsonField, + private val outputFormat: JsonField, private val quality: JsonField, + private val revisedPrompt: JsonField, private val size: JsonField, private val additionalProperties: MutableMap, ) { @@ -2760,9 +2764,31 @@ private constructor( @JsonProperty("result") @ExcludeMissing result: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), + @JsonProperty("background") + @ExcludeMissing + background: JsonField = JsonMissing.of(), + @JsonProperty("output_format") + @ExcludeMissing + outputFormat: JsonField = JsonMissing.of(), @JsonProperty("quality") @ExcludeMissing quality: JsonField = JsonMissing.of(), + @JsonProperty("revised_prompt") + @ExcludeMissing + revisedPrompt: JsonField = JsonMissing.of(), @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), - ) : this(id, result, status, type, quality, size, mutableMapOf()) + ) : this( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + mutableMapOf(), + ) /** * The unique ID of the image generation call. @@ -2801,6 +2827,30 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * The action used for image generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + + /** + * The background setting used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun background(): Optional = background.getOptional("background") + + /** + * The output format used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun outputFormat(): Optional = outputFormat.getOptional("output_format") + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -2810,6 +2860,14 @@ private constructor( */ fun quality(): Optional = quality.getOptional("quality") + /** + * The prompt that was used after any model prompt rewriting. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun revisedPrompt(): Optional = revisedPrompt.getOptional("revised_prompt") + /** * The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. * @@ -2839,6 +2897,32 @@ private constructor( */ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + + /** + * Returns the raw JSON value of [background]. + * + * Unlike [background], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("background") + @ExcludeMissing + fun _background(): JsonField = background + + /** + * Returns the raw JSON value of [outputFormat]. + * + * Unlike [outputFormat], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_format") + @ExcludeMissing + fun _outputFormat(): JsonField = outputFormat + /** * Returns the raw JSON value of [quality]. * @@ -2846,6 +2930,16 @@ private constructor( */ @JsonProperty("quality") @ExcludeMissing fun _quality(): JsonField = quality + /** + * Returns the raw JSON value of [revisedPrompt]. + * + * Unlike [revisedPrompt], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("revised_prompt") + @ExcludeMissing + fun _revisedPrompt(): JsonField = revisedPrompt + /** * Returns the raw JSON value of [size]. * @@ -2887,7 +2981,11 @@ private constructor( private var result: JsonField? = null private var status: JsonField? = null private var type: JsonValue = JsonValue.from("image_generation_call") + private var action: JsonField = JsonMissing.of() + private var background: JsonField = JsonMissing.of() + private var outputFormat: JsonField = JsonMissing.of() private var quality: JsonField = JsonMissing.of() + private var revisedPrompt: JsonField = JsonMissing.of() private var size: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -2897,7 +2995,11 @@ private constructor( result = imageGenerationCall.result status = imageGenerationCall.status type = imageGenerationCall.type + action = imageGenerationCall.action + background = imageGenerationCall.background + outputFormat = imageGenerationCall.outputFormat quality = imageGenerationCall.quality + revisedPrompt = imageGenerationCall.revisedPrompt size = imageGenerationCall.size additionalProperties = imageGenerationCall.additionalProperties.toMutableMap() } @@ -2955,6 +3057,57 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** The action used for image generation. */ + fun action(action: Action?) = action(JsonField.ofNullable(action)) + + /** Alias for calling [Builder.action] with `action.orElse(null)`. */ + fun action(action: Optional) = action(action.getOrNull()) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + + /** The background setting used for generation. */ + fun background(background: Background?) = background(JsonField.ofNullable(background)) + + /** Alias for calling [Builder.background] with `background.orElse(null)`. */ + fun background(background: Optional) = background(background.getOrNull()) + + /** + * Sets [Builder.background] to an arbitrary JSON value. + * + * You should usually call [Builder.background] with a well-typed [Background] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun background(background: JsonField) = apply { + this.background = background + } + + /** The output format used for generation. */ + fun outputFormat(outputFormat: OutputFormat?) = + outputFormat(JsonField.ofNullable(outputFormat)) + + /** Alias for calling [Builder.outputFormat] with `outputFormat.orElse(null)`. */ + fun outputFormat(outputFormat: Optional) = + outputFormat(outputFormat.getOrNull()) + + /** + * Sets [Builder.outputFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.outputFormat] with a well-typed [OutputFormat] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputFormat(outputFormat: JsonField) = apply { + this.outputFormat = outputFormat + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -2973,6 +3126,25 @@ private constructor( */ fun quality(quality: JsonField) = apply { this.quality = quality } + /** The prompt that was used after any model prompt rewriting. */ + fun revisedPrompt(revisedPrompt: String?) = + revisedPrompt(JsonField.ofNullable(revisedPrompt)) + + /** Alias for calling [Builder.revisedPrompt] with `revisedPrompt.orElse(null)`. */ + fun revisedPrompt(revisedPrompt: Optional) = + revisedPrompt(revisedPrompt.getOrNull()) + + /** + * Sets [Builder.revisedPrompt] to an arbitrary JSON value. + * + * You should usually call [Builder.revisedPrompt] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun revisedPrompt(revisedPrompt: JsonField) = apply { + this.revisedPrompt = revisedPrompt + } + /** The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. */ fun size(size: Size?) = size(JsonField.ofNullable(size)) @@ -3035,7 +3207,11 @@ private constructor( checkRequired("result", result), checkRequired("status", status), type, + action, + background, + outputFormat, quality, + revisedPrompt, size, additionalProperties.toMutableMap(), ) @@ -3065,7 +3241,11 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } + background().ifPresent { it.validate() } + outputFormat().ifPresent { it.validate() } quality().ifPresent { it.validate() } + revisedPrompt() size() validated = true } @@ -3090,7 +3270,11 @@ private constructor( (if (result.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + type.let { if (it == JsonValue.from("image_generation_call")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + + (background.asKnown().getOrNull()?.validity() ?: 0) + + (outputFormat.asKnown().getOrNull()?.validity() ?: 0) + (quality.asKnown().getOrNull()?.validity() ?: 0) + + (if (revisedPrompt.asKnown().isPresent) 1 else 0) + (if (size.asKnown().isPresent) 1 else 0) /** The status of the image generation call. */ @@ -3245,6 +3429,448 @@ private constructor( override fun toString() = value.toString() } + /** The action used for image generation. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The background setting used for generation. */ + class Background @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val TRANSPARENT = of("transparent") + + @JvmField val OPAQUE = of("opaque") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Background(JsonField.of(value)) + } + + /** An enum containing [Background]'s known values. */ + enum class Known { + TRANSPARENT, + OPAQUE, + AUTO, + } + + /** + * An enum containing [Background]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Background] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + TRANSPARENT, + OPAQUE, + AUTO, + /** + * An enum member indicating that [Background] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + TRANSPARENT -> Value.TRANSPARENT + OPAQUE -> Value.OPAQUE + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + TRANSPARENT -> Known.TRANSPARENT + OPAQUE -> Known.OPAQUE + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Background: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Background = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Background && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The output format used for generation. */ + class OutputFormat @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PNG = of("png") + + @JvmField val WEBP = of("webp") + + @JvmField val JPEG = of("jpeg") + + @JvmStatic fun of(value: String) = OutputFormat(JsonField.of(value)) + } + + /** An enum containing [OutputFormat]'s known values. */ + enum class Known { + PNG, + WEBP, + JPEG, + } + + /** + * An enum containing [OutputFormat]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [OutputFormat] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PNG, + WEBP, + JPEG, + /** + * An enum member indicating that [OutputFormat] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PNG -> Value.PNG + WEBP -> Value.WEBP + JPEG -> Value.JPEG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PNG -> Known.PNG + WEBP -> Known.WEBP + JPEG -> Known.JPEG + else -> throw OpenAIInvalidDataException("Unknown OutputFormat: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): OutputFormat = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is OutputFormat && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -3567,19 +4193,35 @@ private constructor( result == other.result && status == other.status && type == other.type && + action == other.action && + background == other.background && + outputFormat == other.outputFormat && quality == other.quality && + revisedPrompt == other.revisedPrompt && size == other.size && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, result, status, type, quality, size, additionalProperties) + Objects.hash( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, action=$action, background=$background, outputFormat=$outputFormat, quality=$quality, revisedPrompt=$revisedPrompt, size=$size, additionalProperties=$additionalProperties}" } /** A tool call to run a command on the local shell. */ diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt index e66317177..122e779cc 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt @@ -71,15 +71,15 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun fileSearchCall(): Optional = Optional.ofNullable(fileSearchCall) /** * 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. */ fun functionCall(): Optional = Optional.ofNullable(functionCall) @@ -88,15 +88,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun webSearchCall(): Optional = Optional.ofNullable(webSearchCall) /** * 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. */ fun computerCall(): Optional = Optional.ofNullable(computerCall) @@ -107,7 +107,7 @@ private constructor( * 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). */ fun reasoning(): Optional = Optional.ofNullable(reasoning) @@ -124,7 +124,7 @@ private constructor( /** * 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). */ fun compaction(): Optional = Optional.ofNullable(compaction) @@ -238,15 +238,15 @@ private constructor( /** * The results of a file search tool call. See the - * [file search guide](https://platform.openai.com/docs/guides/tools-file-search) for more + * [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search) for more * information. */ fun asFileSearchCall(): ResponseFileSearchToolCall = fileSearchCall.getOrThrow("fileSearchCall") /** * 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. */ fun asFunctionCall(): ResponseFunctionToolCall = functionCall.getOrThrow("functionCall") @@ -255,15 +255,15 @@ private constructor( /** * The results of a web search tool call. See the - * [web search guide](https://platform.openai.com/docs/guides/tools-web-search) for more + * [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search) for more * information. */ fun asWebSearchCall(): ResponseFunctionWebSearch = webSearchCall.getOrThrow("webSearchCall") /** * 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. */ fun asComputerCall(): ResponseComputerToolCall = computerCall.getOrThrow("computerCall") @@ -274,7 +274,7 @@ private constructor( * 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). */ fun asReasoning(): ResponseReasoningItem = reasoning.getOrThrow("reasoning") @@ -291,7 +291,7 @@ private constructor( /** * 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). */ fun asCompaction(): ResponseCompactionItem = compaction.getOrThrow("compaction") @@ -779,8 +779,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFileSearchCall(fileSearchCall: ResponseFileSearchToolCall) = @@ -788,8 +788,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofFunctionCall(functionCall: ResponseFunctionToolCall) = @@ -801,8 +801,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofWebSearchCall(webSearchCall: ResponseFunctionWebSearch) = @@ -810,8 +810,8 @@ private constructor( /** * 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. */ @JvmStatic fun ofComputerCall(computerCall: ResponseComputerToolCall) = @@ -825,7 +825,7 @@ private constructor( * 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). */ @JvmStatic fun ofReasoning(reasoning: ResponseReasoningItem) = @@ -851,7 +851,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofCompaction(compaction: ResponseCompactionItem) = @@ -937,15 +937,15 @@ private constructor( /** * 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. */ fun visitFileSearchCall(fileSearchCall: ResponseFileSearchToolCall): T /** * 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. */ fun visitFunctionCall(functionCall: ResponseFunctionToolCall): T @@ -953,15 +953,15 @@ private constructor( /** * 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. */ fun visitWebSearchCall(webSearchCall: ResponseFunctionWebSearch): T /** * 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. */ fun visitComputerCall(computerCall: ResponseComputerToolCall): T @@ -971,7 +971,7 @@ private constructor( * 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). */ fun visitReasoning(reasoning: ResponseReasoningItem): T @@ -987,7 +987,7 @@ private constructor( /** * 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). */ fun visitCompaction(compaction: ResponseCompactionItem): T @@ -2644,7 +2644,11 @@ private constructor( private val result: JsonField, private val status: JsonField, private val type: JsonValue, + private val action: JsonField, + private val background: JsonField, + private val outputFormat: JsonField, private val quality: JsonField, + private val revisedPrompt: JsonField, private val size: JsonField, private val additionalProperties: MutableMap, ) { @@ -2655,9 +2659,31 @@ private constructor( @JsonProperty("result") @ExcludeMissing result: JsonField = JsonMissing.of(), @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(), @JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(), + @JsonProperty("action") @ExcludeMissing action: JsonField = JsonMissing.of(), + @JsonProperty("background") + @ExcludeMissing + background: JsonField = JsonMissing.of(), + @JsonProperty("output_format") + @ExcludeMissing + outputFormat: JsonField = JsonMissing.of(), @JsonProperty("quality") @ExcludeMissing quality: JsonField = JsonMissing.of(), + @JsonProperty("revised_prompt") + @ExcludeMissing + revisedPrompt: JsonField = JsonMissing.of(), @JsonProperty("size") @ExcludeMissing size: JsonField = JsonMissing.of(), - ) : this(id, result, status, type, quality, size, mutableMapOf()) + ) : this( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + mutableMapOf(), + ) /** * The unique ID of the image generation call. @@ -2696,6 +2722,30 @@ private constructor( */ @JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type + /** + * The action used for image generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun action(): Optional = action.getOptional("action") + + /** + * The background setting used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun background(): Optional = background.getOptional("background") + + /** + * The output format used for generation. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun outputFormat(): Optional = outputFormat.getOptional("output_format") + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -2705,6 +2755,14 @@ private constructor( */ fun quality(): Optional = quality.getOptional("quality") + /** + * The prompt that was used after any model prompt rewriting. + * + * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the + * server responded with an unexpected value). + */ + fun revisedPrompt(): Optional = revisedPrompt.getOptional("revised_prompt") + /** * The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. * @@ -2734,6 +2792,32 @@ private constructor( */ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status + /** + * Returns the raw JSON value of [action]. + * + * Unlike [action], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("action") @ExcludeMissing fun _action(): JsonField = action + + /** + * Returns the raw JSON value of [background]. + * + * Unlike [background], this method doesn't throw if the JSON field has an unexpected type. + */ + @JsonProperty("background") + @ExcludeMissing + fun _background(): JsonField = background + + /** + * Returns the raw JSON value of [outputFormat]. + * + * Unlike [outputFormat], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("output_format") + @ExcludeMissing + fun _outputFormat(): JsonField = outputFormat + /** * Returns the raw JSON value of [quality]. * @@ -2741,6 +2825,16 @@ private constructor( */ @JsonProperty("quality") @ExcludeMissing fun _quality(): JsonField = quality + /** + * Returns the raw JSON value of [revisedPrompt]. + * + * Unlike [revisedPrompt], this method doesn't throw if the JSON field has an unexpected + * type. + */ + @JsonProperty("revised_prompt") + @ExcludeMissing + fun _revisedPrompt(): JsonField = revisedPrompt + /** * Returns the raw JSON value of [size]. * @@ -2782,7 +2876,11 @@ private constructor( private var result: JsonField? = null private var status: JsonField? = null private var type: JsonValue = JsonValue.from("image_generation_call") + private var action: JsonField = JsonMissing.of() + private var background: JsonField = JsonMissing.of() + private var outputFormat: JsonField = JsonMissing.of() private var quality: JsonField = JsonMissing.of() + private var revisedPrompt: JsonField = JsonMissing.of() private var size: JsonField = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -2792,7 +2890,11 @@ private constructor( result = imageGenerationCall.result status = imageGenerationCall.status type = imageGenerationCall.type + action = imageGenerationCall.action + background = imageGenerationCall.background + outputFormat = imageGenerationCall.outputFormat quality = imageGenerationCall.quality + revisedPrompt = imageGenerationCall.revisedPrompt size = imageGenerationCall.size additionalProperties = imageGenerationCall.additionalProperties.toMutableMap() } @@ -2850,6 +2952,57 @@ private constructor( */ fun type(type: JsonValue) = apply { this.type = type } + /** The action used for image generation. */ + fun action(action: Action?) = action(JsonField.ofNullable(action)) + + /** Alias for calling [Builder.action] with `action.orElse(null)`. */ + fun action(action: Optional) = action(action.getOrNull()) + + /** + * Sets [Builder.action] to an arbitrary JSON value. + * + * You should usually call [Builder.action] with a well-typed [Action] value instead. + * This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun action(action: JsonField) = apply { this.action = action } + + /** The background setting used for generation. */ + fun background(background: Background?) = background(JsonField.ofNullable(background)) + + /** Alias for calling [Builder.background] with `background.orElse(null)`. */ + fun background(background: Optional) = background(background.getOrNull()) + + /** + * Sets [Builder.background] to an arbitrary JSON value. + * + * You should usually call [Builder.background] with a well-typed [Background] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun background(background: JsonField) = apply { + this.background = background + } + + /** The output format used for generation. */ + fun outputFormat(outputFormat: OutputFormat?) = + outputFormat(JsonField.ofNullable(outputFormat)) + + /** Alias for calling [Builder.outputFormat] with `outputFormat.orElse(null)`. */ + fun outputFormat(outputFormat: Optional) = + outputFormat(outputFormat.getOrNull()) + + /** + * Sets [Builder.outputFormat] to an arbitrary JSON value. + * + * You should usually call [Builder.outputFormat] with a well-typed [OutputFormat] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun outputFormat(outputFormat: JsonField) = apply { + this.outputFormat = outputFormat + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -2868,6 +3021,25 @@ private constructor( */ fun quality(quality: JsonField) = apply { this.quality = quality } + /** The prompt that was used after any model prompt rewriting. */ + fun revisedPrompt(revisedPrompt: String?) = + revisedPrompt(JsonField.ofNullable(revisedPrompt)) + + /** Alias for calling [Builder.revisedPrompt] with `revisedPrompt.orElse(null)`. */ + fun revisedPrompt(revisedPrompt: Optional) = + revisedPrompt(revisedPrompt.getOrNull()) + + /** + * Sets [Builder.revisedPrompt] to an arbitrary JSON value. + * + * You should usually call [Builder.revisedPrompt] with a well-typed [String] value + * instead. This method is primarily for setting the field to an undocumented or not yet + * supported value. + */ + fun revisedPrompt(revisedPrompt: JsonField) = apply { + this.revisedPrompt = revisedPrompt + } + /** The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`. */ fun size(size: Size?) = size(JsonField.ofNullable(size)) @@ -2930,7 +3102,11 @@ private constructor( checkRequired("result", result), checkRequired("status", status), type, + action, + background, + outputFormat, quality, + revisedPrompt, size, additionalProperties.toMutableMap(), ) @@ -2960,7 +3136,11 @@ private constructor( throw OpenAIInvalidDataException("'type' is invalid, received $it") } } + action().ifPresent { it.validate() } + background().ifPresent { it.validate() } + outputFormat().ifPresent { it.validate() } quality().ifPresent { it.validate() } + revisedPrompt() size() validated = true } @@ -2985,7 +3165,11 @@ private constructor( (if (result.asKnown().isPresent) 1 else 0) + (status.asKnown().getOrNull()?.validity() ?: 0) + type.let { if (it == JsonValue.from("image_generation_call")) 1 else 0 } + + (action.asKnown().getOrNull()?.validity() ?: 0) + + (background.asKnown().getOrNull()?.validity() ?: 0) + + (outputFormat.asKnown().getOrNull()?.validity() ?: 0) + (quality.asKnown().getOrNull()?.validity() ?: 0) + + (if (revisedPrompt.asKnown().isPresent) 1 else 0) + (if (size.asKnown().isPresent) 1 else 0) /** The status of the image generation call. */ @@ -3140,6 +3324,448 @@ private constructor( override fun toString() = value.toString() } + /** The action used for image generation. */ + class Action @JsonCreator private constructor(private val value: JsonField) : Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val GENERATE = of("generate") + + @JvmField val EDIT = of("edit") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Action(JsonField.of(value)) + } + + /** An enum containing [Action]'s known values. */ + enum class Known { + GENERATE, + EDIT, + AUTO, + } + + /** + * An enum containing [Action]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Action] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + GENERATE, + EDIT, + AUTO, + /** + * An enum member indicating that [Action] was instantiated with an unknown value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + GENERATE -> Value.GENERATE + EDIT -> Value.EDIT + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + GENERATE -> Known.GENERATE + EDIT -> Known.EDIT + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Action: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Action = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Action && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The background setting used for generation. */ + class Background @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val TRANSPARENT = of("transparent") + + @JvmField val OPAQUE = of("opaque") + + @JvmField val AUTO = of("auto") + + @JvmStatic fun of(value: String) = Background(JsonField.of(value)) + } + + /** An enum containing [Background]'s known values. */ + enum class Known { + TRANSPARENT, + OPAQUE, + AUTO, + } + + /** + * An enum containing [Background]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [Background] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + TRANSPARENT, + OPAQUE, + AUTO, + /** + * An enum member indicating that [Background] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + TRANSPARENT -> Value.TRANSPARENT + OPAQUE -> Value.OPAQUE + AUTO -> Value.AUTO + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + TRANSPARENT -> Known.TRANSPARENT + OPAQUE -> Known.OPAQUE + AUTO -> Known.AUTO + else -> throw OpenAIInvalidDataException("Unknown Background: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): Background = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is Background && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + + /** The output format used for generation. */ + class OutputFormat @JsonCreator private constructor(private val value: JsonField) : + Enum { + + /** + * Returns this class instance's raw value. + * + * This is usually only useful if this instance was deserialized from data that doesn't + * match any known member, and you want to know that value. For example, if the SDK is + * on an older version than the API, then the API may respond with new members that the + * SDK is unaware of. + */ + @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value + + companion object { + + @JvmField val PNG = of("png") + + @JvmField val WEBP = of("webp") + + @JvmField val JPEG = of("jpeg") + + @JvmStatic fun of(value: String) = OutputFormat(JsonField.of(value)) + } + + /** An enum containing [OutputFormat]'s known values. */ + enum class Known { + PNG, + WEBP, + JPEG, + } + + /** + * An enum containing [OutputFormat]'s known values, as well as an [_UNKNOWN] member. + * + * An instance of [OutputFormat] can contain an unknown value in a couple of cases: + * - It was deserialized from data that doesn't match any known member. For example, if + * the SDK is on an older version than the API, then the API may respond with new + * members that the SDK is unaware of. + * - It was constructed with an arbitrary value using the [of] method. + */ + enum class Value { + PNG, + WEBP, + JPEG, + /** + * An enum member indicating that [OutputFormat] was instantiated with an unknown + * value. + */ + _UNKNOWN, + } + + /** + * Returns an enum member corresponding to this class instance's value, or + * [Value._UNKNOWN] if the class was instantiated with an unknown value. + * + * Use the [known] method instead if you're certain the value is always known or if you + * want to throw for the unknown case. + */ + fun value(): Value = + when (this) { + PNG -> Value.PNG + WEBP -> Value.WEBP + JPEG -> Value.JPEG + else -> Value._UNKNOWN + } + + /** + * Returns an enum member corresponding to this class instance's value. + * + * Use the [value] method instead if you're uncertain the value is always known and + * don't want to throw for the unknown case. + * + * @throws OpenAIInvalidDataException if this class instance's value is a not a known + * member. + */ + fun known(): Known = + when (this) { + PNG -> Known.PNG + WEBP -> Known.WEBP + JPEG -> Known.JPEG + else -> throw OpenAIInvalidDataException("Unknown OutputFormat: $value") + } + + /** + * Returns this class instance's primitive wire representation. + * + * This differs from the [toString] method because that method is primarily for + * debugging and generally doesn't throw. + * + * @throws OpenAIInvalidDataException if this class instance's value does not have the + * expected primitive type. + */ + fun asString(): String = + _value().asString().orElseThrow { + OpenAIInvalidDataException("Value is not a String") + } + + private var validated: Boolean = false + + /** + * Validates that the types of all values in this object match their expected types + * recursively. + * + * This method is _not_ forwards compatible with new types from the API for existing + * fields. + * + * @throws OpenAIInvalidDataException if any value type in this object doesn't match its + * expected type. + */ + fun validate(): OutputFormat = apply { + if (validated) { + return@apply + } + + known() + validated = true + } + + fun isValid(): Boolean = + try { + validate() + true + } catch (e: OpenAIInvalidDataException) { + false + } + + /** + * Returns a score indicating how many valid values are contained in this object + * recursively. + * + * Used for best match union deserialization. + */ + @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1 + + override fun equals(other: Any?): Boolean { + if (this === other) { + return true + } + + return other is OutputFormat && value == other.value + } + + override fun hashCode() = value.hashCode() + + override fun toString() = value.toString() + } + /** * The quality of the image generated by the image generation tool call. One of `low`, * `medium`, `high`, `xhigh`, `max`, or `auto`. @@ -3462,19 +4088,35 @@ private constructor( result == other.result && status == other.status && type == other.type && + action == other.action && + background == other.background && + outputFormat == other.outputFormat && quality == other.quality && + revisedPrompt == other.revisedPrompt && size == other.size && additionalProperties == other.additionalProperties } private val hashCode: Int by lazy { - Objects.hash(id, result, status, type, quality, size, additionalProperties) + Objects.hash( + id, + result, + status, + type, + action, + background, + outputFormat, + quality, + revisedPrompt, + size, + additionalProperties, + ) } override fun hashCode(): Int = hashCode override fun toString() = - "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, quality=$quality, size=$size, additionalProperties=$additionalProperties}" + "ImageGenerationCall{id=$id, result=$result, status=$status, type=$type, action=$action, background=$background, outputFormat=$outputFormat, quality=$quality, revisedPrompt=$revisedPrompt, size=$size, additionalProperties=$additionalProperties}" } /** A tool call to run a command on the local shell. */ diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsePrompt.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsePrompt.kt index a34bb6a29..8d817e61a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsePrompt.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsePrompt.kt @@ -20,7 +20,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ResponsePrompt @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseReasoningItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseReasoningItem.kt index a8b5a5914..a047d9968 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseReasoningItem.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseReasoningItem.kt @@ -24,7 +24,7 @@ import kotlin.jvm.optionals.getOrNull * 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). */ class ResponseReasoningItem @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseSteerInputContent.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseSteerInputContent.kt index d2683ca10..19743f9ea 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseSteerInputContent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseSteerInputContent.kt @@ -34,7 +34,7 @@ private constructor( /** * 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) */ fun inputImage(): Optional = Optional.ofNullable(inputImage) @@ -52,7 +52,7 @@ private constructor( /** * 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) */ fun asInputImage(): ResponseInputImageContent = inputImage.getOrThrow("inputImage") @@ -192,7 +192,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofInputImage(inputImage: ResponseInputImageContent) = @@ -215,7 +215,7 @@ private constructor( /** * 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) */ fun visitInputImage(inputImage: ResponseInputImageContent): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseTextConfig.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseTextConfig.kt index c56d555bf..39d246f80 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseTextConfig.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseTextConfig.kt @@ -23,8 +23,8 @@ import kotlin.jvm.optionals.getOrNull /** * 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) */ class ResponseTextConfig @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -49,7 +49,7 @@ private constructor( * * 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. * @@ -127,7 +127,7 @@ private constructor( * * 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/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseUsage.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseUsage.kt index be76e585b..b86c9aa53 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseUsage.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseUsage.kt @@ -376,7 +376,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -460,7 +460,7 @@ private constructor( /** * 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). */ fun cachedTokens(cachedTokens: Long) = cachedTokens(JsonField.of(cachedTokens)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsesClientEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsesClientEvent.kt index 73d7390b4..280e6f508 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsesClientEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsesClientEvent.kt @@ -582,7 +582,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -634,11 +634,11 @@ private constructor( * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -660,7 +660,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -693,7 +693,7 @@ private constructor( /** * 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 + * to the [model guide](https://developers.openai.com/api/docs/models) to browse and compare * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -721,8 +721,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -732,7 +732,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -742,7 +742,7 @@ private constructor( /** * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -757,7 +757,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -771,7 +771,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -791,7 +791,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -803,7 +803,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -816,12 +816,12 @@ private constructor( * 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`. @@ -839,7 +839,8 @@ private constructor( /** * 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). + * subject to the + * [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -851,7 +852,7 @@ private constructor( * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -892,8 +893,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -916,16 +917,16 @@ private constructor( * 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). + * [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 custom tools to call your own code. + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). You + * can also use custom tools to call your own code. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -973,7 +974,7 @@ private constructor( * `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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1373,7 +1374,7 @@ private constructor( /** * 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). */ fun background(background: Boolean?) = background(JsonField.ofNullable(background)) @@ -1513,11 +1514,12 @@ private constructor( * 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) */ fun input(input: Input) = input(JsonField.of(input)) @@ -1565,7 +1567,7 @@ private constructor( /** * 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). */ fun maxOutputTokens(maxOutputTokens: Long?) = maxOutputTokens(JsonField.ofNullable(maxOutputTokens)) @@ -1645,8 +1647,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: ResponsesModel) = model(JsonField.of(model)) @@ -1717,7 +1719,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -1743,7 +1745,7 @@ private constructor( /** * 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). */ fun prompt(prompt: ResponsePrompt?) = prompt(JsonField.ofNullable(prompt)) @@ -1762,7 +1764,7 @@ private constructor( /** * 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). */ fun promptCacheKey(promptCacheKey: String?) = promptCacheKey(JsonField.ofNullable(promptCacheKey)) @@ -1790,8 +1792,8 @@ private constructor( * 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. + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) + * for current details. */ fun promptCacheOptions(promptCacheOptions: PromptCacheOptions) = promptCacheOptions(JsonField.of(promptCacheOptions)) @@ -1812,7 +1814,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -1850,7 +1852,7 @@ private constructor( /** * Configuration options for - * [reasoning models](https://platform.openai.com/docs/guides/reasoning). + * [reasoning models](https://developers.openai.com/api/docs/guides/reasoning). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -1872,7 +1874,7 @@ private constructor( * 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). */ fun safetyIdentifier(safetyIdentifier: String?) = safetyIdentifier(JsonField.ofNullable(safetyIdentifier)) @@ -1901,12 +1903,13 @@ private constructor( * 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 @@ -1939,7 +1942,7 @@ private constructor( * 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). */ fun store(store: Boolean?) = store(JsonField.ofNullable(store)) @@ -1967,7 +1970,7 @@ private constructor( * 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. */ fun stream(stream: Boolean?) = stream(JsonField.ofNullable(stream)) @@ -2059,8 +2062,9 @@ private constructor( /** * 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) */ fun text(text: ResponseTextConfig) = text(JsonField.of(text)) @@ -2130,15 +2134,17 @@ private constructor( * 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). + * [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). + * about + * [function calling](https://developers.openai.com/api/docs/guides/function-calling). * You can also use custom tools to call your own code. */ fun tools(tools: List) = tools(JsonField.of(tools)) @@ -2367,7 +2373,7 @@ private constructor( * `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). */ @Deprecated("deprecated") fun user(user: String) = user(JsonField.of(user)) @@ -3031,11 +3037,11 @@ private constructor( * 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) */ @JsonDeserialize(using = Input.Deserializer::class) @JsonSerialize(using = Input.Serializer::class) @@ -4454,7 +4460,7 @@ private constructor( * 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 + * [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching) for * current details. */ class PromptCacheOptions @@ -5021,7 +5027,7 @@ private constructor( * * 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 models, only `24h` is supported. @@ -5183,12 +5189,12 @@ private constructor( * 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`. @@ -5586,7 +5592,7 @@ private constructor( /** * 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). */ fun types(): Optional = Optional.ofNullable(types) @@ -5646,7 +5652,7 @@ private constructor( /** * 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). */ fun asTypes(): ToolChoiceTypes = types.getOrThrow("types") @@ -5909,7 +5915,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofTypes(types: ToolChoiceTypes) = ToolChoice(types = types) @@ -5965,7 +5971,7 @@ private constructor( /** * 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). */ fun visitTypes(types: ToolChoiceTypes): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt index 78b70a5e2..12a555b5b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt @@ -57,38 +57,38 @@ private constructor( /** * 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). */ fun function(): Optional = Optional.ofNullable(function) /** * 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). */ fun fileSearch(): Optional = Optional.ofNullable(fileSearch) /** * 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). */ fun computer(): Optional = Optional.ofNullable(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). */ fun computerUsePreview(): Optional = Optional.ofNullable(computerUsePreview) /** * 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). */ fun webSearch(): Optional = Optional.ofNullable(webSearch) /** * 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). */ fun mcp(): Optional = Optional.ofNullable(mcp) @@ -109,7 +109,7 @@ private constructor( /** * 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) */ fun custom(): Optional = Optional.ofNullable(custom) @@ -121,7 +121,7 @@ private constructor( /** * 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). */ fun webSearchPreview(): Optional = Optional.ofNullable(webSearchPreview) @@ -162,38 +162,38 @@ private constructor( /** * 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). */ fun asFunction(): FunctionTool = function.getOrThrow("function") /** * 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). */ fun asFileSearch(): FileSearchTool = fileSearch.getOrThrow("fileSearch") /** * 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). */ fun asComputer(): ComputerTool = computer.getOrThrow("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). */ fun asComputerUsePreview(): ComputerUsePreviewTool = computerUsePreview.getOrThrow("computerUsePreview") /** * 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). */ fun asWebSearch(): WebSearchTool = webSearch.getOrThrow("webSearch") /** * 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). */ fun asMcp(): Mcp = mcp.getOrThrow("mcp") @@ -214,7 +214,7 @@ private constructor( /** * 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) */ fun asCustom(): CustomTool = custom.getOrThrow("custom") @@ -226,7 +226,7 @@ private constructor( /** * 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). */ fun asWebSearchPreview(): WebSearchPreviewTool = webSearchPreview.getOrThrow("webSearchPreview") @@ -518,25 +518,25 @@ private constructor( /** * 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). */ @JvmStatic fun ofFunction(function: FunctionTool) = Tool(function = function) /** * 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). */ @JvmStatic fun ofFileSearch(fileSearch: FileSearchTool) = Tool(fileSearch = fileSearch) /** * 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). */ @JvmStatic fun ofComputer(computer: ComputerTool) = Tool(computer = 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). */ @JvmStatic fun ofComputerUsePreview(computerUsePreview: ComputerUsePreviewTool) = @@ -544,14 +544,14 @@ private constructor( /** * 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). */ @JvmStatic fun ofWebSearch(webSearch: WebSearchTool) = Tool(webSearch = webSearch) /** * 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). */ @JvmStatic fun ofMcp(mcp: Mcp) = Tool(mcp = mcp) @@ -581,7 +581,7 @@ private constructor( /** * 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) */ @JvmStatic fun ofCustom(custom: CustomTool) = Tool(custom = custom) @@ -593,7 +593,7 @@ private constructor( /** * 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). + * the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ @JvmStatic fun ofWebSearchPreview(webSearchPreview: WebSearchPreviewTool) = @@ -608,38 +608,38 @@ private constructor( /** * 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). */ fun visitFunction(function: FunctionTool): T /** * 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). */ fun visitFileSearch(fileSearch: FileSearchTool): T /** * 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). */ fun visitComputer(computer: ComputerTool): T /** * 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). */ fun visitComputerUsePreview(computerUsePreview: ComputerUsePreviewTool): T /** * 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). */ fun visitWebSearch(webSearch: WebSearchTool): T /** * 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). */ fun visitMcp(mcp: Mcp): T @@ -659,7 +659,7 @@ private constructor( /** * 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) */ fun visitCustom(custom: CustomTool): T @@ -671,7 +671,7 @@ private constructor( /** * 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). + * the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search). */ fun visitWebSearchPreview(webSearchPreview: WebSearchPreviewTool): T @@ -828,7 +828,7 @@ private constructor( /** * 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). */ class Mcp @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -949,7 +949,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` @@ -1286,7 +1286,7 @@ private constructor( * 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: * - Dropbox: `connector_dropbox` @@ -2136,7 +2136,7 @@ private constructor( /** * 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: * - Dropbox: `connector_dropbox` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ToolChoiceTypes.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ToolChoiceTypes.kt index 2771540dd..b3dc8ff37 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ToolChoiceTypes.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ToolChoiceTypes.kt @@ -19,7 +19,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class ToolChoiceTypes @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -35,7 +35,7 @@ private constructor( /** * 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` @@ -97,7 +97,7 @@ private constructor( /** * 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` @@ -189,7 +189,7 @@ private constructor( /** * 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` diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchPreviewTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchPreviewTool.kt index 8557202c0..0c8c053cf 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchPreviewTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchPreviewTool.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class WebSearchPreviewTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchTool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchTool.kt index 0edb23723..a93a5c333 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchTool.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/WebSearchTool.kt @@ -22,7 +22,7 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class WebSearchTool @JsonCreator(mode = JsonCreator.Mode.DISABLED) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt index 10e95ed10..1e621bbb5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt @@ -104,8 +104,8 @@ private constructor( /** * 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. + * the [model guide](https://developers.openai.com/api/docs/models) to browse and compare + * available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -132,8 +132,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -142,7 +142,7 @@ private constructor( /** * **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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -152,8 +152,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -401,8 +401,8 @@ private constructor( /** * 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. + * Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and + * compare available models. */ fun model(model: String?) = apply { body.model(model) } @@ -475,8 +475,8 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = apply { body.previousResponseId(previousResponseId) @@ -501,7 +501,7 @@ private constructor( /** * **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). */ fun reasoning(reasoning: Reasoning?) = apply { body.reasoning(reasoning) } @@ -520,8 +520,8 @@ private constructor( /** * 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) */ fun text(text: Text?) = apply { body.text(text) } @@ -970,8 +970,8 @@ private constructor( /** * 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. + * Refer to the [model guide](https://developers.openai.com/api/docs/models) to browse and + * compare available models. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1000,8 +1000,8 @@ private constructor( /** * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1011,7 +1011,7 @@ private constructor( /** * **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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1021,8 +1021,8 @@ private constructor( /** * 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) * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -1299,8 +1299,8 @@ private constructor( /** * 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. + * points. Refer to the [model guide](https://developers.openai.com/api/docs/models) to + * browse and compare available models. */ fun model(model: String?) = model(JsonField.ofNullable(model)) @@ -1375,7 +1375,7 @@ private constructor( /** * 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`. */ fun previousResponseId(previousResponseId: String?) = @@ -1401,7 +1401,7 @@ private constructor( /** * **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). */ fun reasoning(reasoning: Reasoning?) = reasoning(JsonField.ofNullable(reasoning)) @@ -1420,8 +1420,9 @@ private constructor( /** * 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) */ fun text(text: Text?) = text(JsonField.ofNullable(text)) @@ -2416,8 +2417,8 @@ private constructor( /** * 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) */ class Text @JsonCreator(mode = JsonCreator.Mode.DISABLED) @@ -2442,7 +2443,7 @@ private constructor( * * 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. * @@ -2522,7 +2523,7 @@ private constructor( * * 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. * @@ -2849,7 +2850,7 @@ private constructor( /** * 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). */ fun types(): Optional = Optional.ofNullable(types) @@ -2907,7 +2908,7 @@ private constructor( /** * 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). */ fun asTypes(): ToolChoiceTypes = types.getOrThrow("types") @@ -3159,7 +3160,7 @@ private constructor( /** * 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). */ @JvmStatic fun ofTypes(types: ToolChoiceTypes) = ToolChoice(types = types) @@ -3212,7 +3213,7 @@ private constructor( /** * 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). */ fun visitTypes(types: ToolChoiceTypes): T diff --git a/openai-java-core/src/main/kotlin/com/openai/models/uploads/Upload.kt b/openai-java-core/src/main/kotlin/com/openai/models/uploads/Upload.kt index 266783e8b..765999ed2 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/uploads/Upload.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/uploads/Upload.kt @@ -114,7 +114,7 @@ private constructor( /** * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -324,7 +324,7 @@ private constructor( /** * 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. */ fun purpose(purpose: String) = purpose(JsonField.of(purpose)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCompleteParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCompleteParams.kt index fcdf7e3a4..92a9eda0a 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCompleteParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCompleteParams.kt @@ -23,10 +23,10 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + * Completes the [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 is ready to use + * [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. diff --git a/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCreateParams.kt index 3499f4d76..7671bc932 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/uploads/UploadCreateParams.kt @@ -22,21 +22,22 @@ import java.util.Optional import kotlin.jvm.optionals.getOrNull /** - * Creates an intermediate [Upload](https://platform.openai.com/docs/api-reference/uploads/object) + * Creates an intermediate [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 contains all the + * [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). + * on [creating a File](https://developers.openai.com/api/reference/resources/files/methods/create). * * Returns the Upload object with status `pending`. */ @@ -78,7 +79,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -225,7 +226,7 @@ private constructor( * 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). */ fun purpose(purpose: FilePurpose) = apply { body.purpose(purpose) } @@ -460,7 +461,7 @@ private constructor( * 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -607,7 +608,7 @@ private constructor( * 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). */ fun purpose(purpose: FilePurpose) = purpose(JsonField.of(purpose)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/uploads/parts/PartCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/uploads/parts/PartCreateParams.kt index 30495f942..071ab570f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/uploads/parts/PartCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/uploads/parts/PartCreateParams.kt @@ -24,14 +24,15 @@ import kotlin.io.path.name import kotlin.jvm.optionals.getOrNull /** - * 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. + * 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://platform.openai.com/docs/api-reference/uploads/complete). + * when you + * [complete the Upload](https://developers.openai.com/api/reference/resources/uploads/methods/complete). */ class PartCreateParams private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/VectorStoreCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/VectorStoreCreateParams.kt index 16824f425..6a1e48c65 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/VectorStoreCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/VectorStoreCreateParams.kt @@ -56,8 +56,8 @@ private constructor( fun expiresAfter(): Optional = body.expiresAfter() /** - * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -246,8 +246,8 @@ private constructor( } /** - * 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. */ fun fileIds(fileIds: List) = apply { body.fileIds(fileIds) } @@ -503,8 +503,8 @@ private constructor( fun expiresAfter(): Optional = expiresAfter.getOptional("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -698,8 +698,9 @@ private constructor( } /** - * 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. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt index 06fd8a2b8..3ef876989 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt @@ -58,11 +58,12 @@ private constructor( fun chunkingStrategy(): Optional = body.chunkingStrategy() /** - * 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`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -228,9 +229,9 @@ private constructor( } /** - * 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 + * 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`. @@ -469,9 +470,9 @@ private constructor( chunkingStrategy.getOptional("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 + * 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`. @@ -631,10 +632,10 @@ private constructor( ) /** - * 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 + * 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`. */ @@ -932,10 +933,10 @@ private constructor( ) : this(fileId, attributes, chunkingStrategy, mutableMapOf()) /** - * 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) + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -1033,10 +1034,10 @@ private constructor( } /** - * 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) + * 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. */ fun fileId(fileId: String) = fileId(JsonField.of(fileId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/VectorStoreFileBatch.kt b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/VectorStoreFileBatch.kt index db0085266..2eacd5f9c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/VectorStoreFileBatch.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/VectorStoreFileBatch.kt @@ -90,8 +90,8 @@ private constructor( /** * 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. + * [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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -251,8 +251,8 @@ private constructor( /** * 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. + * [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. */ fun vectorStoreId(vectorStoreId: String) = vectorStoreId(JsonField.of(vectorStoreId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileCreateParams.kt index 092530f3d..d9e310d0c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileCreateParams.kt @@ -27,8 +27,8 @@ import kotlin.jvm.optionals.getOrNull /** * 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). */ class FileCreateParams private constructor( @@ -41,10 +41,10 @@ private constructor( fun vectorStoreId(): Optional = Optional.ofNullable(vectorStoreId) /** - * 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 + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -151,10 +151,10 @@ private constructor( fun body(body: Body) = apply { this.body = body.toBuilder() } /** - * 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) + * 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. */ fun fileId(fileId: String) = apply { body.fileId(fileId) } @@ -402,10 +402,10 @@ private constructor( ) : this(fileId, attributes, chunkingStrategy, mutableMapOf()) /** - * 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) + * 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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is @@ -503,10 +503,10 @@ private constructor( } /** - * 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) + * 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. */ fun fileId(fileId: String) = fileId(JsonField.of(fileId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileDeleteParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileDeleteParams.kt index 6af2684f9..c26fc6947 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileDeleteParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/FileDeleteParams.kt @@ -15,7 +15,8 @@ import kotlin.jvm.optionals.getOrNull /** * 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. + * [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) + * endpoint. */ class FileDeleteParams private constructor( diff --git a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/VectorStoreFile.kt b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/VectorStoreFile.kt index ed01d15f4..1429bb015 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/VectorStoreFile.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/files/VectorStoreFile.kt @@ -129,8 +129,8 @@ private constructor( /** * 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. + * [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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -363,8 +363,8 @@ private constructor( /** * 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. + * [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. */ fun vectorStoreId(vectorStoreId: String) = vectorStoreId(JsonField.of(vectorStoreId)) diff --git a/openai-java-core/src/main/kotlin/com/openai/models/webhooks/LiveCallIncomingWebhookEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/webhooks/LiveCallIncomingWebhookEvent.kt index f59a0f945..8ca506aa1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/webhooks/LiveCallIncomingWebhookEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/webhooks/LiveCallIncomingWebhookEvent.kt @@ -344,7 +344,8 @@ private constructor( fun sessionId(): String = sessionId.getRequired("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -422,7 +423,11 @@ private constructor( */ fun sessionId(sessionId: JsonField) = apply { this.sessionId = sessionId } - /** 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. + */ fun sipHeaders(sipHeaders: List) = sipHeaders(JsonField.of(sipHeaders)) /** diff --git a/openai-java-core/src/main/kotlin/com/openai/models/webhooks/RealtimeCallIncomingWebhookEvent.kt b/openai-java-core/src/main/kotlin/com/openai/models/webhooks/RealtimeCallIncomingWebhookEvent.kt index ddc88dc56..2887a55b1 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/webhooks/RealtimeCallIncomingWebhookEvent.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/webhooks/RealtimeCallIncomingWebhookEvent.kt @@ -346,7 +346,8 @@ private constructor( fun callId(): String = callId.getRequired("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. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is * unexpectedly missing or null (e.g. if the server responded with an unexpected value). @@ -426,7 +427,11 @@ private constructor( */ fun callId(callId: JsonField) = apply { this.callId = callId } - /** 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. + */ fun sipHeaders(sipHeaders: List) = sipHeaders(JsonField.of(sipHeaders)) /** diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsync.kt index 2d4ecd716..1a008a161 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ContentProvenanceCheckServiceAsync.kt @@ -26,7 +26,7 @@ interface ContentProvenanceCheckServiceAsync { /** * 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 metadata was stripped or has diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsync.kt index a05ff2453..11051a5f0 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/EvalServiceAsync.kt @@ -42,7 +42,8 @@ interface EvalServiceAsync { * 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). */ fun create(params: EvalCreateParams): CompletableFuture = create(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsync.kt index a64bf65e2..8e7b205ab 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/FileServiceAsync.kt @@ -41,19 +41,20 @@ interface FileServiceAsync { * storage limit. Uploads to this endpoint are rate-limited to 1,000 requests per minute per * authenticated 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 + * 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) + * [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. * diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt index f3c316ff3..4defb2a64 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt @@ -70,7 +70,7 @@ interface ImageServiceAsync { /** * 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). */ fun generate(params: ImageGenerateParams): CompletableFuture = generate(params, RequestOptions.none()) @@ -83,7 +83,7 @@ interface ImageServiceAsync { /** * 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). */ fun generateStreaming(params: ImageGenerateParams): AsyncStreamResponse = generateStreaming(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsync.kt index a282cc67b..d67d3e257 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ModerationServiceAsync.kt @@ -26,8 +26,8 @@ interface ModerationServiceAsync { fun withOptions(modifier: Consumer): ModerationServiceAsync /** - * Classifies if text and/or image inputs are potentially harmful. Learn more in the - * [moderation guide](https://platform.openai.com/docs/guides/moderation). + * Classifies if text and/or image inputs are potentially harmful. Learn more in + * [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). */ fun create(params: ModerationCreateParams): CompletableFuture = create(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsync.kt index 52fb532f9..67d78f800 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsync.kt @@ -43,15 +43,16 @@ interface ResponseServiceAsync { fun inputTokens(): InputTokenServiceAsync /** - * 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. + * 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. */ fun create(): CompletableFuture = create(ResponseCreateParams.none()) @@ -95,15 +96,16 @@ interface ResponseServiceAsync { } /** - * 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. + * 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. */ fun createStreaming(): AsyncStreamResponse = createStreaming(ResponseCreateParams.none()) @@ -247,7 +249,7 @@ interface ResponseServiceAsync { /** * 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). */ fun cancel(responseId: String): CompletableFuture = cancel(responseId, ResponseCancelParams.none()) @@ -284,9 +286,9 @@ interface ResponseServiceAsync { * 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). */ fun compact(params: ResponseCompactParams): CompletableFuture = compact(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsync.kt index 481aec1b1..b0330c9f5 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/UploadServiceAsync.kt @@ -33,23 +33,23 @@ interface UploadServiceAsync { /** * Creates an intermediate - * [Upload](https://platform.openai.com/docs/api-reference/uploads/object) 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 + * [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://platform.openai.com/docs/api-reference/files/object) object that contains all + * [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`. */ @@ -99,10 +99,10 @@ interface UploadServiceAsync { cancel(uploadId, UploadCancelParams.none(), requestOptions) /** - * Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + * Completes the [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 is ready to + * [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. diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsync.kt index c71a9f36b..bfc397923 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/beta/ResponseServiceAsync.kt @@ -41,15 +41,16 @@ interface ResponseServiceAsync { fun inputTokens(): InputTokenServiceAsync /** - * 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. + * 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. */ fun create(): CompletableFuture = create(ResponseCreateParams.none()) @@ -69,15 +70,16 @@ interface ResponseServiceAsync { create(ResponseCreateParams.none(), requestOptions) /** - * 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. + * 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. */ fun createStreaming(): AsyncStreamResponse = createStreaming(ResponseCreateParams.none()) @@ -207,7 +209,7 @@ interface ResponseServiceAsync { /** * 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). */ fun cancel(responseId: String): CompletableFuture = cancel(responseId, ResponseCancelParams.none()) @@ -247,9 +249,9 @@ interface ResponseServiceAsync { * 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). */ fun compact(params: ResponseCompactParams): CompletableFuture = compact(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsync.kt index 8bc6365a5..756a31b9f 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsync.kt @@ -43,21 +43,21 @@ interface ChatCompletionServiceAsync { /** * **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. @@ -99,21 +99,21 @@ interface ChatCompletionServiceAsync { /** * **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. diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsync.kt index 8746e6c40..b7b2691a6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/JobServiceAsync.kt @@ -44,7 +44,8 @@ interface JobServiceAsync { * 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) */ fun create(params: JobCreateParams): CompletableFuture = create(params, RequestOptions.none()) @@ -58,7 +59,8 @@ interface JobServiceAsync { /** * 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) */ fun retrieve(fineTuningJobId: String): CompletableFuture = retrieve(fineTuningJobId, JobRetrieveParams.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsync.kt index 80eb16ca3..1429c59df 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsync.kt @@ -32,7 +32,8 @@ interface PermissionServiceAsync { fun withOptions(modifier: Consumer): PermissionServiceAsync /** - * **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. @@ -65,7 +66,8 @@ interface PermissionServiceAsync { ): CompletableFuture /** - * **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. @@ -115,7 +117,8 @@ interface PermissionServiceAsync { retrieve(fineTunedModelCheckpoint, PermissionRetrieveParams.none(), requestOptions) /** - * **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. @@ -159,7 +162,8 @@ interface PermissionServiceAsync { list(fineTunedModelCheckpoint, PermissionListParams.none(), requestOptions) /** - * **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/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsync.kt index 9cb595980..ce4af1466 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsync.kt @@ -36,7 +36,7 @@ interface ClientSecretServiceAsync { * client connection. * * [Learn more about authentication with client secrets over - * WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + * 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/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsync.kt index 49cf2da8a..82f70d3bb 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/uploads/PartServiceAsync.kt @@ -26,8 +26,9 @@ interface PartServiceAsync { fun withOptions(modifier: Consumer): PartServiceAsync /** - * 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 + * 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 @@ -35,7 +36,7 @@ interface PartServiceAsync { * * 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). */ fun create(uploadId: String, params: PartCreateParams): CompletableFuture = create(uploadId, params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsync.kt index 625de41dd..21d97643e 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsync.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/async/vectorstores/FileServiceAsync.kt @@ -34,8 +34,8 @@ interface FileServiceAsync { /** * 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). */ fun create( vectorStoreId: String, @@ -142,7 +142,8 @@ interface FileServiceAsync { /** * 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. + * [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) + * endpoint. */ fun delete( fileId: String, diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ContentProvenanceCheckService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ContentProvenanceCheckService.kt index b6856d77f..9f2ebd9b7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ContentProvenanceCheckService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ContentProvenanceCheckService.kt @@ -26,7 +26,7 @@ interface ContentProvenanceCheckService { /** * 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 metadata was stripped or has diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/EvalService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/EvalService.kt index 27eeb1273..3ff077f30 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/EvalService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/EvalService.kt @@ -42,7 +42,8 @@ interface EvalService { * 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). */ fun create(params: EvalCreateParams): EvalCreateResponse = create(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/FileService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/FileService.kt index 038982dc1..9b6e1378c 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/FileService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/FileService.kt @@ -41,19 +41,20 @@ interface FileService { * storage limit. Uploads to this endpoint are rate-limited to 1,000 requests per minute per * authenticated 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 + * 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) + * [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. * diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt index 12f6b735e..f1a472691 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt @@ -69,7 +69,7 @@ interface ImageService { /** * 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). */ fun generate(params: ImageGenerateParams): ImagesResponse = generate(params, RequestOptions.none()) @@ -82,7 +82,7 @@ interface ImageService { /** * 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). */ @MustBeClosed fun generateStreaming(params: ImageGenerateParams): StreamResponse = diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ModerationService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ModerationService.kt index 20a7cb738..09c6cecfc 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ModerationService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ModerationService.kt @@ -26,8 +26,8 @@ interface ModerationService { fun withOptions(modifier: Consumer): ModerationService /** - * Classifies if text and/or image inputs are potentially harmful. Learn more in the - * [moderation guide](https://platform.openai.com/docs/guides/moderation). + * Classifies if text and/or image inputs are potentially harmful. Learn more in + * [the moderation guide](https://developers.openai.com/api/docs/guides/moderation). */ fun create(params: ModerationCreateParams): ModerationCreateResponse = create(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ResponseService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ResponseService.kt index 4b8b62d98..edc3ed50b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ResponseService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ResponseService.kt @@ -41,15 +41,16 @@ interface ResponseService { fun inputTokens(): InputTokenService /** - * 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. + * 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. */ fun create(): Response = create(ResponseCreateParams.none()) @@ -89,15 +90,16 @@ interface ResponseService { StructuredResponse(params.responseType, create(params.rawParams, requestOptions)) /** - * 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. + * 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. */ @MustBeClosed fun createStreaming(): StreamResponse = @@ -241,7 +243,7 @@ interface ResponseService { /** * 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). */ fun cancel(responseId: String): Response = cancel(responseId, ResponseCancelParams.none()) @@ -275,9 +277,9 @@ interface ResponseService { * 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). */ fun compact(params: ResponseCompactParams): CompactedResponse = compact(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/UploadService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/UploadService.kt index f988d74c6..2ae4cced7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/UploadService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/UploadService.kt @@ -33,23 +33,23 @@ interface UploadService { /** * Creates an intermediate - * [Upload](https://platform.openai.com/docs/api-reference/uploads/object) 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 + * [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://platform.openai.com/docs/api-reference/files/object) object that contains all + * [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`. */ @@ -93,10 +93,10 @@ interface UploadService { cancel(uploadId, UploadCancelParams.none(), requestOptions) /** - * Completes the [Upload](https://platform.openai.com/docs/api-reference/uploads/object). + * Completes the [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 is ready to + * [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. diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/beta/ResponseService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/beta/ResponseService.kt index fb348896e..b76e013a7 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/beta/ResponseService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/beta/ResponseService.kt @@ -39,15 +39,16 @@ interface ResponseService { fun inputTokens(): InputTokenService /** - * 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. + * 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. */ fun create(): BetaResponse = create(ResponseCreateParams.none()) @@ -66,15 +67,16 @@ interface ResponseService { create(ResponseCreateParams.none(), requestOptions) /** - * 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. + * 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. */ @MustBeClosed fun createStreaming(): StreamResponse = @@ -198,7 +200,7 @@ interface ResponseService { /** * 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). */ fun cancel(responseId: String): BetaResponse = cancel(responseId, ResponseCancelParams.none()) @@ -232,9 +234,9 @@ interface ResponseService { * 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). */ fun compact(params: ResponseCompactParams): BetaCompactedResponse = compact(params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/chat/ChatCompletionService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/chat/ChatCompletionService.kt index b6c49a43f..255cd045d 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/chat/ChatCompletionService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/chat/ChatCompletionService.kt @@ -41,21 +41,21 @@ interface ChatCompletionService { /** * **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. @@ -95,21 +95,21 @@ interface ChatCompletionService { /** * **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. diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/JobService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/JobService.kt index 3d846e20b..8773a8052 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/JobService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/JobService.kt @@ -44,7 +44,8 @@ interface JobService { * 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) */ fun create(params: JobCreateParams): FineTuningJob = create(params, RequestOptions.none()) @@ -57,7 +58,8 @@ interface JobService { /** * 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) */ fun retrieve(fineTuningJobId: String): FineTuningJob = retrieve(fineTuningJobId, JobRetrieveParams.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/checkpoints/PermissionService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/checkpoints/PermissionService.kt index bfb08f161..946a8288b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/checkpoints/PermissionService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/checkpoints/PermissionService.kt @@ -32,7 +32,8 @@ interface PermissionService { fun withOptions(modifier: Consumer): PermissionService /** - * **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. @@ -64,7 +65,8 @@ interface PermissionService { ): PermissionCreatePage /** - * **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. @@ -114,7 +116,8 @@ interface PermissionService { retrieve(fineTunedModelCheckpoint, PermissionRetrieveParams.none(), requestOptions) /** - * **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. @@ -153,7 +156,8 @@ interface PermissionService { list(fineTunedModelCheckpoint, PermissionListParams.none(), requestOptions) /** - * **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/openai-java-core/src/main/kotlin/com/openai/services/blocking/realtime/ClientSecretService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/realtime/ClientSecretService.kt index 552b5f7c2..46cc235c4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/realtime/ClientSecretService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/realtime/ClientSecretService.kt @@ -36,7 +36,7 @@ interface ClientSecretService { * client connection. * * [Learn more about authentication with client secrets over - * WebRTC](https://platform.openai.com/docs/guides/realtime-webrtc). + * 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/openai-java-core/src/main/kotlin/com/openai/services/blocking/uploads/PartService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/uploads/PartService.kt index fdbfd3129..7b9b6a89b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/uploads/PartService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/uploads/PartService.kt @@ -26,8 +26,9 @@ interface PartService { fun withOptions(modifier: Consumer): PartService /** - * 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 + * 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 @@ -35,7 +36,7 @@ interface PartService { * * 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). */ fun create(uploadId: String, params: PartCreateParams): UploadPart = create(uploadId, params, RequestOptions.none()) diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/vectorstores/FileService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/vectorstores/FileService.kt index 30f25b6c4..79a9a8dc6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/vectorstores/FileService.kt +++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/vectorstores/FileService.kt @@ -34,8 +34,8 @@ interface FileService { /** * 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). */ fun create(vectorStoreId: String, params: FileCreateParams): VectorStoreFile = create(vectorStoreId, params, RequestOptions.none()) @@ -128,7 +128,8 @@ interface FileService { /** * 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. + * [delete file](https://developers.openai.com/api/reference/resources/files/methods/delete) + * endpoint. */ fun delete(fileId: String, params: FileDeleteParams): VectorStoreFileDeleted = delete(fileId, params, RequestOptions.none()) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ApiKeyListPageResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ApiKeyListPageResponseTest.kt index cc811ebbe..4195c76a7 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ApiKeyListPageResponseTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ApiKeyListPageResponseTest.kt @@ -43,6 +43,7 @@ internal class ApiKeyListPageResponseTest { ) .ownerProjectAccess(ProjectApiKey.OwnerProjectAccess.ACTIVE) .redactedValue("redacted_value") + .expiresAt(0L) .build() ) .hasMore(true) @@ -81,6 +82,7 @@ internal class ApiKeyListPageResponseTest { ) .ownerProjectAccess(ProjectApiKey.OwnerProjectAccess.ACTIVE) .redactedValue("redacted_value") + .expiresAt(0L) .build() ) assertThat(apiKeyListPageResponse.hasMore()).isEqualTo(true) @@ -123,6 +125,7 @@ internal class ApiKeyListPageResponseTest { ) .ownerProjectAccess(ProjectApiKey.OwnerProjectAccess.ACTIVE) .redactedValue("redacted_value") + .expiresAt(0L) .build() ) .hasMore(true) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKeyTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKeyTest.kt index fde7b6201..5520e5169 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKeyTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/apikeys/ProjectApiKeyTest.kt @@ -41,6 +41,7 @@ internal class ProjectApiKeyTest { ) .ownerProjectAccess(ProjectApiKey.OwnerProjectAccess.ACTIVE) .redactedValue("redacted_value") + .expiresAt(0L) .build() assertThat(projectApiKey.id()).isEqualTo("id") @@ -73,6 +74,7 @@ internal class ProjectApiKeyTest { assertThat(projectApiKey.ownerProjectAccess()) .isEqualTo(ProjectApiKey.OwnerProjectAccess.ACTIVE) assertThat(projectApiKey.redactedValue()).isEqualTo("redacted_value") + assertThat(projectApiKey.expiresAt()).contains(0L) } @Test @@ -108,6 +110,7 @@ internal class ProjectApiKeyTest { ) .ownerProjectAccess(ProjectApiKey.OwnerProjectAccess.ACTIVE) .redactedValue("redacted_value") + .expiresAt(0L) .build() val roundtrippedProjectApiKey = diff --git a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParamsTest.kt index 4bcd050aa..1120ccf4f 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParamsTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateParamsTest.kt @@ -12,7 +12,8 @@ internal class ServiceAccountCreateParamsTest { ServiceAccountCreateParams.builder() .projectId("project_id") .name("name") - .createServiceAccountOnly(true) + .createServiceAccountOnly(false) + .expiresInSeconds(1L) .build() } @@ -32,13 +33,15 @@ internal class ServiceAccountCreateParamsTest { ServiceAccountCreateParams.builder() .projectId("project_id") .name("name") - .createServiceAccountOnly(true) + .createServiceAccountOnly(false) + .expiresInSeconds(1L) .build() val body = params._body() assertThat(body.name()).isEqualTo("name") - assertThat(body.createServiceAccountOnly()).contains(true) + assertThat(body.createServiceAccountOnly()).contains(false) + assertThat(body.expiresInSeconds()).contains(1L) } @Test diff --git a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponseTest.kt index e95460e9e..76af07e74 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponseTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/admin/organization/projects/serviceaccounts/ServiceAccountCreateResponseTest.kt @@ -20,6 +20,7 @@ internal class ServiceAccountCreateResponseTest { .createdAt(0L) .name("name") .value("value") + .expiresAt(0L) .build() ) .createdAt(0L) @@ -35,6 +36,7 @@ internal class ServiceAccountCreateResponseTest { .createdAt(0L) .name("name") .value("value") + .expiresAt(0L) .build() ) assertThat(serviceAccountCreateResponse.createdAt()).isEqualTo(0L) @@ -55,6 +57,7 @@ internal class ServiceAccountCreateResponseTest { .createdAt(0L) .name("name") .value("value") + .expiresAt(0L) .build() ) .createdAt(0L) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseInputItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseInputItemTest.kt index 6d4a05221..e5b489153 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseInputItemTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseInputItemTest.kt @@ -1767,12 +1767,16 @@ internal class BetaResponseInputItemTest { .id("id") .result("result") .status(BetaResponseInputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(BetaResponseInputItem.ImageGenerationCall.Action.GENERATE) .agent( BetaResponseInputItem.ImageGenerationCall.Agent.builder() .agentName("agent_name") .build() ) + .background(BetaResponseInputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(BetaResponseInputItem.ImageGenerationCall.OutputFormat.PNG) .quality(BetaResponseInputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(BetaResponseInputItem.ImageGenerationCall.Size._1024X1024) .build() @@ -1825,12 +1829,16 @@ internal class BetaResponseInputItemTest { .id("id") .result("result") .status(BetaResponseInputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(BetaResponseInputItem.ImageGenerationCall.Action.GENERATE) .agent( BetaResponseInputItem.ImageGenerationCall.Agent.builder() .agentName("agent_name") .build() ) + .background(BetaResponseInputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(BetaResponseInputItem.ImageGenerationCall.OutputFormat.PNG) .quality(BetaResponseInputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(BetaResponseInputItem.ImageGenerationCall.Size._1024X1024) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseItemTest.kt index 5f8e62c8e..d07923856 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseItemTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseItemTest.kt @@ -1807,12 +1807,16 @@ internal class BetaResponseItemTest { .id("id") .result("result") .status(BetaResponseItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(BetaResponseItem.ImageGenerationCall.Action.GENERATE) .agent( BetaResponseItem.ImageGenerationCall.Agent.builder() .agentName("agent_name") .build() ) + .background(BetaResponseItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(BetaResponseItem.ImageGenerationCall.OutputFormat.PNG) .quality(BetaResponseItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(BetaResponseItem.ImageGenerationCall.Size._1024X1024) .build() @@ -1862,12 +1866,16 @@ internal class BetaResponseItemTest { .id("id") .result("result") .status(BetaResponseItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(BetaResponseItem.ImageGenerationCall.Action.GENERATE) .agent( BetaResponseItem.ImageGenerationCall.Agent.builder() .agentName("agent_name") .build() ) + .background(BetaResponseItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(BetaResponseItem.ImageGenerationCall.OutputFormat.PNG) .quality(BetaResponseItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(BetaResponseItem.ImageGenerationCall.Size._1024X1024) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseOutputItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseOutputItemTest.kt index b926d3aff..b283306b2 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseOutputItemTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseOutputItemTest.kt @@ -1613,12 +1613,16 @@ internal class BetaResponseOutputItemTest { .id("id") .result("result") .status(BetaResponseOutputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(BetaResponseOutputItem.ImageGenerationCall.Action.GENERATE) .agent( BetaResponseOutputItem.ImageGenerationCall.Agent.builder() .agentName("agent_name") .build() ) + .background(BetaResponseOutputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(BetaResponseOutputItem.ImageGenerationCall.OutputFormat.PNG) .quality(BetaResponseOutputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(BetaResponseOutputItem.ImageGenerationCall.Size._1024X1024) .build() @@ -1667,12 +1671,16 @@ internal class BetaResponseOutputItemTest { .id("id") .result("result") .status(BetaResponseOutputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(BetaResponseOutputItem.ImageGenerationCall.Action.GENERATE) .agent( BetaResponseOutputItem.ImageGenerationCall.Agent.builder() .agentName("agent_name") .build() ) + .background(BetaResponseOutputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(BetaResponseOutputItem.ImageGenerationCall.OutputFormat.PNG) .quality(BetaResponseOutputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(BetaResponseOutputItem.ImageGenerationCall.Size._1024X1024) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt index 294c8ab76..3bcacad2f 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt @@ -449,7 +449,11 @@ internal class ConversationItemTest { .id("id") .result("result") .status(ConversationItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ConversationItem.ImageGenerationCall.Action.GENERATE) + .background(ConversationItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ConversationItem.ImageGenerationCall.OutputFormat.PNG) .quality(ConversationItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ConversationItem.ImageGenerationCall.Size._1024X1024) .build() @@ -495,7 +499,11 @@ internal class ConversationItemTest { .id("id") .result("result") .status(ConversationItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ConversationItem.ImageGenerationCall.Action.GENERATE) + .background(ConversationItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ConversationItem.ImageGenerationCall.OutputFormat.PNG) .quality(ConversationItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ConversationItem.ImageGenerationCall.Size._1024X1024) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt index d88a5184c..cd9f575e9 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt @@ -1325,7 +1325,11 @@ internal class ResponseInputItemTest { .id("id") .result("result") .status(ResponseInputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ResponseInputItem.ImageGenerationCall.Action.GENERATE) + .background(ResponseInputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ResponseInputItem.ImageGenerationCall.OutputFormat.PNG) .quality(ResponseInputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ResponseInputItem.ImageGenerationCall.Size._1024X1024) .build() @@ -1375,7 +1379,11 @@ internal class ResponseInputItemTest { .id("id") .result("result") .status(ResponseInputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ResponseInputItem.ImageGenerationCall.Action.GENERATE) + .background(ResponseInputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ResponseInputItem.ImageGenerationCall.OutputFormat.PNG) .quality(ResponseInputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ResponseInputItem.ImageGenerationCall.Size._1024X1024) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt index 58a8e3c16..91b8d1b5d 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt @@ -1360,7 +1360,11 @@ internal class ResponseItemTest { .id("id") .result("result") .status(ResponseItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ResponseItem.ImageGenerationCall.Action.GENERATE) + .background(ResponseItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ResponseItem.ImageGenerationCall.OutputFormat.PNG) .quality(ResponseItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ResponseItem.ImageGenerationCall.Size._1024X1024) .build() @@ -1407,7 +1411,11 @@ internal class ResponseItemTest { .id("id") .result("result") .status(ResponseItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ResponseItem.ImageGenerationCall.Action.GENERATE) + .background(ResponseItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ResponseItem.ImageGenerationCall.OutputFormat.PNG) .quality(ResponseItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ResponseItem.ImageGenerationCall.Size._1024X1024) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt index 49d70529e..06053de6b 100644 --- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt @@ -1179,7 +1179,11 @@ internal class ResponseOutputItemTest { .id("id") .result("result") .status(ResponseOutputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ResponseOutputItem.ImageGenerationCall.Action.GENERATE) + .background(ResponseOutputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ResponseOutputItem.ImageGenerationCall.OutputFormat.PNG) .quality(ResponseOutputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ResponseOutputItem.ImageGenerationCall.Size._1024X1024) .build() @@ -1224,7 +1228,11 @@ internal class ResponseOutputItemTest { .id("id") .result("result") .status(ResponseOutputItem.ImageGenerationCall.Status.IN_PROGRESS) + .action(ResponseOutputItem.ImageGenerationCall.Action.GENERATE) + .background(ResponseOutputItem.ImageGenerationCall.Background.TRANSPARENT) + .outputFormat(ResponseOutputItem.ImageGenerationCall.OutputFormat.PNG) .quality(ResponseOutputItem.ImageGenerationCall.Quality.LOW) + .revisedPrompt("revised_prompt") .size(ResponseOutputItem.ImageGenerationCall.Size._1024X1024) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncTest.kt index 7c369c236..f9c58f3db 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/async/admin/organization/projects/ServiceAccountServiceAsyncTest.kt @@ -29,7 +29,8 @@ internal class ServiceAccountServiceAsyncTest { ServiceAccountCreateParams.builder() .projectId("project_id") .name("name") - .createServiceAccountOnly(true) + .createServiceAccountOnly(false) + .expiresInSeconds(1L) .build() ) diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/admin/organization/projects/ServiceAccountServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/admin/organization/projects/ServiceAccountServiceTest.kt index 41194f747..1c1a6a016 100644 --- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/admin/organization/projects/ServiceAccountServiceTest.kt +++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/admin/organization/projects/ServiceAccountServiceTest.kt @@ -29,7 +29,8 @@ internal class ServiceAccountServiceTest { ServiceAccountCreateParams.builder() .projectId("project_id") .name("name") - .createServiceAccountOnly(true) + .createServiceAccountOnly(false) + .expiresInSeconds(1L) .build() )