diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/azureopenai.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/azureopenai.json new file mode 100644 index 000000000000..2a0110cf54ac --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/azureopenai.json @@ -0,0 +1,3968 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure OpenAI API version 2024-12-01-preview", + "description": "APIs for fine-tuning and managing deployments of OpenAI models.", + "version": "2024-12-01-preview" + }, + "paths": { + "/batches": { + "get": { + "tags": [ + "Batch:" + ], + "summary": "Gets a list of all batches owned by the Azure OpenAI resource.", + "operationId": "Batch_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "after", + "description": "Identifier for the last event from the previous pagination request.", + "type": "string" + }, + { + "in": "query", + "name": "limit", + "description": "Number of batches to retrieve. Defaults to 20.", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "in": "query", + "name": "$filter", + "description": "The OData expression to describe the filtering conditions.", + "type": "string" + }, + { + "in": "query", + "name": "$orderby", + "description": "The OData expression to describe the sorting order.", + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/BatchesList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting all batches owned by this account.": { + "$ref": "./examples/get_batches.json" + } + } + }, + "post": { + "tags": [ + "Batch:" + ], + "summary": "Creates and executes a batch from an uploaded file of requests.\r\nResponse includes details of the enqueued job including job status.\r\nThe ID of the result file is added to the response once complete.", + "operationId": "Batch_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "body", + "name": "createBatchRequest", + "description": "The specification of the batch to create and execute.", + "required": true, + "schema": { + "$ref": "#/definitions/BatchCreateRequest" + } + } + ], + "responses": { + "201": { + "description": "The batch has been successfully created.", + "schema": { + "$ref": "#/definitions/Batch" + }, + "headers": { + "deployment-enqueued-tokens": { + "description": "Sum of enqueued tokens of all jobs that target to the deployment.", + "type": "integer", + "format": "int64" + }, + "deployment-maximum-enqueued-tokens": { + "description": "Maximum enqueued tokens of the deployment.", + "type": "integer", + "format": "int64" + } + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Creating a batch.": { + "$ref": "./examples/post_batch.json" + } + } + } + }, + "/batches/{batch-id}": { + "get": { + "tags": [ + "Batch:" + ], + "summary": "Gets details for a single batch specified by the given batch-id.", + "operationId": "Batch_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "batch-id", + "description": "The identifier of the batch.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Batch" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting a batch.": { + "$ref": "./examples/get_batch.json" + } + } + } + }, + "/batches/{batch-id}/cancel": { + "post": { + "tags": [ + "Batch:" + ], + "summary": "Cancels the processing of the batch specified by the given batch-id.", + "operationId": "Batch_Cancel", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "batch-id", + "description": "The identifier of the batch.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "The batch has been successfully canceled.", + "schema": { + "$ref": "#/definitions/Batch" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Canceling a batch.": { + "$ref": "./examples/cancel_batch.json" + } + } + } + }, + "/files": { + "get": { + "tags": [ + "Files:" + ], + "summary": "Gets a list of all files owned by the Azure OpenAI resource.\r\nThese include user uploaded content like files with purpose \"fine-tune\" for training or validation of fine-tunes models\r\nas well as files that are generated by the service such as \"fine-tune-results\" which contains various metrics for the corresponding fine-tune job.", + "operationId": "Files_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "purpose", + "description": "Only return files with the given purpose.", + "type": "string", + "enum": [ + "fine-tune", + "fine-tune-results", + "assistants", + "assistants_output", + "batch", + "batch_output" + ], + "x-ms-enum": { + "name": "Purpose", + "modelAsString": true, + "values": [ + { + "value": "fine-tune", + "description": "This file contains training data for a fine tune job." + }, + { + "value": "fine-tune-results", + "description": "This file contains the results of a fine tune job." + }, + { + "value": "assistants", + "description": "This file contains data to be used in assistants." + }, + { + "value": "assistants_output", + "description": "This file contains the results of an assistant." + }, + { + "value": "batch", + "description": "This file contains the input data for a batch." + }, + { + "value": "batch_output", + "description": "This file contains the results of a batch." + } + ] + } + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FileList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting all files owned by this account.": { + "$ref": "./examples/get_files.json" + } + } + }, + "post": { + "tags": [ + "Files:" + ], + "summary": "Creates a new file entity by uploading data from a local machine. Uploaded files can, for example, be used for training or evaluating fine-tuned models.", + "operationId": "Files_Upload", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "formData", + "name": "purpose", + "description": "The intended purpose of the uploaded documents. Use \"fine-tune\" for fine-tuning. This allows us to validate the format of the uploaded file.", + "required": true, + "type": "string", + "enum": [ + "fine-tune", + "fine-tune-results", + "assistants", + "assistants_output", + "batch" + ], + "x-ms-enum": { + "name": "Purpose", + "modelAsString": true, + "values": [ + { + "value": "fine-tune", + "description": "This file contains training data for a fine tune job." + }, + { + "value": "fine-tune-results", + "description": "This file contains the results of a fine tune job." + }, + { + "value": "assistants", + "description": "This file contains data to be used in assistants." + }, + { + "value": "assistants_output", + "description": "This file contains the results of an assistant." + }, + { + "value": "batch", + "description": "This file contains the input data for a batch." + } + ] + } + }, + { + "in": "formData", + "name": "file", + "description": "Gets or sets the file to upload into Azure OpenAI.", + "required": true, + "type": "file" + } + ], + "responses": { + "201": { + "description": "The file has been successfully created.", + "schema": { + "$ref": "#/definitions/File" + }, + "headers": { + "Location": { + "description": "The location of the newly created item.", + "type": "string", + "format": "url" + } + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Upload a file.": { + "$ref": "./examples/upload_file.json" + } + } + } + }, + "/files/import": { + "post": { + "tags": [ + "Files:" + ], + "summary": "Creates a new file entity by importing data from a provided url. Uploaded files can, for example, be used for training or evaluating fine-tuned models.", + "operationId": "Files_Import", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "body", + "name": "fileImport", + "description": "The definition of the file to create including its purpose, the file name and the url of the file location.", + "required": true, + "schema": { + "$ref": "#/definitions/FileImport" + } + } + ], + "responses": { + "201": { + "description": "The file has been successfully created.", + "schema": { + "$ref": "#/definitions/File" + }, + "headers": { + "Location": { + "description": "The location of the newly created item.", + "type": "string", + "format": "url" + } + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Importing a file with a blob url as source.": { + "$ref": "./examples/import_file.json" + } + } + } + }, + "/files/{file-id}": { + "get": { + "tags": [ + "Files:" + ], + "summary": "Gets details for a single file specified by the given file-id including status, size, purpose, etc.", + "operationId": "Files_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "file-id", + "description": "The identifier of the file.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/File" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting a file.": { + "$ref": "./examples/get_file.json" + } + } + }, + "delete": { + "tags": [ + "Files:" + ], + "summary": "Deletes the file with the given file-id.\r\nDeletion is also allowed if a file was used, e.g., as training file in a fine-tune job.", + "operationId": "Files_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "file-id", + "description": "The identifier of the file.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "The file was successfully deleted.", + "schema": { + "$ref": "#/definitions/FileDelete" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deleting a file.": { + "$ref": "./examples/delete_file.json" + } + } + } + }, + "/files/{file-id}/content": { + "get": { + "tags": [ + "Files:" + ], + "summary": "Gets the content of the file specified by the given file-id.\r\nFiles can be user uploaded content or generated by the service like result metrics of a fine-tune job.", + "operationId": "Files_GetContent", + "produces": [ + "application/octet-stream", + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "file-id", + "description": "The identifier of the file.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "type": "file" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting the file content.": { + "$ref": "./examples/get_file_content.json" + } + } + } + }, + "/fine_tuning/jobs": { + "get": { + "tags": [ + "Fine-tuning:" + ], + "summary": "Gets a list of all fine-tune jobs owned by the Azure OpenAI resource.\r\nThe details that are returned for each fine-tune job contain besides its identifier\r\nthe base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded.", + "operationId": "FineTuning_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "query", + "name": "after", + "description": "Identifier for the last event from the previous pagination request.", + "type": "string" + }, + { + "in": "query", + "name": "limit", + "description": "Number of events to retrieve. Defaults to 20.", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FineTuningJobList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting all fine tuning jobs owned by this account.": { + "$ref": "./examples/get_finetuning_jobs.json" + } + } + }, + "post": { + "tags": [ + "Fine-tuning:" + ], + "summary": "Creates a job that fine-tunes a specified model from a given training file.\r\nResponse includes details of the enqueued job including job status and hyper parameters.\r\nThe name of the fine-tuned model is added to the response once complete.", + "operationId": "FineTuning_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "body", + "name": "fineTuningJob", + "description": "The specification of the fine-tuned model to create.\r\nRequired parameters are the base model and the training file to use.\r\nOptionally a validation file can be specified to compute validation metrics during training.\r\nHyper parameters will be set to default values or can be optionally specified.\r\nThese include batch size, learning rate multiplier, number of epochs and others.", + "required": true, + "schema": { + "$ref": "#/definitions/FineTuningJobCreation" + } + } + ], + "responses": { + "201": { + "description": "The fine tune has been successfully created.", + "schema": { + "$ref": "#/definitions/FineTuningJob" + }, + "headers": { + "Location": { + "description": "The location of the newly created item.", + "type": "string", + "format": "url" + } + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Creating a fine tuning job.": { + "$ref": "./examples/post_finetuning_job.json" + } + } + } + }, + "/fine_tuning/jobs/{fine-tuning-job-id}": { + "get": { + "tags": [ + "Fine-tuning:" + ], + "summary": "Gets details for a single fine-tune job specified by the given fine-tune-id.\r\nThe details contain the base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded.", + "operationId": "FineTuning_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "fine-tuning-job-id", + "description": "The identifier of the fine-tune job.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FineTuningJob" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting a fine tuning job.": { + "$ref": "./examples/get_finetuning_job.json" + } + } + }, + "delete": { + "tags": [ + "Fine-tuning:" + ], + "summary": "Deletes the fine-tune job specified by the given fine-tune-id.", + "operationId": "FineTuning_Delete", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "fine-tuning-job-id", + "description": "The identifier of the fine-tune job.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "204": { + "description": "The fine tune was successfully deleted." + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Deleting a fine tuning job.": { + "$ref": "./examples/delete_finetuning_job.json" + } + } + } + }, + "/fine_tuning/jobs/{fine-tuning-job-id}/cancel": { + "post": { + "tags": [ + "Fine-tuning:" + ], + "summary": "Cancels the processing of the fine-tune job specified by the given fine-tune-id.", + "operationId": "FineTuning_Cancel", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "fine-tuning-job-id", + "description": "The identifier of the fine-tune job.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "The fine tune has been successfully canceled", + "schema": { + "$ref": "#/definitions/FineTuningJob" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Canceling a fine tuning job.": { + "$ref": "./examples/cancel_finetuning_job.json" + } + } + } + }, + "/fine_tuning/jobs/{fine-tuning-job-id}/checkpoints": { + "get": { + "tags": [ + "Fine-tuning:" + ], + "summary": "Gets the checkpoints for the fine-tune job specified by the given fine-tune-id.\r\nCheckpoints are created at the end of successful epochs during training.", + "operationId": "FineTuning_GetCheckpoints", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "fine-tuning-job-id", + "description": "The identifier of the fine-tune job.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "after", + "description": "Identifier for the last checkpoint ID from the previous pagination request.", + "type": "string" + }, + { + "in": "query", + "name": "limit", + "description": "Number of checkpoints to retrieve. Defaults to 10.", + "type": "integer", + "format": "int32", + "default": 10 + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FineTuningJobCheckpointList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting checkpoints of a fine tuning job.": { + "$ref": "./examples/get_finetuning_job_checkpoints.json" + } + } + } + }, + "/fine_tuning/jobs/{fine-tuning-job-id}/events": { + "get": { + "tags": [ + "Fine-tuning:" + ], + "summary": "Gets the events for the fine-tune job specified by the given fine-tune-id.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded.", + "operationId": "FineTuning_GetEvents", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "fine-tuning-job-id", + "description": "The identifier of the fine-tune job.", + "required": true, + "type": "string" + }, + { + "in": "query", + "name": "after", + "description": "Identifier for the last event from the previous pagination request.", + "type": "string" + }, + { + "in": "query", + "name": "limit", + "description": "Number of events to retrieve. Defaults to 20.", + "type": "integer", + "format": "int32", + "default": 20 + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/FineTuningJobEventList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting events of a fine tuning job.": { + "$ref": "./examples/get_finetuning_job_events.json" + } + } + } + }, + "/ingestion/jobs": { + "get": { + "tags": [ + "Ingestion:" + ], + "summary": "Lists the ingestion jobs.", + "operationId": "IngestionJobs_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "header", + "name": "mgmt-user-token", + "type": "string", + "description": "The token used to access the workspace (needed only for user compute jobs)." + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IngestionJobList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List all ingestion jobs": { + "$ref": "./examples/list_ingestion_jobs.json" + } + } + } + }, + "/ingestion/jobs/{job-id}": { + "put": { + "tags": [ + "Ingestion:" + ], + "summary": "Creates an ingestion job with the specified job id.", + "operationId": "IngestionJobs_Create", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "path", + "name": "job-id", + "required": true, + "type": "string", + "description": "The id of the job that will be created." + }, + { + "in": "header", + "name": "mgmt-user-token", + "type": "string", + "description": "The token used to access the workspace (needed only for user compute jobs)." + }, + { + "in": "header", + "name": "aml-user-token", + "type": "string", + "description": "The token used to access the resources within the job in the workspace (needed only for user compute jobs)." + }, + { + "in": "body", + "name": "ingestionJob", + "schema": { + "$ref": "#/definitions/IngestionJob" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IngestionJob" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create a system-compute ingestion job": { + "$ref": "./examples/put_ingestion_job_sc.json" + }, + "Create a user-compute ingestion job": { + "$ref": "./examples/put_ingestion_job_uc.json" + } + } + }, + "get": { + "tags": [ + "Ingestion:" + ], + "summary": "Gets the details of the specified job id.", + "operationId": "IngestionJobs_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "path", + "name": "job-id", + "required": true, + "description": "The id of the job.", + "type": "string" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IngestionJob" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get ingestion job": { + "$ref": "./examples/get_ingestion_job.json" + } + } + } + }, + "/ingestion/jobs/{job-id}/runs": { + "get": { + "tags": [ + "Ingestion:" + ], + "summary": "Lists the runs of the specified job id.", + "operationId": "IngestionJobRuns_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "path", + "name": "job-id", + "required": true, + "description": "The id of the job.", + "type": "string" + }, + { + "in": "header", + "name": "mgmt-user-token", + "type": "string", + "description": "The token used to access the workspace (needed only for user compute jobs)." + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IngestionJobRunList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "List ingestion job runs": { + "$ref": "./examples/list_ingestion_job_runs.json" + } + } + } + }, + "/ingestion/jobs/{job-id}/runs/{run-id}": { + "get": { + "tags": [ + "Ingestion:" + ], + "summary": "Gets the details of the specified run id as part of the specified job id.", + "operationId": "IngestionJobRuns_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "path", + "name": "job-id", + "required": true, + "description": "The id of the job.", + "type": "string" + }, + { + "in": "path", + "name": "run-id", + "required": true, + "description": "The id of the run.", + "type": "string" + }, + { + "in": "header", + "name": "mgmt-user-token", + "type": "string", + "description": "The token used to access the workspace (needed only for user compute jobs)." + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/IngestionJobRun" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get ingestion job runs": { + "$ref": "./examples/get_ingestion_job_run.json" + } + } + } + }, + "/models": { + "get": { + "tags": [ + "Models:" + ], + "summary": "Gets a list of all models that are accessible by the Azure OpenAI resource.\r\nThese include base models as well as all successfully completed fine-tuned models owned by the Azure OpenAI resource.", + "operationId": "Models_List", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/ModelList" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting all models owned by account.": { + "$ref": "./examples/get_models.json" + } + } + } + }, + "/models/{model-id}": { + "get": { + "tags": [ + "Models:" + ], + "summary": "Gets details for the model specified by the given modelId.", + "operationId": "Models_Get", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "model-id", + "description": "The identifier of the model.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Model" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Getting a base model.": { + "$ref": "./examples/get_model_base.json" + }, + "Getting a fine-tuned model.": { + "$ref": "./examples/get_model_finetune.json" + } + } + } + }, + "/uploads": { + "post": { + "tags": [ + "UploadFile:" + ], + "summary": "An intermediate Upload object is created, allowing you to add Parts to it. Currently, an Upload size can be a maximum of 9 GB in total and will expire two hours after being created.\r\nAfter the Upload is completed a File object will be generated, containing all the uploaded parts. This File object can then be used across our platform just like any other file.", + "operationId": "UploadFile_Start", + "consumes": [ + "application/json", + "text/json", + "application/*+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "body", + "name": "requestBody", + "description": "The definition of the file to create including its purpose and the location on the local machine.", + "required": true, + "schema": { + "$ref": "#/definitions/UploadFileStartBody" + } + } + ], + "responses": { + "200": { + "description": "The upload has been successfully created.", + "schema": { + "$ref": "#/definitions/UploadResource" + }, + "headers": { + "Location": { + "description": "The location of the newly created item.", + "type": "string", + "format": "url" + } + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Start a large file upload operation.": { + "$ref": "./examples/upload_file_start.json" + } + } + } + }, + "/uploads/{upload-id}/cancel": { + "post": { + "tags": [ + "UploadFile:" + ], + "summary": "Cancels the Upload, and will lead to all uploaded parts to be deleted asynchronously.\r\nNo Parts may be added after an Upload is cancelled.", + "operationId": "UploadFile_Cancel", + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "upload-id", + "description": "The identifier of the upload.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/UploadResource" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Cancel a large file upload operation.": { + "$ref": "./examples/upload_file_cancel.json" + } + } + } + }, + "/uploads/{upload-id}/complete": { + "post": { + "tags": [ + "UploadFile:" + ], + "summary": "This completes the Upload, and the returned Upload object contains a nested File object that is ready for use across the platform.\r\nYou can define the order of the Parts by providing an ordered list of Part IDs.\r\nThe total number of bytes uploaded must match the size originally specified when creating the Upload object.\r\nAfter this operation no additional Parts can be added once the Upload is completed.", + "operationId": "UploadFile_Complete", + "consumes": [ + "application/json", + "text/json", + "application/*+json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "upload-id", + "description": "The identifier of the upload.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "body", + "name": "requestBody", + "description": "The definition of the file to create including its purpose and the location on the local machine.", + "required": true, + "schema": { + "$ref": "#/definitions/UploadFileCompleteBody" + } + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/UploadResource" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Complete and validate a large file upload operation.": { + "$ref": "./examples/upload_file_complete.json" + } + } + } + }, + "/uploads/{upload-id}/parts": { + "post": { + "tags": [ + "UploadFile:" + ], + "summary": "Adds a Part to an Upload object, where each Part represents a segment of the file you are uploading.\r\nEach Part can be up to the standard size limit for file upload, based on the File Purpose. You can continue adding Parts until reaching the Upload size limit of 9 GB.", + "operationId": "UploadFile_Part", + "consumes": [ + "multipart/form-data" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "path", + "name": "upload-id", + "description": "The identifier of the upload.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/apiVersionQueryParameter" + }, + { + "in": "formData", + "name": "data", + "required": true, + "type": "file" + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/UploadPartResource" + } + }, + "default": { + "description": "An error occurred.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Upload a part of large file upload operation.": { + "$ref": "./examples/upload_file_part.json" + } + } + } + } + }, + "definitions": { + "AzureAISearchIndex": { + "description": "Azure AI Search Index.", + "required": [ + "connectionId" + ], + "allOf": [ + { + "$ref": "#/definitions/TargetIndex" + }, + { + "type": "object", + "properties": { + "connectionId": { + "type": "string", + "description": "The id of the connection pointing to the Azure AI Search Index." + } + } + } + ], + "x-ms-discriminator-value": "AzureAISearch" + }, + "BaseConnection": { + "title": "BaseConnection", + "description": "A connection to a resource.", + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "$ref": "#/definitions/ConnectionType" + } + }, + "discriminator": "kind" + }, + "Batch": { + "title": "Batch", + "description": "Defines the values of a batch.", + "required": [ + "id", + "input_file_id" + ], + "type": "object", + "properties": { + "id": { + "description": "The identity of this item.", + "type": "string" + }, + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "endpoint": { + "description": "The API endpoint used by the batch.", + "type": "string", + "readOnly": true + }, + "errors": { + "$ref": "#/definitions/BatchErrors" + }, + "input_file_id": { + "description": "The ID of the input file for the batch.", + "minLength": 1, + "type": "string" + }, + "completion_window": { + "description": "The time frame within which the batch should be processed.", + "type": "string" + }, + "status": { + "$ref": "#/definitions/BatchStatus" + }, + "output_file_id": { + "description": "The ID of the file containing outputs of successfully executed requests.", + "type": "string" + }, + "error_file_id": { + "description": "The ID of the file containing outputs of requests with errors.", + "type": "string" + }, + "created_at": { + "format": "unixtime", + "description": "A timestamp when this batch was created (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "in_progress_at": { + "format": "unixtime", + "description": "A timestamp when this batch started progressing (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "expires_at": { + "format": "unixtime", + "description": "A timestamp when this batch will expire (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "finalizing_at": { + "format": "unixtime", + "description": "A timestamp when this batch started finalizing (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "completed_at": { + "format": "unixtime", + "description": "A timestamp when this batch was completed (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "failed_at": { + "format": "unixtime", + "description": "A timestamp when this batch failed (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "expired_at": { + "format": "unixtime", + "description": "A timestamp when this batch expired (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "cancelling_at": { + "format": "unixtime", + "description": "A timestamp when this batch started cancelling (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "cancelled_at": { + "format": "unixtime", + "description": "A timestamp when this batch was cancelled (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "request_counts": { + "$ref": "#/definitions/BatchRequestCounts" + }, + "metadata": { + "description": "A set of key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "BatchCreateRequest": { + "title": "BatchCreateRequest", + "description": "Defines the request to create a batch.", + "required": [ + "input_file_id", + "endpoint", + "completion_window" + ], + "type": "object", + "properties": { + "input_file_id": { + "description": "The ID if the input file for the batch.", + "minLength": 1, + "type": "string" + }, + "endpoint": { + "description": "The API endpoint used by the batch.", + "type": "string" + }, + "completion_window": { + "description": "The time frame within which the batch should be processed.", + "type": "string" + }, + "metadata": { + "description": "A set of key-value pairs that can be attached to the batch. This can be useful for storing additional information about the batch in a structured format.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + } + }, + "BatchErrorData": { + "title": "BatchErrorData", + "description": "Error information for a failure in batch.", + "type": "object", + "properties": { + "code": { + "description": "An error code identifying the error type.", + "type": "string" + }, + "message": { + "description": "A human-readable message providing more details about the error.", + "type": "string" + }, + "param": { + "description": "The name of the parameter that caused the error, if applicable (can be null).", + "type": "string" + }, + "line": { + "description": "The line number of the input file where the error occurred, if applicable (can be null).", + "type": "string" + } + } + }, + "BatchErrors": { + "title": "BatchErrors", + "description": "For batches that have failed, this will contain more information on the cause of the failures.", + "type": "object", + "properties": { + "object": { + "description": "The type of the errors object. This is always 'list'.", + "type": "string" + }, + "data": { + "$ref": "#/definitions/BatchErrorData" + } + } + }, + "BatchRequestCounts": { + "title": "BatchRequestCounts", + "description": "The request counts for different statuses within the batch.", + "type": "object", + "properties": { + "total": { + "description": "The total number of requests in the batch.", + "type": "integer" + }, + "completed": { + "description": "The number of requests in the batch that have been completed successfully.", + "type": "integer" + }, + "failed": { + "description": "The number of requests in the batch that have failed.", + "type": "integer" + } + } + }, + "BatchStatus": { + "title": "BatchStatus", + "description": "The status of a batch.", + "enum": [ + "validating", + "failed", + "in_progress", + "finalizing", + "completed", + "expired", + "cancelling", + "cancelled" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "BatchStatus", + "modelAsString": true, + "values": [ + { + "value": "validating", + "description": "The input file is being validated before the batch can begin." + }, + { + "value": "failed", + "description": "The input file has failed the validation process." + }, + { + "value": "in_progress", + "description": "The input file was successfully validated and the batch is currently being executed." + }, + { + "value": "finalizing", + "description": "The batch has completed and the results are being prepared." + }, + { + "value": "completed", + "description": "The batch has been completed and the results are ready." + }, + { + "value": "expired", + "description": "The batch was not able to complete within the 24-hour time window." + }, + { + "value": "cancelling", + "description": "Cancellation of the batch has been initiated." + }, + { + "value": "cancelled", + "description": "The batch was cancelled." + } + ] + } + }, + "BatchesList": { + "title": "BatchList", + "description": "Represents a list of batches.", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "data": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/Batch" + } + }, + "first_id": { + "description": "The id of the first batch in the list of batches returned.", + "type": "string" + }, + "last_id": { + "description": "The id of the last batch in the list of batches returned.", + "type": "string" + }, + "has_more": { + "description": "A value indicating whether the list contains more elements than returned.", + "type": "boolean" + } + } + }, + "Capabilities": { + "title": "Capabilities", + "description": "The capabilities of a base or fine tune model.", + "required": [ + "chat_completion", + "completion", + "embeddings", + "fine_tune", + "inference" + ], + "type": "object", + "properties": { + "fine_tune": { + "description": "A value indicating whether a model can be used for fine tuning.", + "type": "boolean" + }, + "inference": { + "description": "A value indicating whether a model can be deployed.", + "type": "boolean" + }, + "completion": { + "description": "A value indicating whether a model supports completion.", + "type": "boolean" + }, + "chat_completion": { + "description": "A value indicating whether a model supports chat completion.", + "type": "boolean" + }, + "embeddings": { + "description": "A value indicating whether a model supports embeddings.", + "type": "boolean" + } + } + }, + "ChunkingSettings": { + "type": "object", + "title": "ChunkingSettings", + "description": "Chunking settings", + "properties": { + "maxChunkSizeInTokens": { + "type": "integer" + } + } + }, + "CompletionAction": { + "type": "string", + "description": "The completion action.", + "enum": [ + "cleanUpTempAssets", + "keepAllAssets" + ], + "x-ms-enum": { + "name": "IngestionJobCompletionAction", + "modelAsString": true, + "values": [ + { + "name": "keepAllAssets", + "value": "keepAllAssets", + "description": "Will not clean up any of the intermediate assets created during the ingestion process." + }, + { + "name": "cleanUpTempAssets", + "value": "cleanUpTempAssets", + "description": "Will clean up intermediate assets created during the ingestion process." + } + ] + } + }, + "ComputeType": { + "type": "string", + "description": "The compute type.", + "enum": [ + "ServerlessCompute", + "CustomCompute" + ], + "x-ms-enum": { + "name": "ComputeType", + "modelAsString": true, + "values": [ + { + "name": "ServerlessCompute", + "value": "ServerlessCompute", + "description": "Serverless user compute." + }, + { + "name": "CustomCompute", + "value": "CustomCompute", + "description": "Custom user compute." + } + ] + } + }, + "ConnectionStringConnection": { + "description": "Connection string connection.", + "required": [ + "connectionString" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseConnection" + }, + { + "type": "object", + "properties": { + "connectionString": { + "type": "string", + "description": "Connection string" + } + } + } + ], + "x-ms-discriminator-value": "ConnectionString" + }, + "ConnectionType": { + "type": "string", + "description": "The connection type.", + "enum": [ + "EndpointWithKey", + "ConnectionString", + "EndpointWithManagedIdentity", + "WorkspaceConnection", + "RelativeConnection" + ], + "x-ms-enum": { + "name": "ConnectionType", + "modelAsString": true, + "values": [ + { + "name": "EndpointWithKey", + "value": "EndpointWithKey", + "description": "Endpoint and key connection." + }, + { + "name": "ConnectionString", + "value": "ConnectionString", + "description": "Connection string." + }, + { + "name": "EndpointWithManagedIdentity", + "value": "EndpointWithManagedIdentity", + "description": "Endpoint and managed identity." + }, + { + "name": "WorkspaceConnection", + "value": "WorkspaceConnection", + "description": "AML Workspace connection." + }, + { + "name": "RelativeConnection", + "value": "RelativeConnection", + "description": "Relative deployment" + } + ] + } + }, + "CosmosDBIndex": { + "description": "CosmosDB Index.", + "required": [ + "connectionId" + ], + "allOf": [ + { + "$ref": "#/definitions/TargetIndex" + }, + { + "type": "object", + "properties": { + "connectionId": { + "type": "string", + "description": "The id of the connection pointing to the cosmos DB." + }, + "collectionName": { + "type": "string", + "description": "The name of the cosmos DB collection." + }, + "databaseName": { + "type": "string", + "description": "The name of the cosmos DB database." + } + } + } + ], + "x-ms-discriminator-value": "CosmosDB" + }, + "CrawlingSettings": { + "type": "object", + "title": "CrawlingSettings", + "description": "Crawling settings", + "properties": { + "maxCrawlDepth": { + "type": "integer" + }, + "maxCrawlTimeInMins": { + "type": "integer" + }, + "maxDownloadTimeInMins": { + "type": "integer" + }, + "maxFileSize": { + "type": "integer" + }, + "maxRedirects": { + "type": "integer" + }, + "maxFiles": { + "type": "integer" + } + } + }, + "CustomCompute": { + "description": "Custom compute.", + "required": [ + "computeId" + ], + "allOf": [ + { + "$ref": "#/definitions/JobCompute" + }, + { + "type": "object", + "properties": { + "computeId": { + "type": "string", + "description": "Id of the custom compute" + } + } + } + ], + "x-ms-discriminator-value": "CustomCompute" + }, + "DeploymentConnection": { + "description": "Relative deployment connection.", + "allOf": [ + { + "$ref": "#/definitions/BaseConnection" + } + ], + "x-ms-discriminator-value": "RelativeConnection" + }, + "Deprecation": { + "title": "Deprecation", + "description": "Defines the dates of deprecation for the different use cases of a model.\r\nUsually base models support 1 year of fine tuning after creation. Inference is typically supported 2 years after creation of base or\r\nfine tuned models. The exact dates are specified in the properties.", + "required": [ + "inference" + ], + "type": "object", + "properties": { + "fine_tune": { + "format": "unixtime", + "description": "The end date of fine tune support of this model. Will be `null` for fine tune models.", + "type": "integer" + }, + "inference": { + "format": "unixtime", + "description": "The end date of inference support of this model.", + "type": "integer" + } + } + }, + "EndpointKeyConnection": { + "description": "Endpoint key connection.", + "required": [ + "endpoint", + "key" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseConnection" + }, + { + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "description": "Endpoint" + }, + "key": { + "type": "string", + "description": "Key" + } + } + } + ], + "x-ms-discriminator-value": "EndpointWithKey" + }, + "EndpointMIConnection": { + "description": "Endpoint Managed Identity connection.", + "required": [ + "endpoint" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseConnection" + }, + { + "type": "object", + "properties": { + "endpoint": { + "type": "string", + "description": "Endpoint" + }, + "resourceId": { + "type": "string", + "description": "Resource Id" + } + } + } + ], + "x-ms-discriminator-value": "EndpointWithManagedIdentity" + }, + "Error": { + "title": "Error", + "description": "Error content as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).", + "required": [ + "code", + "message" + ], + "type": "object", + "properties": { + "code": { + "$ref": "#/definitions/ErrorCode" + }, + "message": { + "description": "The message of this error.", + "minLength": 1, + "type": "string" + }, + "target": { + "description": "The location where the error happened if available.", + "type": "string" + }, + "details": { + "description": "The error details if available.", + "type": "array", + "items": { + "$ref": "#/definitions/Error" + } + }, + "innererror": { + "$ref": "#/definitions/InnerError" + } + } + }, + "ErrorCode": { + "title": "ErrorCode", + "description": "Error codes as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).", + "enum": [ + "conflict", + "invalidPayload", + "forbidden", + "notFound", + "unexpectedEntityState", + "itemDoesAlreadyExist", + "serviceUnavailable", + "internalFailure", + "quotaExceeded", + "jsonlValidationFailed", + "fileImportFailed", + "tooManyRequests", + "unauthorized", + "contentFilter" + ], + "type": "string", + "x-ms-enum": { + "name": "ErrorCode", + "modelAsString": true, + "values": [ + { + "value": "conflict", + "description": "The requested operation conflicts with the current resource state." + }, + { + "value": "invalidPayload", + "description": "The request data is invalid for this operation." + }, + { + "value": "forbidden", + "description": "The operation is forbidden for the current user/api key." + }, + { + "value": "notFound", + "description": "The resource is not found." + }, + { + "value": "unexpectedEntityState", + "description": "The operation cannot be executed in the current resource's state." + }, + { + "value": "itemDoesAlreadyExist", + "description": "The item does already exist." + }, + { + "value": "serviceUnavailable", + "description": "The service is currently not available." + }, + { + "value": "internalFailure", + "description": "Internal error. Please retry." + }, + { + "value": "quotaExceeded", + "description": "Quota exceeded." + }, + { + "value": "jsonlValidationFailed", + "description": "Validation of jsonl data failed." + }, + { + "value": "tooManyRequests", + "description": "Too many requests. Please retry later." + }, + { + "value": "unauthorized", + "description": "The current user/api key is not authorized for the operation." + }, + { + "value": "contentFilter", + "description": "Image generation failed as a result of our safety system." + }, + { + "value": "fileImportFailed", + "description": "Import of file failed." + } + ] + } + }, + "ErrorResponse": { + "title": "ErrorResponse", + "description": "Error response as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).", + "required": [ + "error" + ], + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/Error" + } + } + }, + "EventType": { + "title": "EventType", + "description": "Defines the severity of a content filter result.", + "enum": [ + "message", + "metrics" + ], + "type": "string", + "x-ms-enum": { + "name": "EventType", + "modelAsString": true, + "values": [ + { + "value": "message", + "description": "Event only contains human readable messages." + }, + { + "value": "metrics", + "description": "Event contains metrics." + } + ] + } + }, + "File": { + "title": "File", + "description": "A file is a document usable for training and validation. It can also be a service generated document with result details.", + "required": [ + "filename", + "purpose" + ], + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "created_at": { + "format": "unixtime", + "description": "A timestamp when this job or item was created (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "id": { + "description": "The identity of this item.", + "type": "string", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/FileState" + }, + "bytes": { + "format": "int64", + "description": "The size of this file when available (can be null). File sizes larger than 2^53-1 are not supported to ensure compatibility\r\nwith JavaScript integers.", + "type": "integer", + "readOnly": true + }, + "purpose": { + "$ref": "#/definitions/Purpose" + }, + "filename": { + "description": "The name of the file.", + "minLength": 1, + "type": "string" + }, + "status_details": { + "description": "The error message with details in case processing of this file failed.", + "type": "string", + "readOnly": true + } + }, + "readOnly": true + }, + "FileCreate": { + "title": "FileCreate", + "description": "Defines a document to import from an external content url to be usable with Azure OpenAI.", + "required": [ + "content_url", + "purpose" + ], + "type": "object", + "properties": { + "purpose": { + "$ref": "#/definitions/Purpose" + }, + "content_url": { + "format": "url", + "description": "The url to download the document from (can be SAS url of a blob or any other external url accessible with a GET request).", + "type": "string" + } + } + }, + "FileDetails": { + "title": "FileDetails", + "description": "A file detail is a document used by batch service to fetch file blob details.", + "required": [ + "filename", + "purpose" + ], + "type": "object", + "properties": { + "id": { + "description": "The identity of this item.", + "type": "string", + "readOnly": true + }, + "filename": { + "description": "The name of the file.", + "minLength": 1, + "type": "string" + }, + "path": { + "description": "The the relative path to the file within the container.", + "type": "string", + "readOnly": true + }, + "storage_account_uri": { + "format": "url", + "description": "The storage account url of this file.", + "type": "string", + "readOnly": true + }, + "storage_container_name": { + "description": "The Storage Container Name of this file blob.", + "type": "string", + "readOnly": true + }, + "purpose": { + "$ref": "#/definitions/Purpose" + } + } + }, + "FileDelete": { + "title": "FileDelete", + "description": "Defines the response for File Delete.", + "required": [ + "deleted", + "id", + "object" + ], + "type": "object", + "properties": { + "object": { + "description": "The file object.", + "minLength": 1, + "type": "string" + }, + "deleted": { + "description": "A value indicating whether the file was deleted.", + "type": "boolean" + }, + "id": { + "description": "The file-id that was deleted.", + "minLength": 1, + "type": "string" + } + } + }, + "FileImport": { + "title": "FileImport", + "description": "Defines a document to import from an external content url to be usable with Azure OpenAI.", + "required": [ + "content_url", + "filename", + "purpose" + ], + "type": "object", + "properties": { + "purpose": { + "$ref": "#/definitions/Purpose" + }, + "filename": { + "description": "The name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.\r\nIf the `purpose` is set to \"fine-tune\", each line is a JSON record with \"prompt\" and \"completion\" fields representing your training examples.", + "minLength": 1, + "type": "string" + }, + "content_url": { + "format": "url", + "description": "The url to download the document from (can be SAS url of a blob or any other external url accessible with a GET request).", + "type": "string" + } + } + }, + "FileState": { + "title": "FileState", + "description": "The state of a file.", + "enum": [ + "uploaded", + "pending", + "running", + "processed", + "error", + "deleting", + "deleted" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "FileState", + "modelAsString": true, + "values": [ + { + "value": "uploaded", + "description": "The file has been uploaded but it's not yet processed. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an inactive state." + }, + { + "value": "pending", + "description": "The operation was created and is not queued to be processed in the future. It can be categorized as an inactive state." + }, + { + "value": "running", + "description": "The operation has started to be processed. It can be categorized as an active state." + }, + { + "value": "processed", + "description": "The operation has successfully be processed and is ready for consumption. It can be categorized as a terminal state." + }, + { + "value": "error", + "description": "The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state." + }, + { + "value": "deleting", + "description": "The entity is ni the process to be deleted. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an active state." + }, + { + "value": "deleted", + "description": "The entity has been deleted but may still be referenced by other entities predating the deletion. It can be categorized as a terminal state." + } + ] + } + }, + "FileList": { + "title": "FileList", + "description": "Represents a list of files.", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "data": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/File" + } + } + } + }, + "FineTuningHyperParameters": { + "title": "FineTuningHyperParameters", + "description": "The hyper parameter settings used in a fine tune job.", + "type": "object", + "properties": { + "n_epochs": { + "format": "int32", + "description": "The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.", + "type": "integer" + }, + "batch_size": { + "format": "int32", + "description": "The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass.\r\nIn general, we've found that larger batch sizes tend to work better for larger datasets.\r\nThe default value as well as the maximum value for this property are specific to a base model.", + "type": "integer" + }, + "learning_rate_multiplier": { + "format": "double", + "description": "The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pre-training multiplied by this value.\r\nLarger learning rates tend to perform better with larger batch sizes.\r\nWe recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results.", + "type": "number" + } + } + }, + "FineTuningJob": { + "title": "FineTuningJob", + "description": "Defines the values of a fine tune job.", + "required": [ + "model", + "training_file" + ], + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "created_at": { + "format": "unixtime", + "description": "A timestamp when this job or item was created (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "id": { + "description": "The identity of this item.", + "type": "string", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/FineTuningState" + }, + "model": { + "description": "The identifier (model-id) of the base model used for the fine-tune.", + "minLength": 1, + "type": "string" + }, + "fine_tuned_model": { + "description": "The identifier (model-id) of the resulting fine tuned model. This property is only populated for successfully completed fine-tune runs.\r\nUse this identifier to create a deployment for inferencing.", + "type": "string" + }, + "training_file": { + "description": "The file which is used for training.", + "minLength": 1, + "type": "string" + }, + "validation_file": { + "description": "The file which is used to evaluate the fine tuned model during training.", + "type": "string" + }, + "result_files": { + "description": "The result file identities (file-id) containing training and evaluation metrics in csv format.\r\nThe file is only available for successfully completed fine-tune runs.", + "type": "array", + "items": { + "type": "string" + } + }, + "finished_at": { + "format": "int32", + "description": "A timestamp when this job or item has finished successfully (in unix epochs).", + "type": "integer" + }, + "organisation_id": { + "description": "The organisation id of this fine tune job. Unused on Azure OpenAI; compatibility for OpenAI only.", + "type": "string" + }, + "trained_tokens": { + "format": "int32", + "description": "The total number of billable tokens processed by this fine tuning job.", + "type": "integer", + "readOnly": true + }, + "error": { + "$ref": "#/definitions/FineTuningJobError" + }, + "estimated_finish": { + "format": "int32", + "description": "The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running.", + "type": "integer" + }, + "hyperparameters": { + "$ref": "#/definitions/FineTuningHyperParameters" + }, + "suffix": { + "description": "The suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.", + "type": "string" + }, + "seed": { + "format": "int32", + "description": "The seed used for the finetuning job.", + "type": "integer" + }, + "integrations": { + "description": "A list configurations for integrations supporting the fine-tuning job.\r\nThere are many integrations planned, so make sure to check and act on the integration type.", + "type": "array", + "items": { + "$ref": "#/definitions/WandBIntegrationRequestWrapper" + } + } + } + }, + "FineTuningJobCheckpoint": { + "title": "FineTuningJobCheckpoint", + "required": [ + "created_at", + "fine_tuned_model_checkpoint", + "fine_tuning_job_id", + "metrics", + "step_number" + ], + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "id": { + "description": "The identity of this checkpoint.", + "type": "string", + "readOnly": true + }, + "created_at": { + "format": "unixtime", + "description": "The Unix timestamp (in seconds) for when the checkpoint was created.", + "type": "integer" + }, + "fine_tuned_model_checkpoint": { + "description": "The name of the fine-tuned checkpoint model that is created.", + "minLength": 1, + "type": "string" + }, + "step_number": { + "format": "int32", + "description": "The step number that the checkpoint was created at.", + "type": "integer" + }, + "metrics": { + "title": "Dictionary`2", + "description": "The metrics at the step number during the fine-tuning job.", + "type": "object", + "additionalProperties": { + "format": "double", + "type": "number" + } + }, + "fine_tuning_job_id": { + "description": "The name of the fine-tuning job that this checkpoint was created from..", + "minLength": 1, + "type": "string" + } + } + }, + "FineTuningJobCheckpointList": { + "title": "FineTuningJobCheckpointList", + "description": "Represents a list of checkpoints.", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "data": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/FineTuningJobCheckpoint" + } + }, + "has_more": { + "description": "A value indicating whether the list contains more elements than returned.", + "type": "boolean" + } + } + }, + "FineTuningJobCreation": { + "title": "FineTuningJobCreation", + "description": "Defines the values of a fine tune job.", + "required": [ + "model", + "training_file" + ], + "type": "object", + "properties": { + "model": { + "description": "The identifier (model-id) of the base model used for this fine-tune.", + "minLength": 1, + "type": "string" + }, + "training_file": { + "description": "The file identity (file-id) that is used for training this fine tuned model.", + "minLength": 1, + "type": "string" + }, + "validation_file": { + "description": "The file identity (file-id) that is used to evaluate the fine tuned model during training.", + "type": "string" + }, + "hyperparameters": { + "$ref": "#/definitions/FineTuningHyperParameters" + }, + "suffix": { + "description": "The suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name.", + "type": "string" + }, + "seed": { + "format": "int32", + "description": "The seed used for the finetuning job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you.", + "type": "integer" + }, + "integrations": { + "description": "A list configurations for integrations supporting the fine-tuning job.\r\nThere are many integrations planned, so make sure to check and act on the integration type.", + "type": "array", + "items": { + "$ref": "#/definitions/WandBIntegrationRequestWrapper" + } + } + } + }, + "FineTuningJobError": { + "title": "FineTuningJobError", + "description": "For fine-tuning jobs that have failed, this will contain more information on the cause of the failure.", + "type": "object", + "properties": { + "code": { + "description": "The machine-readable error code..", + "type": "string" + }, + "message": { + "description": "The human-readable error message.", + "type": "string" + }, + "param": { + "description": "The parameter that was invalid, usually training_file or validation_file. This field will be null if the failure was not parameter-specific.", + "type": "string" + } + } + }, + "FineTuningJobEvent": { + "title": "FineTuningJobEvent", + "required": [ + "created_at", + "level", + "message", + "type" + ], + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "id": { + "description": "The identity of this event.", + "type": "string", + "readOnly": true + }, + "created_at": { + "format": "unixtime", + "description": "A timestamp when this event was created (in unix epochs).", + "type": "integer" + }, + "level": { + "$ref": "#/definitions/LogLevel" + }, + "message": { + "description": "The message describing the event. This can be a change of state, e.g., enqueued, started, failed or completed, or other events like uploaded results.", + "minLength": 1, + "type": "string" + }, + "type": { + "$ref": "#/definitions/EventType" + }, + "data": { + "description": "Machine readable data of this event." + } + } + }, + "FineTuningJobEventList": { + "title": "FineTuningJobEventList", + "description": "Represents a list of events.", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "data": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/FineTuningJobEvent" + } + }, + "has_more": { + "description": "A value indicating whether the list contains more elements than returned.", + "type": "boolean" + } + } + }, + "FineTuningJobList": { + "title": "FineTuningJobList", + "description": "Represents a list of fine tunes.", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "data": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/FineTuningJob" + } + }, + "has_more": { + "description": "A value indicating whether the list contains more elements than returned.", + "type": "boolean" + } + } + }, + "FineTuningState": { + "title": "FineTuningState", + "description": "The state of a finetunes object or fine tuning job.", + "enum": [ + "created", + "pending", + "running", + "succeeded", + "cancelled", + "failed" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "FineTuningState", + "modelAsString": true, + "values": [ + { + "value": "created", + "description": "The operation was created. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an inactive state." + }, + { + "value": "pending", + "description": "The operation is not yet queued to be processed in the future. It can be categorized as an inactive state." + }, + { + "value": "running", + "description": "The operation has started to be processed. It can be categorized as an active state." + }, + { + "value": "succeeded", + "description": "The operation has successfully be processed and is ready for consumption. It can be categorized as a terminal state." + }, + { + "value": "cancelled", + "description": "The operation has been cancelled and is incomplete. It can be categorized as a terminal state." + }, + { + "value": "failed", + "description": "The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state." + } + ] + } + }, + "GenericEmbeddingSettings": { + "title": "ConnectionEmbeddingSettings", + "description": "Connection Embedding Settings", + "type": "object", + "properties": { + "connection": { + "$ref": "#/definitions/BaseConnection" + }, + "deploymentName": { + "type": "string" + }, + "modelName": { + "type": "string" + } + } + }, + "IngestionError": { + "title": "IngestionError", + "description": "The details of the ingestion error", + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "innerErrors": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "IngestionJob": { + "title": "IngestionJob", + "description": "Represents the details of a job.", + "type": "object", + "required": [ + "kind" + ], + "discriminator": "kind", + "properties": { + "kind": { + "$ref": "#/definitions/IngestionJobType" + }, + "jobId": { + "type": "string" + } + } + }, + "IngestionJobList": { + "title": "IngestionJobList", + "description": "Represents a list of ingestion jobs.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link to the next page.", + "type": "string" + }, + "value": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/IngestionJob" + } + } + } + }, + "IngestionJobProgress": { + "title": "IngestionJobProgress", + "type": "object", + "required": [ + "stageProgress" + ], + "properties": { + "stageProgress": { + "type": "array", + "items": { + "$ref": "#/definitions/IngestionJobStageProgress" + } + } + } + }, + "IngestionJobRun": { + "title": "IngestionJobRun", + "description": "The details of a job run", + "type": "object", + "properties": { + "jobId": { + "type": "string" + }, + "runId": { + "type": "string" + }, + "status": { + "$ref": "#/definitions/OperationState" + }, + "error": { + "$ref": "#/definitions/IngestionError" + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + } + }, + "progress": { + "$ref": "#/definitions/IngestionJobProgress" + } + } + }, + "IngestionJobRunList": { + "title": "IngestionJobRunList", + "description": "Represents a list of ingestion job runs.", + "type": "object", + "properties": { + "nextLink": { + "description": "The link to the next page.", + "type": "string" + }, + "value": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/IngestionJobRun" + } + } + } + }, + "IngestionJobStageProgress": { + "title": "IngestionJobStageProgress", + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "totalItems": { + "type": "integer", + "format": "int32" + }, + "processedItems": { + "type": "integer", + "format": "int32" + }, + "state": { + "$ref": "#/definitions/OperationState" + }, + "subStageProgress": { + "type": "array", + "items": { + "$ref": "#/definitions/IngestionJobStageProgress" + } + } + } + }, + "IngestionJobSystemCompute": { + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/IngestionJob" + }, + { + "type": "object", + "properties": { + "searchServiceConnection": { + "$ref": "#/definitions/BaseConnection" + }, + "datasource": { + "$ref": "#/definitions/SystemComputeDatasource" + }, + "completionAction": { + "$ref": "#/definitions/CompletionAction" + }, + "dataRefreshIntervalInHours": { + "type": "integer" + } + } + } + ], + "x-ms-discriminator-value": "SystemCompute" + }, + "IngestionJobType": { + "title": "IngestionJobType", + "type": "string", + "description": "The job type.", + "enum": [ + "SystemCompute", + "UserCompute" + ], + "x-ms-enum": { + "name": "IngestionJobType", + "modelAsString": true, + "values": [ + { + "name": "SystemCompute", + "value": "SystemCompute", + "description": "Jobs that run on service owned resources." + }, + { + "name": "UserCompute", + "value": "UserCompute", + "description": "Jobs that run on user owned workspace." + } + ] + } + }, + "IngestionJobUserCompute": { + "type": "object", + "required": [ + "workspaceId" + ], + "allOf": [ + { + "$ref": "#/definitions/IngestionJob" + }, + { + "type": "object", + "properties": { + "workspaceId": { + "type": "string" + }, + "compute": { + "$ref": "#/definitions/JobCompute" + }, + "target": { + "$ref": "#/definitions/TargetIndex" + }, + "datasource": { + "$ref": "#/definitions/UserComputeDatasource" + }, + "dataRefreshIntervalInHours": { + "type": "integer" + } + } + } + ], + "x-ms-discriminator-value": "UserCompute" + }, + "InnerError": { + "title": "InnerError", + "description": "Inner error as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).", + "type": "object", + "properties": { + "code": { + "$ref": "#/definitions/InnerErrorCode" + }, + "innererror": { + "$ref": "#/definitions/InnerError" + } + } + }, + "InnerErrorCode": { + "title": "InnerErrorCode", + "description": "Inner error codes as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses).", + "enum": [ + "invalidPayload" + ], + "type": "string", + "x-ms-enum": { + "name": "InnerErrorCode", + "modelAsString": true, + "values": [ + { + "value": "invalidPayload", + "description": "The request data is invalid for this operation." + } + ] + } + }, + "IntegrationTypes": { + "title": "IntegrationTypes", + "description": "List of Fine Tune integrations available.", + "enum": [ + "wandb" + ], + "type": "string" + }, + "JobCompute": { + "title": "JobCompute", + "description": "The compute settings of the job.", + "type": "object", + "discriminator": "kind", + "required": [ + "kind" + ], + "properties": { + "kind": { + "$ref": "#/definitions/ComputeType" + } + } + }, + "LifeCycleStatus": { + "title": "LifeCycleStatus", + "description": "The life cycle status of a model.\r\nNote: A model can be promoted from \"preview\" to \"generally-available\", but never from \"generally-available\" to \"preview\".", + "enum": [ + "preview", + "generally-available" + ], + "type": "string", + "x-ms-enum": { + "name": "LifeCycleStatus", + "modelAsString": true, + "values": [ + { + "value": "preview", + "description": "Model is in preview and covered by the service preview terms." + }, + { + "value": "generally-available", + "description": "Model is generally available." + } + ] + } + }, + "LogLevel": { + "title": "LogLevel", + "description": "The verbosity level of an event.", + "enum": [ + "info", + "warning", + "error" + ], + "type": "string", + "x-ms-enum": { + "name": "LogLevel", + "modelAsString": true, + "values": [ + { + "value": "info", + "description": "This event is for information only." + }, + { + "value": "warning", + "description": "This event represents a mitigated issue." + }, + { + "value": "error", + "description": "This message represents a non recoverable issue." + } + ] + } + }, + "Model": { + "title": "Model", + "description": "A model is either a base model or the result of a successful fine tune job.", + "required": [ + "capabilities", + "deprecation", + "lifecycle_status" + ], + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "created_at": { + "format": "unixtime", + "description": "A timestamp when this job or item was created (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "id": { + "description": "The identity of this item.", + "type": "string", + "readOnly": true + }, + "status": { + "$ref": "#/definitions/FineTuningState" + }, + "model": { + "description": "The base model identity (model-id) if this is a fine tune model; otherwise `null`.", + "type": "string" + }, + "fine_tune": { + "description": "The fine tune job identity (fine-tune-id) if this is a fine tune model; otherwise `null`.", + "type": "string" + }, + "capabilities": { + "$ref": "#/definitions/Capabilities" + }, + "lifecycle_status": { + "$ref": "#/definitions/LifeCycleStatus" + }, + "deprecation": { + "$ref": "#/definitions/Deprecation" + } + } + }, + "ModelList": { + "title": "ModelList", + "description": "Represents a list of models.", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "data": { + "description": "The list of items.", + "type": "array", + "items": { + "$ref": "#/definitions/Model" + } + } + } + }, + "OperationState": { + "title": "OperationState", + "description": "The state of a job or item.", + "enum": [ + "notRunning", + "running", + "succeeded", + "failed" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "OperationState", + "modelAsString": true, + "values": [ + { + "value": "notRunning", + "description": "The operation is not yet queued to be processed in the future." + }, + { + "value": "running", + "description": "The operation has started to be processed." + }, + { + "value": "succeeded", + "description": "The operation has successfully be processed and is ready for consumption." + }, + { + "value": "failed", + "description": "The operation has completed processing with a failure and cannot be further consumed." + } + ] + } + }, + "PineconeIndex": { + "description": "Pinecone Index.", + "required": [ + "connectionId" + ], + "allOf": [ + { + "$ref": "#/definitions/TargetIndex" + }, + { + "type": "object", + "properties": { + "connectionId": { + "type": "string", + "description": "The id of the connection pointing to the pinecone." + } + } + } + ], + "x-ms-discriminator-value": "Pinecone" + }, + "Purpose": { + "title": "Purpose", + "description": "The intended purpose of the uploaded documents. Use \"fine-tune\" for fine-tuning. This allows us to validate the format of the uploaded file.", + "enum": [ + "fine-tune", + "fine-tune-results", + "assistants", + "assistants_output", + "batch", + "batch_output" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "Purpose", + "modelAsString": true, + "values": [ + { + "value": "fine-tune", + "description": "This file contains training data for a fine tune job." + }, + { + "value": "fine-tune-results", + "description": "This file contains the results of a fine tune job." + }, + { + "value": "assistants", + "description": "This file contains data to be used in assistants." + }, + { + "value": "assistants_output", + "description": "This file contains the results of an assistant." + }, + { + "value": "batch", + "description": "This file contains the input data for a batch." + }, + { + "value": "batch_output", + "description": "This file contains the results of a batch." + } + ] + } + }, + "ServerlessCompute": { + "description": "Serverless compute.", + "allOf": [ + { + "$ref": "#/definitions/JobCompute" + }, + { + "type": "object", + "properties": { + "sku": { + "type": "string", + "description": "SKU Level" + }, + "instanceCount": { + "type": "integer", + "description": "The count of instances to run the job on." + } + } + } + ], + "x-ms-discriminator-value": "ServerlessCompute" + }, + "SystemComputeDatasource": { + "title": "SystemComputeDatasource", + "type": "object", + "required": [ + "kind" + ], + "properties": { + "kind": { + "$ref": "#/definitions/SystemComputeDatasourceType" + } + }, + "discriminator": "kind" + }, + "SystemComputeDatasourceType": { + "type": "string", + "description": "The datasource type.", + "enum": [ + "Storage", + "Urls" + ], + "x-ms-enum": { + "name": "SystemComputeDatasourceType", + "modelAsString": true, + "values": [ + { + "name": "Storage", + "value": "Storage", + "description": "Azure Storage Account." + }, + { + "name": "Urls", + "value": "Urls", + "description": "URLs." + } + ] + } + }, + "SystemComputeStorage": { + "title": "SystemComputeStorage", + "description": "Storage account", + "required": [ + "connection", + "containerName", + "embeddings" + ], + "x-ms-discriminator-value": "Storage", + "allOf": [ + { + "$ref": "#/definitions/SystemComputeDatasource" + }, + { + "type": "object", + "properties": { + "connection": { + "$ref": "#/definitions/BaseConnection" + }, + "containerName": { + "type": "string", + "description": "container name" + }, + "chunking": { + "$ref": "#/definitions/ChunkingSettings" + }, + "embeddings": { + "type": "array", + "items": { + "$ref": "#/definitions/GenericEmbeddingSettings" + } + } + } + } + ] + }, + "SystemComputeUrl": { + "title": "SystemComputeUrl", + "description": "Urls", + "required": [ + "urls", + "connection", + "containerName", + "embeddings" + ], + "x-ms-discriminator-value": "Urls", + "allOf": [ + { + "$ref": "#/definitions/SystemComputeDatasource" + }, + { + "type": "object", + "properties": { + "urls": { + "type": "array", + "items": { + "type": "string" + } + }, + "connection": { + "$ref": "#/definitions/BaseConnection" + }, + "containerName": { + "type": "string", + "description": "container name" + }, + "crawling": { + "$ref": "#/definitions/CrawlingSettings" + }, + "chunking": { + "$ref": "#/definitions/ChunkingSettings" + }, + "embeddings": { + "type": "array", + "items": { + "$ref": "#/definitions/GenericEmbeddingSettings" + } + } + } + } + ] + }, + "TargetIndex": { + "title": "TargetIndex", + "description": "Information about the index to be created.", + "type": "object", + "discriminator": "kind", + "required": [ + "kind" + ], + "properties": { + "kind": { + "$ref": "#/definitions/TargetType" + } + } + }, + "TargetType": { + "type": "string", + "description": "The target type.", + "enum": [ + "AzureAISearch", + "CosmosDB", + "Pinecone" + ], + "x-ms-enum": { + "name": "TargetType", + "modelAsString": true, + "values": [ + { + "name": "AzureAISearch", + "value": "AzureAISearch", + "description": "Azure AI Search Index." + }, + { + "name": "CosmosDB", + "value": "CosmosDB", + "description": "CosmosDB Index." + }, + { + "name": "Pinecone", + "value": "Pinecone", + "description": "Pinecone Index." + } + ] + } + }, + "TypeDiscriminator": { + "title": "TypeDiscriminator", + "description": "Defines the type of an object.", + "enum": [ + "list", + "fine_tuning.job", + "file", + "fine_tuning.job.event", + "fine_tuning.job.checkpoint", + "model", + "upload", + "upload.part", + "batch" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "TypeDiscriminator", + "modelAsString": true, + "values": [ + { + "value": "list", + "description": "This object represents a list of other objects." + }, + { + "value": "fine_tuning.job", + "description": "This object represents a fine tune job." + }, + { + "value": "file", + "description": "This object represents a file." + }, + { + "value": "fine_tuning.job.event", + "description": "This object represents an event of a fine tuning job." + }, + { + "value": "fine_tuning.job.checkpoint", + "description": "This object represents a checkpoint of a fine tuning job." + }, + { + "value": "model", + "description": "This object represents a model (can be a base model or fine tune job result)." + }, + { + "value": "upload", + "description": "This object represents a file upload." + }, + { + "value": "upload.part", + "description": "This object represents part of a file upload." + }, + { + "value": "wandb", + "description": "This object represents the Weights and Biases Integration configuration." + }, + { + "value": "batch", + "description": "This object represents a batch." + } + ] + } + }, + "UploadFileCompleteBody": { + "title": "UploadFileCompleteBody", + "required": [ + "part_ids" + ], + "type": "object", + "properties": { + "part_ids": { + "title": "IList`1", + "type": "array", + "items": { + "type": "string" + } + }, + "md5": { + "type": "string" + } + } + }, + "UploadFileStartBody": { + "title": "UploadFileStartBody", + "required": [ + "bytes", + "filename", + "mime_type", + "purpose" + ], + "type": "object", + "properties": { + "purpose": { + "$ref": "#/definitions/Purpose" + }, + "filename": { + "minLength": 1, + "type": "string" + }, + "bytes": { + "format": "int64", + "type": "integer" + }, + "mime_type": { + "minLength": 1, + "type": "string" + } + } + }, + "UploadPartResource": { + "title": "UploadPartResource", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "created_at": { + "format": "unixtime", + "description": "A timestamp when this job or item was created (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "id": { + "description": "The identity of this item.", + "type": "string", + "readOnly": true + }, + "upload_id": { + "type": "string", + "readOnly": true + }, + "azure_block_id": { + "type": "string", + "readOnly": true + } + } + }, + "UploadResource": { + "title": "UploadResource", + "type": "object", + "properties": { + "object": { + "$ref": "#/definitions/TypeDiscriminator" + }, + "created_at": { + "format": "unixtime", + "description": "A timestamp when this job or item was created (in unix epochs).", + "type": "integer", + "readOnly": true + }, + "id": { + "description": "The identity of this item.", + "type": "string", + "readOnly": true + }, + "bytes": { + "format": "int64", + "type": "integer", + "readOnly": true + }, + "filename": { + "type": "string", + "readOnly": true + }, + "purpose": { + "$ref": "#/definitions/Purpose" + }, + "status": { + "$ref": "#/definitions/UploadStatus" + }, + "expires_at": { + "format": "unixtime", + "type": "integer", + "readOnly": true + }, + "file": { + "$ref": "#/definitions/File" + } + } + }, + "UploadStatus": { + "title": "UploadStatus", + "enum": [ + "pending", + "expired", + "completed", + "cancelled" + ], + "type": "string", + "readOnly": true + }, + "UserComputeDataset": { + "type": "object", + "title": "UserComputeStorage", + "description": "Storage account", + "required": [ + "datasetId", + "datasetType" + ], + "x-ms-discriminator-value": "Dataset", + "allOf": [ + { + "$ref": "#/definitions/UserComputeDatasource" + }, + { + "type": "object", + "properties": { + "datasetId": { + "type": "string" + }, + "datasetType": { + "type": "string" + }, + "chunking": { + "$ref": "#/definitions/ChunkingSettings" + }, + "embeddings": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkspaceConnectionEmbeddingSettings" + } + } + } + } + ] + }, + "UserComputeDatasource": { + "title": "UserComputeDatasource", + "type": "object", + "discriminator": "kind", + "required": [ + "kind" + ], + "properties": { + "kind": { + "$ref": "#/definitions/UserComputeDatasourceType" + } + } + }, + "UserComputeDatasourceType": { + "type": "string", + "description": "The datasource type.", + "enum": [ + "Dataset", + "Urls" + ], + "x-ms-enum": { + "name": "UserComputeDatasourceType", + "modelAsString": true, + "values": [ + { + "name": "Dataset", + "value": "Dataset", + "description": "Workspace Dataset." + }, + { + "name": "Urls", + "value": "Urls", + "description": "URLs." + } + ] + } + }, + "UserComputeUrl": { + "type": "object", + "title": "UserComputeUrl", + "description": "Urls", + "required": [ + "urls", + "embeddings" + ], + "x-ms-discriminator-value": "Urls", + "allOf": [ + { + "$ref": "#/definitions/UserComputeDatasource" + }, + { + "type": "object", + "properties": { + "urls": { + "type": "array", + "items": { + "type": "string" + } + }, + "crawling": { + "$ref": "#/definitions/CrawlingSettings" + }, + "chunking": { + "$ref": "#/definitions/ChunkingSettings" + }, + "embeddings": { + "type": "array", + "items": { + "$ref": "#/definitions/WorkspaceConnectionEmbeddingSettings" + } + } + } + } + ] + }, + "WandBIntegrationRequest": { + "title": "WandBIntegrationRequest", + "required": [ + "project" + ], + "type": "object", + "properties": { + "project": { + "minLength": 1, + "type": "string" + }, + "name": { + "type": "string", + "readOnly": true + }, + "entity": { + "type": "string", + "readOnly": true + }, + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "readOnly": true + } + } + }, + "WandBIntegrationRequestWrapper": { + "title": "WandBIntegrationRequestWrapper", + "required": [ + "type", + "wandb" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/definitions/IntegrationTypes" + }, + "wandb": { + "$ref": "#/definitions/WandBIntegrationRequest" + } + } + }, + "WorkspaceConnection": { + "description": "AML Workspace connection.", + "required": [ + "connectionId" + ], + "allOf": [ + { + "$ref": "#/definitions/BaseConnection" + }, + { + "type": "object", + "properties": { + "connectionId": { + "type": "string", + "description": "ConnectionId" + } + } + } + ], + "x-ms-discriminator-value": "WorkspaceConnection" + }, + "WorkspaceConnectionEmbeddingSettings": { + "title": "WorkspaceConnectionEmbeddingSettings", + "description": "Connection id to the embedding model", + "type": "object", + "properties": { + "connectionId": { + "type": "string" + }, + "deploymentName": { + "type": "string" + }, + "modelName": { + "type": "string" + } + } + } + }, + "parameters": { + "endpoint": { + "in": "path", + "name": "endpoint", + "description": "Supported Cognitive Services endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace \"aoairesource\" with your Azure OpenAI account name).", + "required": true, + "type": "string", + "format": "url", + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + }, + "apiVersionQueryParameter": { + "in": "query", + "name": "api-version", + "description": "The requested API version.", + "required": true, + "type": "string", + "x-ms-client-default": "2024-12-01-preview", + "x-ms-parameter-location": "client" + } + }, + "security": [ + { + "ApiKeyAuth": [] + }, + { + "OAuth2Auth": [ + "https://cognitiveservices.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "ApiKeyAuth": { + "description": "API key authentication", + "type": "apiKey", + "name": "api-key", + "in": "header" + }, + "OAuth2Auth": { + "description": "OAuth2 authentication", + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", + "scopes": { + "https://cognitiveservices.azure.com/.default": "" + } + } + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/openai", + "useSchemePrefix": false, + "parameters": [ + { + "$ref": "#/parameters/endpoint" + } + ] + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/azureopenai.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/azureopenai.yaml new file mode 100644 index 000000000000..a128d8ba70bb --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/azureopenai.yaml @@ -0,0 +1,2671 @@ +swagger: "2.0" +info: + title: Azure OpenAI API version 2024-12-01-preview + description: APIs for fine-tuning and managing deployments of OpenAI models. + version: 2024-12-01-preview +paths: + /batches: + get: + tags: + - "Batch:" + summary: Gets a list of all batches owned by the Azure OpenAI resource. + operationId: Batch_List + produces: + - application/json + parameters: + - in: query + name: after + description: Identifier for the last event from the previous pagination request. + type: string + - in: query + name: limit + description: Number of batches to retrieve. Defaults to 20. + type: integer + format: int32 + default: 20 + - in: query + name: $filter + description: The OData expression to describe the filtering conditions. + type: string + - in: query + name: $orderby + description: The OData expression to describe the sorting order. + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/BatchesList" + headers: + deployment-enqueued-tokens: + description: Sum of enqueued tokens of all jobs that target to the deployment. + type: integer + format: int64 + deployment-maximum-enqueued-tokens: + description: Maximum enqueued tokens of the deployment. + type: integer + format: int64 + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting all batches owned by this account.: + $ref: ./examples/get_batches.json + post: + tags: + - "Batch:" + summary: "Creates and executes a batch from an uploaded file of requests.\r\nResponse includes details of the enqueued job including job status.\r\nThe ID of the result file is added to the response once complete." + operationId: Batch_Create + consumes: + - application/json + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: body + name: createBatchRequest + description: The specification of the batch to create and execute. + required: true + schema: + $ref: "#/definitions/BatchCreateRequest" + responses: + "201": + description: The batch has been successfully created. + schema: + $ref: "#/definitions/Batch" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Creating a batch.: + $ref: ./examples/post_batch.json + /batches/{batch-id}: + get: + tags: + - "Batch:" + summary: Gets details for a single batch specified by the given batch-id. + operationId: Batch_Get + produces: + - application/json + parameters: + - in: path + name: batch-id + description: The identifier of the batch. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/Batch" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting a batch.: + $ref: ./examples/get_batch.json + /batches/{batch-id}/cancel: + post: + tags: + - "Batch:" + summary: Cancels the processing of the batch specified by the given batch-id. + operationId: Batch_Cancel + produces: + - application/json + parameters: + - in: path + name: batch-id + description: The identifier of the batch. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: The batch has been successfully canceled. + schema: + $ref: "#/definitions/Batch" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Canceling a batch.: + $ref: ./examples/cancel_batch.json + /files: + get: + tags: + - "Files:" + summary: "Gets a list of all files owned by the Azure OpenAI resource.\r\nThese include user uploaded content like files with purpose \"fine-tune\" for training or validation of fine-tunes models\r\nas well as files that are generated by the service such as \"fine-tune-results\" which contains various metrics for the corresponding fine-tune job." + operationId: Files_List + produces: + - application/json + parameters: + - in: query + name: purpose + description: Only return files with the given purpose. + type: string + enum: + - fine-tune + - fine-tune-results + - assistants + - assistants_output + - batch + - batch_output + x-ms-enum: + name: Purpose + modelAsString: true + values: + - value: fine-tune + description: This file contains training data for a fine tune job. + - value: fine-tune-results + description: This file contains the results of a fine tune job. + - value: assistants + description: This file contains data to be used in assistants. + - value: assistants_output + description: This file contains the results of an assistant. + - value: batch + description: This file contains the input data for a batch. + - value: batch_output + description: This file contains the results of a batch. + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/FileList" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting all files owned by this account.: + $ref: ./examples/get_files.yaml + post: + tags: + - "Files:" + summary: Creates a new file entity by uploading data from a local machine. Uploaded files can, for example, be used for training or evaluating fine-tuned models. + operationId: Files_Upload + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: formData + name: purpose + description: The intended purpose of the uploaded documents. Use "fine-tune" for fine-tuning. This allows us to validate the format of the uploaded file. + required: true + type: string + enum: + - fine-tune + - fine-tune-results + - assistants + - assistants_output + - batch + x-ms-enum: + name: Purpose + modelAsString: true + values: + - value: fine-tune + description: This file contains training data for a fine tune job. + - value: fine-tune-results + description: This file contains the results of a fine tune job. + - value: assistants + description: This file contains data to be used in assistants. + - value: assistants_output + description: This file contains the results of an assistant. + - value: batch + description: This file contains the input data for a batch. + - in: formData + name: file + description: Gets or sets the file to upload into Azure OpenAI. + required: true + type: file + responses: + "201": + description: The file has been successfully created. + schema: + $ref: "#/definitions/File" + headers: + Location: + description: The location of the newly created item. + type: string + format: url + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Upload a file.: + $ref: ./examples/upload_file.yaml + /files/import: + post: + tags: + - "Files:" + summary: Creates a new file entity by importing data from a provided url. Uploaded files can, for example, be used for training or evaluating fine-tuned models. + operationId: Files_Import + consumes: + - application/json + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: body + name: fileImport + description: The definition of the file to create including its purpose, the file name and the url of the file location. + required: true + schema: + $ref: "#/definitions/FileImport" + responses: + "201": + description: The file has been successfully created. + schema: + $ref: "#/definitions/File" + headers: + Location: + description: The location of the newly created item. + type: string + format: url + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Importing a file with a blob url as source.: + $ref: ./examples/import_file.yaml + /files/{file-id}: + get: + tags: + - "Files:" + summary: Gets details for a single file specified by the given file-id including status, size, purpose, etc. + operationId: Files_Get + produces: + - application/json + parameters: + - in: path + name: file-id + description: The identifier of the file. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/File" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting a file.: + $ref: ./examples/get_file.yaml + delete: + tags: + - "Files:" + summary: "Deletes the file with the given file-id.\r\nDeletion is also allowed if a file was used, e.g., as training file in a fine-tune job." + operationId: Files_Delete + produces: + - application/json + parameters: + - in: path + name: file-id + description: The identifier of the file. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: The file was successfully deleted. + schema: + $ref: '#/definitions/FileDelete' + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Deleting a file.: + $ref: ./examples/delete_file.yaml + /files/{file-id}/content: + get: + tags: + - "Files:" + summary: "Gets the content of the file specified by the given file-id.\r\nFiles can be user uploaded content or generated by the service like result metrics of a fine-tune job." + operationId: Files_GetContent + produces: + - application/octet-stream + - application/json + parameters: + - in: path + name: file-id + description: The identifier of the file. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + type: file + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting the file content.: + $ref: ./examples/get_file_content.yaml + /fine_tuning/jobs: + get: + tags: + - "Fine-tuning:" + summary: "Gets a list of all fine-tune jobs owned by the Azure OpenAI resource.\r\nThe details that are returned for each fine-tune job contain besides its identifier\r\nthe base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded." + operationId: FineTuning_List + produces: + - application/json + parameters: + - in: query + name: after + description: Identifier for the last event from the previous pagination request. + type: string + - in: query + name: limit + description: Number of events to retrieve. Defaults to 20. + type: integer + format: int32 + default: 20 + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/FineTuningJobList" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting all fine tuning jobs owned by this account.: + $ref: ./examples/get_finetuning_jobs.yaml + post: + tags: + - "Fine-tuning:" + summary: "Creates a job that fine-tunes a specified model from a given training file.\r\nResponse includes details of the enqueued job including job status and hyper parameters.\r\nThe name of the fine-tuned model is added to the response once complete." + operationId: FineTuning_Create + consumes: + - application/json + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: body + name: fineTuningJob + description: "The specification of the fine-tuned model to create.\r\nRequired parameters are the base model and the training file to use.\r\nOptionally a validation file can be specified to compute validation metrics during training.\r\nHyper parameters will be set to default values or can be optionally specified.\r\nThese include batch size, learning rate multiplier, number of epochs and others." + required: true + schema: + $ref: "#/definitions/FineTuningJobCreation" + responses: + "201": + description: The fine tune has been successfully created. + schema: + $ref: "#/definitions/FineTuningJob" + headers: + Location: + description: The location of the newly created item. + type: string + format: url + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Creating a fine tuning job.: + $ref: ./examples/post_finetuning_job.yaml + /fine_tuning/jobs/{fine-tuning-job-id}: + get: + tags: + - "Fine-tuning:" + summary: "Gets details for a single fine-tune job specified by the given fine-tune-id.\r\nThe details contain the base model, training and validation files, hyper parameters, time stamps, status and events.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded." + operationId: FineTuning_Get + produces: + - application/json + parameters: + - in: path + name: fine-tuning-job-id + description: The identifier of the fine-tune job. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/FineTuningJob" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting a fine tuning job.: + $ref: ./examples/get_finetuning_job.yaml + delete: + tags: + - "Fine-tuning:" + summary: Deletes the fine-tune job specified by the given fine-tune-id. + operationId: FineTuning_Delete + produces: + - application/json + parameters: + - in: path + name: fine-tuning-job-id + description: The identifier of the fine-tune job. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "204": + description: The fine tune was successfully deleted. + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Deleting a fine tuning job.: + $ref: ./examples/delete_finetuning_job.yaml + /fine_tuning/jobs/{fine-tuning-job-id}/cancel: + post: + tags: + - "Fine-tuning:" + summary: Cancels the processing of the fine-tune job specified by the given fine-tune-id. + operationId: FineTuning_Cancel + produces: + - application/json + parameters: + - in: path + name: fine-tuning-job-id + description: The identifier of the fine-tune job. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: The fine tune has been successfully canceled + schema: + $ref: "#/definitions/FineTuningJob" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Canceling a fine tuning job.: + $ref: ./examples/cancel_finetuning_job.yaml + /fine_tuning/jobs/{fine-tuning-job-id}/checkpoints: + get: + tags: + - "Fine-tuning:" + summary: "Gets the checkpoints for the fine-tune job specified by the given fine-tune-id.\r\nCheckpoints are created at the end of successful epochs during training." + operationId: FineTuning_GetCheckpoints + produces: + - application/json + parameters: + - in: path + name: fine-tuning-job-id + description: The identifier of the fine-tune job. + required: true + type: string + - in: query + name: after + description: Identifier for the last checkpoint ID from the previous pagination request. + type: string + - in: query + name: limit + description: Number of checkpoints to retrieve. Defaults to 10. + type: integer + format: int32 + default: 10 + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/FineTuningJobCheckpointList" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting checkpoints of a fine tuning job.: + $ref: ./examples/get_finetuning_job_checkpoints.yaml + /fine_tuning/jobs/{fine-tuning-job-id}/events: + get: + tags: + - "Fine-tuning:" + summary: "Gets the events for the fine-tune job specified by the given fine-tune-id.\r\nEvents are created when the job status changes, e.g. running or complete, and when results are uploaded." + operationId: FineTuning_GetEvents + produces: + - application/json + parameters: + - in: path + name: fine-tuning-job-id + description: The identifier of the fine-tune job. + required: true + type: string + - in: query + name: after + description: Identifier for the last event from the previous pagination request. + type: string + - in: query + name: limit + description: Number of events to retrieve. Defaults to 20. + type: integer + format: int32 + default: 20 + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/FineTuningJobEventList" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting events of a fine tuning job.: + $ref: ./examples/get_finetuning_job_events.yaml + /ingestion/jobs: + get: + tags: + - "Ingestion:" + summary: Lists the ingestion jobs. + operationId: IngestionJobs_List + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: header + name: mgmt-user-token + type: string + description: The token used to access the workspace (needed only for user compute jobs). + responses: + "200": + description: Success + schema: + $ref: "#/definitions/IngestionJobList" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + List all ingestion jobs: + $ref: ./examples/list_ingestion_jobs.json + /ingestion/jobs/{job-id}: + put: + tags: + - "Ingestion:" + summary: Creates an ingestion job with the specified job id. + operationId: IngestionJobs_Create + consumes: + - application/json + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: path + name: job-id + required: true + type: string + description: The id of the job that will be created. + - in: header + name: mgmt-user-token + type: string + description: The token used to access the workspace (needed only for user compute jobs). + - in: header + name: aml-user-token + type: string + description: The token used to access the resources within the job in the workspace (needed only for user compute jobs). + - in: body + name: ingestionJob + schema: + $ref: "#/definitions/IngestionJob" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/IngestionJob" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Create a system-compute ingestion job: + $ref: ./examples/put_ingestion_job_sc.json + Create a user-compute ingestion job: + $ref: ./examples/put_ingestion_job_uc.json + get: + tags: + - "Ingestion:" + summary: Gets the details of the specified job id. + operationId: IngestionJobs_Get + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: path + name: job-id + required: true + description: The id of the job. + type: string + responses: + "200": + description: Success + schema: + $ref: "#/definitions/IngestionJob" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Get ingestion job: + $ref: ./examples/get_ingestion_job.json + /ingestion/jobs/{job-id}/runs: + get: + tags: + - "Ingestion:" + summary: Lists the runs of the specified job id. + operationId: IngestionJobRuns_List + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: path + name: job-id + required: true + description: The id of the job. + type: string + - in: header + name: mgmt-user-token + type: string + description: The token used to access the workspace (needed only for user compute jobs). + responses: + "200": + description: Success + schema: + $ref: "#/definitions/IngestionJobRunList" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + List ingestion job runs: + $ref: ./examples/list_ingestion_job_runs.json + /ingestion/jobs/{job-id}/runs/{run-id}: + get: + tags: + - "Ingestion:" + summary: Gets the details of the specified run id as part of the specified job id. + operationId: IngestionJobRuns_Get + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: path + name: job-id + required: true + description: The id of the job. + type: string + - in: path + name: run-id + required: true + description: The id of the run. + type: string + - in: header + name: mgmt-user-token + type: string + description: The token used to access the workspace (needed only for user compute jobs). + responses: + "200": + description: Success + schema: + $ref: "#/definitions/IngestionJobRun" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Get ingestion job runs: + $ref: ./examples/get_ingestion_job_run.json + /models: + get: + tags: + - "Models:" + summary: "Gets a list of all models that are accessible by the Azure OpenAI resource.\r\nThese include base models as well as all successfully completed fine-tuned models owned by the Azure OpenAI resource." + operationId: Models_List + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/ModelList" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting all models owned by account.: + $ref: ./examples/get_models.yaml + /models/{model-id}: + get: + tags: + - "Models:" + summary: Gets details for the model specified by the given modelId. + operationId: Models_Get + produces: + - application/json + parameters: + - in: path + name: model-id + description: The identifier of the model. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/Model" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Getting a base model.: + $ref: ./examples/get_model_base.yaml + Getting a fine-tuned model.: + $ref: ./examples/get_model_finetune.yaml + /uploads: + post: + tags: + - "UploadFile:" + summary: "An intermediate Upload object is created, allowing you to add Parts to it. Currently, an Upload size can be a maximum of 9 GB in total and will expire two hours after being created.\r\nAfter the Upload is completed a File object will be generated, containing all the uploaded parts. This File object can then be used across our platform just like any other file." + operationId: UploadFile_Start + consumes: + - application/json + - text/json + - application/*+json + produces: + - application/json + parameters: + - $ref: "#/parameters/apiVersionQueryParameter" + - in: body + name: requestBody + description: The definition of the file to create including its purpose and the location on the local machine. + required: true + schema: + $ref: "#/definitions/UploadFileStartBody" + responses: + "200": + description: The upload has been successfully created. + schema: + $ref: "#/definitions/UploadResource" + headers: + Location: + description: The location of the newly created item. + type: string + format: url + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Start a large file upload operation.: + $ref: ./examples/upload_file_start.yaml + /uploads/{upload-id}/cancel: + post: + tags: + - "UploadFile:" + summary: "Cancels the Upload, and will lead to all uploaded parts to be deleted asynchronously.\r\nNo Parts may be added after an Upload is cancelled." + operationId: UploadFile_Cancel + produces: + - application/json + parameters: + - in: path + name: upload-id + description: The identifier of the upload. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/UploadResource" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Cancel a large file upload operation.: + $ref: ./examples/upload_file_cancel.yaml + /uploads/{upload-id}/complete: + post: + tags: + - "UploadFile:" + summary: "This completes the Upload, and the returned Upload object contains a nested File object that is ready for use across the platform.\r\nYou can define the order of the Parts by providing an ordered list of Part IDs.\r\nThe total number of bytes uploaded must match the size originally specified when creating the Upload object.\r\nAfter this operation no additional Parts can be added once the Upload is completed." + operationId: UploadFile_Complete + consumes: + - application/json + - text/json + - application/*+json + produces: + - application/json + parameters: + - in: path + name: upload-id + description: The identifier of the upload. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + - in: body + name: requestBody + description: The definition of the file to create including its purpose and the location on the local machine. + required: true + schema: + $ref: "#/definitions/UploadFileCompleteBody" + responses: + "200": + description: Success + schema: + $ref: "#/definitions/UploadResource" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Complete and validate a large file upload operation.: + $ref: ./examples/upload_file_complete.yaml + /uploads/{upload-id}/parts: + post: + tags: + - "UploadFile:" + summary: "Adds a Part to an Upload object, where each Part represents a segment of the file you are uploading.\r\nEach Part can be up to the standard size limit for file upload, based on the File Purpose. You can continue adding Parts until reaching the Upload size limit of 9 GB." + operationId: UploadFile_Part + consumes: + - multipart/form-data + produces: + - application/json + parameters: + - in: path + name: upload-id + description: The identifier of the upload. + required: true + type: string + - $ref: "#/parameters/apiVersionQueryParameter" + - in: formData + name: data + required: true + type: file + responses: + "200": + description: Success + schema: + $ref: "#/definitions/UploadPartResource" + default: + description: An error occurred. + schema: + $ref: "#/definitions/ErrorResponse" + x-ms-examples: + Upload a part of large file upload operation.: + $ref: ./examples/upload_file_part.yaml +definitions: + AzureAISearchIndex: + description: Azure AI Search Index. + required: + - connectionId + allOf: + - $ref: "#/definitions/TargetIndex" + - type: object + properties: + connectionId: + type: string + description: The id of the connection pointing to the Azure AI Search Index. + x-ms-discriminator-value: AzureAISearch + BaseConnection: + title: BaseConnection + description: A connection to a resource. + type: object + required: + - kind + properties: + kind: + $ref: "#/definitions/ConnectionType" + discriminator: kind + Batch: + title: Batch + description: Defines the values of a batch. + required: + - id + - input_file_id + type: object + properties: + id: + description: The identity of this item. + type: string + object: + $ref: "#/definitions/TypeDiscriminator" + endpoint: + description: The API endpoint used by the batch. + type: string + readOnly: true + errors: + $ref: "#/definitions/BatchErrors" + input_file_id: + description: The ID of the input file for the batch. + minLength: 1 + type: string + completion_window: + description: The time frame within which the batch should be processed. + type: string + status: + $ref: "#/definitions/BatchStatus" + output_file_id: + description: The ID of the file containing outputs of successfully executed requests. + type: string + error_file_id: + description: The ID of the file containing outputs of requests with errors. + type: string + created_at: + format: unixtime + description: A timestamp when this batch was created (in unix epochs). + type: integer + readOnly: true + in_progress_at: + format: unixtime + description: A timestamp when this batch started progressing (in unix epochs). + type: integer + readOnly: true + expires_at: + format: unixtime + description: A timestamp when this batch will expire (in unix epochs). + type: integer + readOnly: true + finalizing_at: + format: unixtime + description: A timestamp when this batch started finalizing (in unix epochs). + type: integer + readOnly: true + completed_at: + format: unixtime + description: A timestamp when this batch was completed (in unix epochs). + type: integer + readOnly: true + failed_at: + format: unixtime + description: A timestamp when this batch failed (in unix epochs). + type: integer + readOnly: true + expired_at: + format: unixtime + description: A timestamp when this batch expired (in unix epochs). + type: integer + readOnly: true + cancelling_at: + format: unixtime + description: A timestamp when this batch started cancelling (in unix epochs). + type: integer + readOnly: true + cancelled_at: + format: unixtime + description: A timestamp when this batch was cancelled (in unix epochs). + type: integer + readOnly: true + request_counts: + $ref: "#/definitions/BatchRequestCounts" + metadata: + description: A set of key-value pairs that can be attached to the batch. This can be useful for storing additional infomration about the batch in a structured format. + type: object + additionalProperties: + type: string + BatchCreateRequest: + title: BatchCreateRequest + description: Defines the request to create a batch. + required: + - input_file_id + - endpoint + - completion_window + type: object + properties: + input_file_id: + description: The ID if the input file for the batch. + minLength: 1 + type: string + endpoint: + description: The API endpoint used by the batch. + type: string + completion_window: + description: The time frame within which the batch should be processed. + type: string + metadata: + description: A set of key-value pairs that can be attached to the batch. This can be useful for storing additional infomration about the batch in a structured format. + type: object + additionalProperties: + type: string + BatchErrorData: + title: BatchErrorData + description: Error information for a failure in batch. + type: object + properties: + code: + description: An error code identifying the error type. + type: string + message: + description: A human-readable message providing more details about the error. + type: string + param: + description: The name of the parameter that caused the error, if applicable (can be null). + type: string + line: + description: The line number of the input file where the error occurred, if applicable (can be null). + type: string + BatchErrors: + title: BatchErrors + description: For batches that have failed, this will contain more information on the cause of the failures. + type: object + properties: + object: + description: The type of the errors object. This is always 'list'. + type: string + data: + $ref: "#/definitions/BatchErrorData" + BatchRequestCounts: + title: BatchRequestCounts + description: The request counts for different statuses within the batch. + type: object + properties: + total: + description: The total number of requests in the batch. + type: integer + completed: + description: The number of requests in the batch that have been completed successfully. + type: integer + failed: + description: The number of requests in the batch that have failed. + type: integer + BatchStatus: + title: BatchStatus + description: The status of a batch. + enum: + - validating + - failed + - in_progress + - finalizing + - completed + - expired + - cancelling + - cancelled + type: string + readOnly: true + x-ms-enum: + name: BatchStatus + modelAsString: true + values: + - value: validating + description: The input file is being validated before the batch can begin. + - value: failed + description: The input file has failed the validation process. + - value: in_progress + description: The input file was successfully validated and the batch is currently being executed. + - value: finalizing + description: The batch has completed and the results are being prepared. + - value: completed + description: The batch has been completed and the results are ready. + - value: expired + description: The batch was not able to complete within the 24-hour time window. + - value: cancelling + description: Cancellation of the batch has been initiated. + - value: cancelled + description: The batch was cancelled. + BatchesList: + title: BatchList + description: Represents a list of batches. + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + data: + description: The list of items. + type: array + items: + $ref: "#/definitions/Batch" + first_id: + description: The id of the first batch in the list of batches returned. + type: string + last_id: + description: The id of the last batch in the list of batches returned. + type: string + has_more: + description: A value indicating whether the list contains more elements than returned. + type: boolean + Capabilities: + title: Capabilities + description: The capabilities of a base or fine tune model. + required: + - chat_completion + - completion + - embeddings + - fine_tune + - inference + type: object + properties: + fine_tune: + description: A value indicating whether a model can be used for fine tuning. + type: boolean + inference: + description: A value indicating whether a model can be deployed. + type: boolean + completion: + description: A value indicating whether a model supports completion. + type: boolean + chat_completion: + description: A value indicating whether a model supports chat completion. + type: boolean + embeddings: + description: A value indicating whether a model supports embeddings. + type: boolean + ChunkingSettings: + type: object + title: ChunkingSettings + description: Chunking settings + properties: + maxChunkSizeInTokens: + type: integer + CompletionAction: + type: string + description: The completion action. + enum: + - cleanUpTempAssets + - keepAllAssets + x-ms-enum: + name: IngestionJobCompletionAction + modelAsString: true + values: + - name: keepAllAssets + value: keepAllAssets + description: Will not clean up any of the intermediate assets created during the ingestion process. + - name: cleanUpTempAssets + value: cleanUpTempAssets + description: Will clean up intermediate assets created during the ingestion process. + ComputeType: + type: string + description: The compute type. + enum: + - ServerlessCompute + - CustomCompute + x-ms-enum: + name: ComputeType + modelAsString: true + values: + - name: ServerlessCompute + value: ServerlessCompute + description: Serverless user compute. + - name: CustomCompute + value: CustomCompute + description: Custom user compute. + ConnectionStringConnection: + description: Connection string connection. + required: + - connectionString + allOf: + - $ref: "#/definitions/BaseConnection" + - type: object + properties: + connectionString: + type: string + description: Connection string + x-ms-discriminator-value: ConnectionString + ConnectionType: + type: string + description: The connection type. + enum: + - EndpointWithKey + - ConnectionString + - EndpointWithManagedIdentity + - WorkspaceConnection + - RelativeConnection + x-ms-enum: + name: ConnectionType + modelAsString: true + values: + - name: EndpointWithKey + value: EndpointWithKey + description: Endpoint and key connection. + - name: ConnectionString + value: ConnectionString + description: Connection string. + - name: EndpointWithManagedIdentity + value: EndpointWithManagedIdentity + description: Endpoint and managed identity. + - name: WorkspaceConnection + value: WorkspaceConnection + description: AML Workspace connection. + - name: RelativeConnection + value: RelativeConnection + description: Relative deployment + CosmosDBIndex: + description: CosmosDB Index. + required: + - connectionId + allOf: + - $ref: "#/definitions/TargetIndex" + - type: object + properties: + connectionId: + type: string + description: The id of the connection pointing to the cosmos DB. + collectionName: + type: string + description: The name of the cosmos DB collection. + databaseName: + type: string + description: The name of the cosmos DB database. + x-ms-discriminator-value: CosmosDB + CrawlingSettings: + type: object + title: CrawlingSettings + description: Crawling settings + properties: + maxCrawlDepth: + type: integer + maxCrawlTimeInMins: + type: integer + maxDownloadTimeInMins: + type: integer + maxFileSize: + type: integer + maxRedirects: + type: integer + maxFiles: + type: integer + CustomCompute: + description: Custom compute. + required: + - computeId + allOf: + - $ref: "#/definitions/JobCompute" + - type: object + properties: + computeId: + type: string + description: Id of the custom compute + x-ms-discriminator-value: CustomCompute + DeploymentConnection: + description: Relative deployment connection. + allOf: + - $ref: "#/definitions/BaseConnection" + x-ms-discriminator-value: RelativeConnection + Deprecation: + title: Deprecation + description: "Defines the dates of deprecation for the different use cases of a model.\r\nUsually base models support 1 year of fine tuning after creation. Inference is typically supported 2 years after creation of base or\r\nfine tuned models. The exact dates are specified in the properties." + required: + - inference + type: object + properties: + fine_tune: + format: unixtime + description: The end date of fine tune support of this model. Will be `null` for fine tune models. + type: integer + inference: + format: unixtime + description: The end date of inference support of this model. + type: integer + EndpointKeyConnection: + description: Endpoint key connection. + required: + - endpoint + - key + allOf: + - $ref: "#/definitions/BaseConnection" + - type: object + properties: + endpoint: + type: string + description: Endpoint + key: + type: string + description: Key + x-ms-discriminator-value: EndpointWithKey + EndpointMIConnection: + description: Endpoint Managed Identity connection. + required: + - endpoint + allOf: + - $ref: "#/definitions/BaseConnection" + - type: object + properties: + endpoint: + type: string + description: Endpoint + resourceId: + type: string + description: Resource Id + x-ms-discriminator-value: EndpointWithManagedIdentity + Error: + title: Error + description: "Error content as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)." + required: + - code + - message + type: object + properties: + code: + $ref: "#/definitions/ErrorCode" + message: + description: The message of this error. + minLength: 1 + type: string + target: + description: The location where the error happened if available. + type: string + details: + description: The error details if available. + type: array + items: + $ref: "#/definitions/Error" + innererror: + $ref: "#/definitions/InnerError" + ErrorCode: + title: ErrorCode + description: "Error codes as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)." + enum: + - conflict + - invalidPayload + - forbidden + - notFound + - unexpectedEntityState + - itemDoesAlreadyExist + - serviceUnavailable + - internalFailure + - quotaExceeded + - jsonlValidationFailed + - fileImportFailed + - tooManyRequests + - unauthorized + - contentFilter + type: string + x-ms-enum: + name: ErrorCode + modelAsString: true + values: + - value: conflict + description: The requested operation conflicts with the current resource state. + - value: invalidPayload + description: The request data is invalid for this operation. + - value: forbidden + description: The operation is forbidden for the current user/api key. + - value: notFound + description: The resource is not found. + - value: unexpectedEntityState + description: The operation cannot be executed in the current resource's state. + - value: itemDoesAlreadyExist + description: The item does already exist. + - value: serviceUnavailable + description: The service is currently not available. + - value: internalFailure + description: Internal error. Please retry. + - value: quotaExceeded + description: Quota exceeded. + - value: jsonlValidationFailed + description: Validation of jsonl data failed. + - value: fileImportFailed + description: Import of file failed. + - value: tooManyRequests + description: Too many requests. Please retry later. + - value: unauthorized + description: The current user/api key is not authorized for the operation. + - value: contentFilter + description: Image generation failed as a result of our safety system. + ErrorResponse: + title: ErrorResponse + description: "Error response as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)." + required: + - error + type: object + properties: + error: + $ref: "#/definitions/Error" + EventType: + title: EventType + description: Defines the severity of a content filter result. + enum: + - message + - metrics + type: string + x-ms-enum: + name: EventType + modelAsString: true + values: + - value: message + description: Event only contains human readable messages. + - value: metrics + description: Event contains metrics. + File: + title: File + description: A file is a document usable for training and validation. It can also be a service generated document with result details. + required: + - filename + - purpose + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + created_at: + format: unixtime + description: A timestamp when this job or item was created (in unix epochs). + type: integer + readOnly: true + id: + description: The identity of this item. + type: string + readOnly: true + status: + $ref: '#/definitions/FileState' + bytes: + format: int64 + description: "The size of this file when available (can be null). File sizes larger than 2^53-1 are not supported to ensure compatibility\r\nwith JavaScript integers." + type: integer + readOnly: true + purpose: + $ref: "#/definitions/Purpose" + filename: + description: The name of the file. + minLength: 1 + type: string + status_details: + description: The error message with details in case processing of this file failed. + type: string + readOnly: true + readOnly: true + FileCreate: + title: FileCreate + description: Defines a document to import from an external content url to be usable with Azure OpenAI. + required: + - content_url + - purpose + type: object + properties: + purpose: + $ref: "#/definitions/Purpose" + content_url: + format: url + description: The url to download the document from (can be SAS url of a blob or any other external url accessible with a GET request). + type: string + FileDetails: + title: FileDetails + description: A file detail is a document used by batch service to fetch file blob details. + required: + - filename + - purpose + type: object + properties: + id: + description: The identity of this item. + type: string + readOnly: true + filename: + description: The name of the file. + minLength: 1 + type: string + path: + description: The the relative path to the file within the container. + type: string + readOnly: true + storage_account_uri: + format: url + description: The storage account url of this file. + type: string + readOnly: true + storage_container_name: + description: The Storage Container Name of this file blob. + type: string + readOnly: true + purpose: + $ref: "#/definitions/Purpose" + FileDelete: + title: FileDelete + required: + - deleted + - id + - object + type: object + properties: + object: + minLength: 1 + type: string + description: The file object. + deleted: + type: boolean + description: A value indicating whether the file was deleted. + id: + minLength: 1 + type: string + description: The file-id that was deleted. + description: Defines the response for File Delete. + FileImport: + title: FileImport + description: Defines a document to import from an external content url to be usable with Azure OpenAI. + required: + - content_url + - filename + - purpose + type: object + properties: + purpose: + $ref: "#/definitions/Purpose" + filename: + description: "The name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded.\r\nIf the `purpose` is set to \"fine-tune\", each line is a JSON record with \"prompt\" and \"completion\" fields representing your training examples." + minLength: 1 + type: string + content_url: + format: url + description: The url to download the document from (can be SAS url of a blob or any other external url accessible with a GET request). + type: string + FileList: + title: FileList + description: Represents a list of files. + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + data: + description: The list of items. + type: array + items: + $ref: "#/definitions/File" + FileState: + title: FileState + description: The state of a file. + enum: + - uploaded + - pending + - running + - processed + - error + - deleting + - deleted + type: string + readOnly: true + x-ms-enum: + name: FileState + modelAsString: true + values: + - value: uploaded + description: >- + The file has been uploaded but it's not yet processed. This state is + not returned by Azure OpenAI and exposed only for compatibility. It + can be categorized as an inactive state. + - value: pending + description: >- + The operation was created and is not queued to be processed in the + future. It can be categorized as an inactive state. + - value: running + description: >- + The operation has started to be processed. It can be categorized as + an active state. + - value: processed + description: >- + The operation has successfully be processed and is ready for + consumption. It can be categorized as a terminal state. + - value: error + description: >- + The operation has completed processing with a failure and cannot be + further consumed. It can be categorized as a terminal state. + - value: deleting + description: >- + The entity is ni the process to be deleted. This state is not + returned by Azure OpenAI and exposed only for compatibility. It can + be categorized as an active state. + - value: deleted + description: >- + The entity has been deleted but may still be referenced by other + entities predating the deletion. It can be categorized as a terminal + state. + FineTuningHyperParameters: + title: FineTuningHyperParameters + description: The hyper parameter settings used in a fine tune job. + type: object + properties: + n_epochs: + format: int32 + description: The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. + type: integer + batch_size: + format: int32 + description: "The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass.\r\nIn general, we've found that larger batch sizes tend to work better for larger datasets.\r\nThe default value as well as the maximum value for this property are specific to a base model." + type: integer + learning_rate_multiplier: + format: double + description: "The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pre-training multiplied by this value.\r\nLarger learning rates tend to perform better with larger batch sizes.\r\nWe recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results." + type: number + FineTuningJob: + title: FineTuningJob + description: Defines the values of a fine tune job. + required: + - model + - training_file + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + created_at: + format: unixtime + description: A timestamp when this job or item was created (in unix epochs). + type: integer + readOnly: true + id: + description: The identity of this item. + type: string + readOnly: true + status: + $ref: "#/definitions/FineTuningState" + model: + description: The identifier (model-id) of the base model used for the fine-tune. + minLength: 1 + type: string + fine_tuned_model: + description: "The identifier (model-id) of the resulting fine tuned model. This property is only populated for successfully completed fine-tune runs.\r\nUse this identifier to create a deployment for inferencing." + type: string + training_file: + description: The file which is used for training. + minLength: 1 + type: string + validation_file: + description: The file which is used to evaluate the fine tuned model during training. + type: string + result_files: + description: "The result file identities (file-id) containing training and evaluation metrics in csv format.\r\nThe file is only available for successfully completed fine-tune runs." + type: array + items: + type: string + finished_at: + format: int32 + description: A timestamp when this job or item has finished successfully (in unix epochs). + type: integer + organisation_id: + description: The organisation id of this fine tune job. Unused on Azure OpenAI; compatibility for OpenAI only. + type: string + trained_tokens: + format: int32 + description: The total number of billable tokens processed by this fine tuning job. + type: integer + readOnly: true + error: + $ref: "#/definitions/FineTuningJobError" + estimated_finish: + format: int32 + description: The Unix timestamp (in seconds) for when the fine-tuning job is estimated to finish. The value will be null if the fine-tuning job is not running. + type: integer + hyperparameters: + $ref: "#/definitions/FineTuningHyperParameters" + suffix: + description: The suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name. + type: string + seed: + format: int32 + description: The seed used for the finetuning job. + type: integer + integrations: + type: array + items: + $ref: "#/definitions/WandBIntegrationRequestWrapper" + description: "A list configurations for integrations supporting the fine-tuning job.\r\nThere are many integrations planned, so make sure to check and act on the integration type." + FineTuningJobCheckpoint: + title: FineTuningJobCheckpoint + required: + - created_at + - fine_tuned_model_checkpoint + - fine_tuning_job_id + - metrics + - step_number + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + id: + description: The identity of this checkpoint. + type: string + readOnly: true + created_at: + format: unixtime + description: The Unix timestamp (in seconds) for when the checkpoint was created. + type: integer + fine_tuned_model_checkpoint: + description: The name of the fine-tuned checkpoint model that is created. + minLength: 1 + type: string + step_number: + format: int32 + description: The step number that the checkpoint was created at. + type: integer + metrics: + title: Dictionary`2 + description: The metrics at the step number during the fine-tuning job. + type: object + additionalProperties: + format: double + type: number + fine_tuning_job_id: + description: The name of the fine-tuning job that this checkpoint was created from.. + minLength: 1 + type: string + FineTuningJobCheckpointList: + title: FineTuningJobCheckpointList + description: Represents a list of checkpoints. + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + data: + description: The list of items. + type: array + items: + $ref: "#/definitions/FineTuningJobCheckpoint" + has_more: + description: A value indicating whether the list contains more elements than returned. + type: boolean + FineTuningJobCreation: + title: FineTuningJobCreation + description: Defines the values of a fine tune job. + required: + - model + - training_file + type: object + properties: + model: + description: The identifier (model-id) of the base model used for this fine-tune. + minLength: 1 + type: string + training_file: + description: The file identity (file-id) that is used for training this fine tuned model. + minLength: 1 + type: string + validation_file: + description: The file identity (file-id) that is used to evaluate the fine tuned model during training. + type: string + hyperparameters: + $ref: "#/definitions/FineTuningHyperParameters" + suffix: + description: The suffix used to identify the fine-tuned model. The suffix can contain up to 40 characters (a-z, A-Z, 0-9,- and _) that will be added to your fine-tuned model name. + type: string + seed: + format: int32 + description: The seed used for the finetuning job. Passing in the same seed and job parameters should produce the same results, but may differ in rare cases. If a seed is not specified, one will be generated for you. + type: integer + integrations: + type: array + items: + $ref: "#/definitions/WandBIntegrationRequestWrapper" + description: "A list configurations for integrations supporting the fine-tuning job.\r\nThere are many integrations planned, so make sure to check and act on the integration type." + FineTuningJobError: + title: FineTuningJobError + description: For fine-tuning jobs that have failed, this will contain more information on the cause of the failure. + type: object + properties: + code: + description: The machine-readable error code.. + type: string + message: + description: The human-readable error message. + type: string + param: + description: The parameter that was invalid, usually training_file or validation_file. This field will be null if the failure was not parameter-specific. + type: string + FineTuningJobEvent: + title: FineTuningJobEvent + required: + - created_at + - level + - message + - type + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + id: + description: The identity of this event. + type: string + readOnly: true + created_at: + format: unixtime + description: A timestamp when this event was created (in unix epochs). + type: integer + level: + $ref: "#/definitions/LogLevel" + message: + description: The message describing the event. This can be a change of state, e.g., enqueued, started, failed or completed, or other events like uploaded results. + minLength: 1 + type: string + type: + $ref: "#/definitions/EventType" + data: + description: Machine readable data of this event. + FineTuningJobEventList: + title: FineTuningJobEventList + description: Represents a list of events. + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + data: + description: The list of items. + type: array + items: + $ref: "#/definitions/FineTuningJobEvent" + has_more: + description: A value indicating whether the list contains more elements than returned. + type: boolean + FineTuningJobList: + title: FineTuningJobList + description: Represents a list of fine tunes. + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + data: + description: The list of items. + type: array + items: + $ref: "#/definitions/FineTuningJob" + has_more: + description: A value indicating whether the list contains more elements than returned. + type: boolean + FineTuningState: + title: FineTuningState + description: The state of a finetunes object or fine tuning job. + enum: + - created + - pending + - running + - succeeded + - cancelled + - failed + type: string + readOnly: true + x-ms-enum: + name: FineTuningState + modelAsString: true + values: + - value: created + description: The operation was created. This state is not returned by Azure OpenAI and exposed only for compatibility. It can be categorized as an inactive state. + - value: pending + description: The operation is not yet queued to be processed in the future. It can be categorized as an inactive state. + - value: running + description: The operation has started to be processed. It can be categorized as an active state. + - value: succeeded + description: The operation has successfully be processed and is ready for consumption. It can be categorized as a terminal state. + - value: cancelled + description: The operation has been cancelled and is incomplete. It can be categorized as a terminal state. + - value: failed + description: The operation has completed processing with a failure and cannot be further consumed. It can be categorized as a terminal state. + GenericEmbeddingSettings: + title: ConnectionEmbeddingSettings + description: Connection Embedding Settings + type: object + properties: + connection: + $ref: "#/definitions/BaseConnection" + deploymentName: + type: string + modelName: + type: string + IngestionError: + title: IngestionError + description: The details of the ingestion error + type: object + properties: + message: + type: string + innerErrors: + type: array + items: + type: string + IngestionJob: + title: IngestionJob + description: Represents the details of a job. + type: object + required: + - kind + discriminator: kind + properties: + kind: + $ref: "#/definitions/IngestionJobType" + jobId: + type: string + IngestionJobList: + title: IngestionJobList + description: Represents a list of ingestion jobs. + type: object + properties: + nextLink: + description: The link to the next page. + type: string + value: + description: The list of items. + type: array + items: + $ref: "#/definitions/IngestionJob" + IngestionJobProgress: + title: IngestionJobProgress + type: object + required: + - stageProgress + properties: + stageProgress: + type: array + items: + $ref: "#/definitions/IngestionJobStageProgress" + IngestionJobRun: + title: IngestionJobRun + description: The details of a job run + type: object + properties: + jobId: + type: string + runId: + type: string + status: + $ref: "#/definitions/OperationState" + error: + $ref: "#/definitions/IngestionError" + warnings: + type: array + items: + type: string + progress: + $ref: "#/definitions/IngestionJobProgress" + IngestionJobRunList: + title: IngestionJobRunList + description: Represents a list of ingestion job runs. + type: object + properties: + nextLink: + description: The link to the next page. + type: string + value: + description: The list of items. + type: array + items: + $ref: "#/definitions/IngestionJobRun" + IngestionJobStageProgress: + title: IngestionJobStageProgress + type: object + properties: + name: + type: string + totalItems: + type: integer + format: int32 + processedItems: + type: integer + format: int32 + state: + $ref: "#/definitions/OperationState" + subStageProgress: + type: array + items: + $ref: "#/definitions/IngestionJobStageProgress" + IngestionJobSystemCompute: + type: object + allOf: + - $ref: "#/definitions/IngestionJob" + - type: object + properties: + searchServiceConnection: + $ref: "#/definitions/BaseConnection" + datasource: + $ref: "#/definitions/SystemComputeDatasource" + completionAction: + $ref: "#/definitions/CompletionAction" + dataRefreshIntervalInHours: + type: integer + x-ms-discriminator-value: SystemCompute + IngestionJobType: + title: IngestionJobType + type: string + description: The job type. + enum: + - SystemCompute + - UserCompute + x-ms-enum: + name: IngestionJobType + modelAsString: true + values: + - name: SystemCompute + value: SystemCompute + description: Jobs that run on service owned resources. + - name: UserCompute + value: UserCompute + description: Jobs that run on user owned workspace. + IngestionJobUserCompute: + type: object + required: + - workspaceId + allOf: + - $ref: "#/definitions/IngestionJob" + - type: object + properties: + workspaceId: + type: string + compute: + $ref: "#/definitions/JobCompute" + target: + $ref: "#/definitions/TargetIndex" + datasource: + $ref: "#/definitions/UserComputeDatasource" + dataRefreshIntervalInHours: + type: integer + x-ms-discriminator-value: UserCompute + InnerError: + title: InnerError + description: "Inner error as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)." + type: object + properties: + code: + $ref: "#/definitions/InnerErrorCode" + innererror: + $ref: "#/definitions/InnerError" + InnerErrorCode: + title: InnerErrorCode + description: "Inner error codes as defined in the Microsoft REST guidelines\r\n(https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md#7102-error-condition-responses)." + enum: + - invalidPayload + type: string + x-ms-enum: + name: InnerErrorCode + modelAsString: true + values: + - value: invalidPayload + description: The request data is invalid for this operation. + IntegrationTypes: + title: IntegrationTypes + enum: + - wandb + type: string + description: List of Fine Tune integrations available. + JobCompute: + title: JobCompute + description: The compute settings of the job. + type: object + discriminator: kind + required: + - kind + properties: + kind: + $ref: "#/definitions/ComputeType" + LifeCycleStatus: + title: LifeCycleStatus + description: "The life cycle status of a model.\r\nNote: A model can be promoted from \"preview\" to \"generally-available\", but never from \"generally-available\" to \"preview\"." + enum: + - preview + - generally-available + type: string + x-ms-enum: + name: LifeCycleStatus + modelAsString: true + values: + - value: preview + description: Model is in preview and covered by the service preview terms. + - value: generally-available + description: Model is generally available. + LogLevel: + title: LogLevel + description: The verbosity level of an event. + enum: + - info + - warning + - error + type: string + x-ms-enum: + name: LogLevel + modelAsString: true + values: + - value: info + description: This event is for information only. + - value: warning + description: This event represents a mitigated issue. + - value: error + description: This message represents a non recoverable issue. + Model: + title: Model + description: A model is either a base model or the result of a successful fine tune job. + required: + - capabilities + - deprecation + - lifecycle_status + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + created_at: + format: unixtime + description: A timestamp when this job or item was created (in unix epochs). + type: integer + readOnly: true + id: + description: The identity of this item. + type: string + readOnly: true + status: + $ref: "#/definitions/FineTuningState" + model: + description: The base model identity (model-id) if this is a fine tune model; otherwise `null`. + type: string + fine_tune: + description: The fine tune job identity (fine-tune-id) if this is a fine tune model; otherwise `null`. + type: string + capabilities: + $ref: "#/definitions/Capabilities" + lifecycle_status: + $ref: "#/definitions/LifeCycleStatus" + deprecation: + $ref: "#/definitions/Deprecation" + ModelList: + title: ModelList + description: Represents a list of models. + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + data: + description: The list of items. + type: array + items: + $ref: "#/definitions/Model" + OperationState: + title: OperationState + description: The state of a job or item. + enum: + - notRunning + - running + - succeeded + - failed + type: string + readOnly: true + x-ms-enum: + name: OperationState + modelAsString: true + values: + - value: notRunning + description: The operation is not yet queued to be processed in the future. + - value: running + description: The operation has started to be processed. + - value: succeeded + description: The operation has successfully be processed and is ready for consumption. + - value: failed + description: The operation has completed processing with a failure and cannot be further consumed. + PineconeIndex: + description: Pinecone Index. + required: + - connectionId + allOf: + - $ref: "#/definitions/TargetIndex" + - type: object + properties: + connectionId: + type: string + description: The id of the connection pointing to the pinecone. + x-ms-discriminator-value: Pinecone + Purpose: + title: Purpose + description: The intended purpose of the uploaded documents. Use "fine-tune" for fine-tuning. This allows us to validate the format of the uploaded file. + enum: + - fine-tune + - fine-tune-results + - assistants + - assistants_output + - batch + - batch_output + type: string + readOnly: true + x-ms-enum: + name: Purpose + modelAsString: true + values: + - value: fine-tune + description: This file contains training data for a fine tune job. + - value: fine-tune-results + description: This file contains the results of a fine tune job. + - value: assistants + description: This file contains data to be used in assistants. + - value: assistants_output + description: This file contains the results of an assistant. + - value: batch + description: This file contains the input data for a batch. + - value: batch_output + description: This file contains the results of a batch. + ServerlessCompute: + description: Serverless compute. + allOf: + - $ref: "#/definitions/JobCompute" + - type: object + properties: + sku: + type: string + description: SKU Level + instanceCount: + type: integer + description: The count of instances to run the job on. + x-ms-discriminator-value: ServerlessCompute + SystemComputeDatasource: + title: SystemComputeDatasource + type: object + required: + - kind + properties: + kind: + $ref: "#/definitions/SystemComputeDatasourceType" + discriminator: kind + SystemComputeDatasourceType: + type: string + description: The datasource type. + enum: + - Storage + - Urls + x-ms-enum: + name: SystemComputeDatasourceType + modelAsString: true + values: + - name: Storage + value: Storage + description: Azure Storage Account. + - name: Urls + value: Urls + description: URLs. + SystemComputeStorage: + title: SystemComputeStorage + description: Storage account + required: + - connection + - containerName + - embeddings + x-ms-discriminator-value: Storage + allOf: + - $ref: "#/definitions/SystemComputeDatasource" + - type: object + properties: + connection: + $ref: "#/definitions/BaseConnection" + containerName: + type: string + description: container name + chunking: + $ref: "#/definitions/ChunkingSettings" + embeddings: + type: array + items: + $ref: "#/definitions/GenericEmbeddingSettings" + SystemComputeUrl: + title: SystemComputeUrl + description: Urls + required: + - urls + - connection + - containerName + - embeddings + x-ms-discriminator-value: Urls + allOf: + - $ref: "#/definitions/SystemComputeDatasource" + - type: object + properties: + urls: + type: array + items: + type: string + connection: + $ref: "#/definitions/BaseConnection" + containerName: + type: string + description: container name + crawling: + $ref: "#/definitions/CrawlingSettings" + chunking: + $ref: "#/definitions/ChunkingSettings" + embeddings: + type: array + items: + $ref: "#/definitions/GenericEmbeddingSettings" + TargetIndex: + title: TargetIndex + description: Information about the index to be created. + type: object + discriminator: kind + required: + - kind + properties: + kind: + $ref: "#/definitions/TargetType" + TargetType: + type: string + description: The target type. + enum: + - AzureAISearch + - CosmosDB + - Pinecone + x-ms-enum: + name: TargetType + modelAsString: true + values: + - name: AzureAISearch + value: AzureAISearch + description: Azure AI Search Index. + - name: CosmosDB + value: CosmosDB + description: CosmosDB Index. + - name: Pinecone + value: Pinecone + description: Pinecone Index. + TypeDiscriminator: + title: TypeDiscriminator + description: Defines the type of an object. + enum: + - list + - fine_tuning.job + - file + - fine_tuning.job.event + - fine_tuning.job.checkpoint + - model + - upload + - upload.part + - batch + type: string + readOnly: true + x-ms-enum: + name: TypeDiscriminator + modelAsString: true + values: + - value: list + description: This object represents a list of other objects. + - value: fine_tuning.job + description: This object represents a fine tune job. + - value: file + description: This object represents a file. + - value: fine_tuning.job.event + description: This object represents an event of a fine tuning job. + - value: fine_tuning.job.checkpoint + description: This object represents a checkpoint of a fine tuning job. + - value: model + description: This object represents a model (can be a base model or fine tune job result). + - value: upload + description: This object represents a file upload. + - value: upload.part + description: This object represents part of a file upload. + - value: batch + description: This object represents a batch. + UploadFileCompleteBody: + title: UploadFileCompleteBody + required: + - part_ids + type: object + properties: + part_ids: + title: IList`1 + type: array + items: + type: string + md5: + type: string + UploadFileStartBody: + title: UploadFileStartBody + required: + - bytes + - filename + - mime_type + - purpose + type: object + properties: + purpose: + $ref: "#/definitions/Purpose" + filename: + minLength: 1 + type: string + bytes: + format: int64 + type: integer + mime_type: + minLength: 1 + type: string + UploadPartResource: + title: UploadPartResource + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + created_at: + format: unixtime + description: A timestamp when this job or item was created (in unix epochs). + type: integer + readOnly: true + id: + description: The identity of this item. + type: string + readOnly: true + upload_id: + type: string + readOnly: true + azure_block_id: + type: string + readOnly: true + UploadResource: + title: UploadResource + type: object + properties: + object: + $ref: "#/definitions/TypeDiscriminator" + created_at: + format: unixtime + description: A timestamp when this job or item was created (in unix epochs). + type: integer + readOnly: true + id: + description: The identity of this item. + type: string + readOnly: true + bytes: + format: int64 + type: integer + readOnly: true + filename: + type: string + readOnly: true + purpose: + $ref: "#/definitions/Purpose" + status: + $ref: "#/definitions/UploadStatus" + expires_at: + format: unixtime + type: integer + readOnly: true + file: + $ref: "#/definitions/File" + UploadStatus: + title: UploadStatus + enum: + - pending + - expired + - completed + - cancelled + type: string + readOnly: true + UserComputeDataset: + type: object + title: UserComputeStorage + description: Storage account + required: + - datasetId + - datasetType + x-ms-discriminator-value: Dataset + allOf: + - $ref: "#/definitions/UserComputeDatasource" + - type: object + properties: + datasetId: + type: string + datasetType: + type: string + chunking: + $ref: "#/definitions/ChunkingSettings" + embeddings: + type: array + items: + $ref: "#/definitions/WorkspaceConnectionEmbeddingSettings" + UserComputeDatasource: + title: UserComputeDatasource + type: object + discriminator: kind + required: + - kind + properties: + kind: + $ref: "#/definitions/UserComputeDatasourceType" + UserComputeDatasourceType: + type: string + description: The datasource type. + enum: + - Dataset + - Urls + x-ms-enum: + name: UserComputeDatasourceType + modelAsString: true + values: + - name: Dataset + value: Dataset + description: Workspace Dataset. + - name: Urls + value: Urls + description: URLs. + UserComputeUrl: + type: object + title: UserComputeUrl + description: Urls + required: + - urls + - embeddings + x-ms-discriminator-value: Urls + allOf: + - $ref: "#/definitions/UserComputeDatasource" + - type: object + properties: + urls: + type: array + items: + type: string + crawling: + $ref: "#/definitions/CrawlingSettings" + chunking: + $ref: "#/definitions/ChunkingSettings" + embeddings: + type: array + items: + $ref: "#/definitions/WorkspaceConnectionEmbeddingSettings" + WandBIntegrationRequest: + title: WandBIntegrationRequest + required: + - project + type: object + properties: + project: + minLength: 1 + type: string + name: + type: string + readOnly: true + entity: + type: string + readOnly: true + tags: + type: array + items: + type: string + readOnly: true + WandBIntegrationRequestWrapper: + title: WandBIntegrationRequestWrapper + required: + - type + - wandb + type: object + properties: + type: + $ref: '#/definitions/IntegrationTypes' + wandb: + $ref: "#/definitions/WandBIntegrationRequest" + WorkspaceConnection: + description: AML Workspace connection. + required: + - connectionId + allOf: + - $ref: "#/definitions/BaseConnection" + - type: object + properties: + connectionId: + type: string + description: ConnectionId + x-ms-discriminator-value: WorkspaceConnection + WorkspaceConnectionEmbeddingSettings: + title: WorkspaceConnectionEmbeddingSettings + description: Connection id to the embedding model + type: object + properties: + connectionId: + type: string + deploymentName: + type: string + modelName: + type: string +parameters: + endpoint: + in: path + name: endpoint + description: 'Supported Cognitive Services endpoints (protocol and hostname, for example: https://aoairesource.openai.azure.com. Replace "aoairesource" with your Azure OpenAI account name).' + required: true + type: string + format: url + x-ms-skip-url-encoding: true + x-ms-parameter-location: client + apiVersionQueryParameter: + in: query + name: api-version + description: The requested API version. + required: true + type: string + x-ms-client-default: 2024-12-01-preview + x-ms-parameter-location: client +security: + - ApiKeyAuth: [] + - OAuth2Auth: + - https://cognitiveservices.azure.com/.default +securityDefinitions: + ApiKeyAuth: + description: API key authentication + type: apiKey + name: api-key + in: header + OAuth2Auth: + description: OAuth2 authentication + type: oauth2 + flow: implicit + authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize + scopes: + https://cognitiveservices.azure.com/.default: "" +schemes: + - https +x-ms-parameterized-host: + hostTemplate: "{endpoint}/openai" + useSchemePrefix: false + parameters: + - $ref: "#/parameters/endpoint" diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_batch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_batch.json new file mode 100644 index 000000000000..a6e3f3523257 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_batch.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "batch-id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "object": "batch", + "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f", + "endpoint": "/chat/completions", + "errors": null, + "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f", + "completion_window": "24h", + "status": "cancelling", + "output_file_id": null, + "error_file_id": null, + "created_at": 1646126127, + "in_progress_at": 1646126130, + "expires_at": 1646126170, + "finalizing_at": null, + "completed_at": null, + "failed_at": null, + "expired_at": null, + "cancelling_at": 1646126138, + "cancelled_at": null, + "request_counts": { + "total": 500, + "completed": 100, + "failed": 5 + }, + "metadata": { + "batch_description": "Evaluation job" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_batch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_batch.yaml new file mode 100644 index 000000000000..90449a3484dc --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_batch.yaml @@ -0,0 +1,33 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + batch-id: batch_72a2792ef7d24ba7b82c7fe4a37e379f +responses: + "200": + headers: {} + body: + object: batch + id: batch_72a2792ef7d24ba7b82c7fe4a37e379f + endpoint: /chat/completions + errors: null + input_file_id: file-b4fa7277f3eb4722ac18b90f46102c3f + completion_window: 24h + status: cancelling + output_file_id: null + error_file_id: null + created_at: 1646126127 + in_progress_at: 1646126130 + expires_at: 1646126170 + finalizing_at: null + completed_at: null + failed_at: null + expired_at: null + cancelling_at: 1646126138 + cancelled_at: null + request_counts: + total: 500 + completed: 100 + failed: 5 + metadata: + batch_description: Evaluation job diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_finetuning_job.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_finetuning_job.json new file mode 100644 index 000000000000..04ff2cbe0df1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_finetuning_job.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "fine-tuning-job-id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "hyperparameters": { + "n_epochs": -1 + }, + "integrations": [ + { + "type": "wandb", + "wandb": { + "project": "custom-wandb-project", + "tags": [ + "project:tag", + "lineage" + ] + } + } + ], + "status": "cancelled", + "model": "curie", + "training_file": "file-181a1cbdcdcf4677ada87f63a0928099", + "finished_at": 1646127311, + "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "fine_tuning.job" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_finetuning_job.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_finetuning_job.yaml new file mode 100644 index 000000000000..1733a3bfdfdb --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/cancel_finetuning_job.yaml @@ -0,0 +1,34 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: '{api key}' + api-version: 2024-12-01-preview + fine-tuning-job-id: ft-72a2792ef7d24ba7b82c7fe4a37e379f +responses: + 200: + headers: {} + body: + hyperparameters: + n_epochs: -1 + suffix: + seed: + integrations: + - type: wandb + wandb: + project: custom-wandb-project + name: + entity: + tags: + - project:tag + - lineage + status: cancelled + model: curie + fine_tuned_model: + training_file: file-181a1cbdcdcf4677ada87f63a0928099 + validation_file: + result_files: + finished_at: 1646127311 + organisation_id: + error: + id: ft-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: fine_tuning.job diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_file.json new file mode 100644 index 000000000000..6a5656605191 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_file.json @@ -0,0 +1,18 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "file-id": "file-181a1cbdcdcf4677ada87f63a0928099" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "object": "file", + "deleted": true, + "id": "file-181a1cbdcdcf4677ada87f63a0928099" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_file.yaml new file mode 100644 index 000000000000..60d894e4637f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_file.yaml @@ -0,0 +1,12 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + file-id: file-181a1cbdcdcf4677ada87f63a0928099 +responses: + 200: + headers: {} + body: + object: file + deleted: true + id: file-181a1cbdcdcf4677ada87f63a0928099 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_finetuning_job.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_finetuning_job.json new file mode 100644 index 000000000000..50a66f236a74 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_finetuning_job.json @@ -0,0 +1,13 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "fine-tuning-job-id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "204": { + "headers": {} + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_finetuning_job.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_finetuning_job.yaml new file mode 100644 index 000000000000..e5c73a737844 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/delete_finetuning_job.yaml @@ -0,0 +1,9 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + fine-tuning-job-id: ft-72a2792ef7d24ba7b82c7fe4a37e379f +responses: + 204: + headers: {} + body: diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batch.json new file mode 100644 index 000000000000..ce810498e866 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batch.json @@ -0,0 +1,41 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "batch-id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "object": "batch", + "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f", + "endpoint": "/chat/completions", + "errors": null, + "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f", + "completion_window": "24h", + "status": "completed", + "output_file_id": "file-f2ddaf43-b48b-46dd-b264-90da10c7a85b", + "error_file_id": "file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c", + "created_at": 1646126127, + "in_progress_at": 1646126130, + "expires_at": 1646126170, + "finalizing_at": 1646126134, + "completed_at": 1646126136, + "failed_at": null, + "expired_at": null, + "cancelling_at": null, + "cancelled_at": null, + "request_counts": { + "total": 500, + "completed": 400, + "failed": 100 + }, + "metadata": { + "batch_description": "Evaluation job" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batch.yaml new file mode 100644 index 000000000000..1519ed44ce52 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batch.yaml @@ -0,0 +1,33 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + batch-id: batch_72a2792ef7d24ba7b82c7fe4a37e379f +responses: + "200": + headers: {} + body: + object: batch + id: batch_72a2792ef7d24ba7b82c7fe4a37e379f + endpoint: /chat/completions + errors: null + input_file_id: file-b4fa7277f3eb4722ac18b90f46102c3f + completion_window: 24h + status: completed + output_file_id: file-f2ddaf43-b48b-46dd-b264-90da10c7a85b + error_file_id: file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c + created_at: 1646126127 + in_progress_at: 1646126130 + expires_at: 1646126170 + finalizing_at: 1646126134 + completed_at: 1646126136 + failed_at: null + expired_at: null + cancelling_at: null + cancelled_at: null + request_counts: + total: 500 + completed: 400 + failed: 100 + metadata: + batch_description: Evaluation job diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batches.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batches.json new file mode 100644 index 000000000000..ade0576319fc --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batches.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "$filter": "created_at gt 1646120000 and created_at lt 1646130000 and status eq 'completed'", + "$orderby": "created_at asc" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "has_more": false, + "data": [ + { + "object": "batch", + "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f", + "endpoint": "/chat/completions", + "errors": null, + "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f", + "completion_window": "24h", + "status": "completed", + "output_file_id": "file-f2ddaf43-b48b-46dd-b264-90da10c7a85b", + "error_file_id": "file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c", + "created_at": 1646126127, + "in_progress_at": 1646126130, + "expires_at": 1646126170, + "finalizing_at": 1646126134, + "completed_at": 1646126136, + "failed_at": null, + "expired_at": null, + "cancelling_at": null, + "cancelled_at": null, + "request_counts": { + "total": 500, + "completed": 400, + "failed": 100 + }, + "first_id": "batch_abc123", + "last_id": "batch_abc456", + "metadata": { + "batch_description": "Evaluation job" + } + } + ], + "object": "list" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batches.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batches.yaml new file mode 100644 index 000000000000..a73a434fa166 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_batches.yaml @@ -0,0 +1,39 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + $filter: created_at gt 1646120000 and created_at lt 1646130000 and status eq 'completed' + $orderby: created_at asc +responses: + "200": + headers: {} + body: + has_more: false + data: + - object: batch + id: batch_72a2792ef7d24ba7b82c7fe4a37e379f + endpoint: /chat/completions + errors: null + input_file_id: file-b4fa7277f3eb4722ac18b90f46102c3f + completion_window: 24h + status: completed + output_file_id: file-f2ddaf43-b48b-46dd-b264-90da10c7a85b + error_file_id: file-c3b563b0-ebc7-47da-93e3-a2fa694aef0c + created_at: 1646126127 + in_progress_at: 1646126130 + expires_at: 1646126170 + finalizing_at: 1646126134 + completed_at: 1646126136 + failed_at: null + expired_at: null + cancelling_at: null + cancelled_at: null + request_counts: + total: 500 + completed: 400 + failed: 100 + first_id: batch_abc123 + last_id: batch_abc456 + metadata: + batch_description: Evaluation job + object: list diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file.json new file mode 100644 index 000000000000..c7ef20159c4f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file.json @@ -0,0 +1,21 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "file-id": "file-181a1cbdcdcf4677ada87f63a0928099" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "bytes": 140, + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file.yaml new file mode 100644 index 000000000000..334055928451 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file.yaml @@ -0,0 +1,16 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + file-id: file-181a1cbdcdcf4677ada87f63a0928099 +responses: + 200: + headers: {} + body: + metadata: + bytes: 140 + purpose: fine-tune + filename: puppy.jsonl + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file_content.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file_content.json new file mode 100644 index 000000000000..9d5cba4bfe24 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file_content.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "file-id": "file-181a1cbdcdcf4677ada87f63a0928099" + }, + "responses": { + "200": { + "headers": {}, + "body": "raw file content" + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file_content.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file_content.yaml new file mode 100644 index 000000000000..61a48f42250d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_file_content.yaml @@ -0,0 +1,9 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + file-id: file-181a1cbdcdcf4677ada87f63a0928099 +responses: + 200: + headers: {} + body: raw file content diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_files.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_files.json new file mode 100644 index 000000000000..11d0c6ca1195 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_files.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "data": [ + { + "bytes": 140, + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + }, + { + "bytes": 32423, + "purpose": "fine-tune-results", + "filename": "results.csv", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + } + ], + "object": "list" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_files.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_files.yaml new file mode 100644 index 000000000000..8312368bf864 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_files.yaml @@ -0,0 +1,24 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview +responses: + 200: + headers: {} + body: + data: + - metadata: + bytes: 140 + purpose: fine-tune + filename: puppy.jsonl + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file + - metadata: + bytes: 32423 + purpose: fine-tune-results + filename: results.csv + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file + object: list diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job.json new file mode 100644 index 000000000000..9b774f9121d8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "fine-tuning-job-id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "hyperparameters": { + "n_epochs": -1 + }, + "integrations": [ + { + "type": "wandb", + "wandb": { + "project": "custom-wandb-project", + "tags": [ + "project:tag", + "lineage" + ] + } + } + ], + "status": "succeeded", + "model": "curie", + "fine_tuned_model": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "training_file": "file-181a1cbdcdcf4677ada87f63a0928099", + "result_files": [ + "file-181a1cbdcdcf4677ada87f63a0928099" + ], + "finished_at": 1646127311, + "trained_tokens": 2342, + "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "fine_tuning.job" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job.yaml new file mode 100644 index 000000000000..9675f7d096e8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job.yaml @@ -0,0 +1,36 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: '{api key}' + api-version: 2024-12-01-preview + fine-tuning-job-id: ft-72a2792ef7d24ba7b82c7fe4a37e379f +responses: + 200: + headers: {} + body: + hyperparameters: + n_epochs: -1 + suffix: + seed: + integrations: + - type: wandb + wandb: + project: custom-wandb-project + name: + entity: + tags: + - project:tag + - lineage + status: succeeded + model: curie + fine_tuned_model: curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f + training_file: file-181a1cbdcdcf4677ada87f63a0928099 + validation_file: + result_files: + - file-181a1cbdcdcf4677ada87f63a0928099 + finished_at: 1646127311 + organisation_id: + trained_tokens: 2342 + error: + id: ft-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: fine_tuning.job diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_checkpoints.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_checkpoints.json new file mode 100644 index 000000000000..36bef0605338 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_checkpoints.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "fine-tuning-job-id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "has_more": false, + "data": [ + { + "id": "ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P", + "created_at": 1646126127, + "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-10", + "step_number": 10, + "metrics": { + "step": 10, + "train_loss": 0.478, + "train_mean_token_accuracy": 0.924, + "valid_loss": 10.112, + "valid_mean_token_accuracy": 0.145, + "full_valid_loss": 0.567, + "full_valid_mean_token_accuracy": 0.944 + }, + "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f", + "object": "fine_tuning.job.checkpoint" + }, + { + "id": "ftckpt_frtXDR2453C4FG67t03MLPs5", + "created_at": 1646126137, + "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-20", + "step_number": 20, + "metrics": { + "step": 20, + "train_loss": 0.355, + "train_mean_token_accuracy": 0.947, + "valid_loss": 11.32, + "valid_mean_token_accuracy": 0.122, + "full_valid_loss": 0.317, + "full_valid_mean_token_accuracy": 0.955 + }, + "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f", + "object": "fine_tuning.job.checkpoint" + }, + { + "id": "ftckpt_agLk6Gio560ORp14gl123fgd", + "created_at": 1646126147, + "fine_tuned_model_checkpoint": "gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-30", + "step_number": 30, + "metrics": { + "step": 30, + "train_loss": 0.155, + "train_mean_token_accuracy": 0.975, + "valid_loss": 9.31, + "valid_mean_token_accuracy": 0.092, + "full_valid_loss": 0.114, + "full_valid_mean_token_accuracy": 0.963 + }, + "fine_tuning_job_id": "ftjob-72a2792ef7d24ba7b82c7fe4a37e379f", + "object": "fine_tuning.job.checkpoint" + } + ], + "object": "list" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_checkpoints.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_checkpoints.yaml new file mode 100644 index 000000000000..c134cd3d8ec0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_checkpoints.yaml @@ -0,0 +1,54 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + fine-tuning-job-id: ftjob-72a2792ef7d24ba7b82c7fe4a37e379f +responses: + 200: + headers: {} + body: + has_more: false + data: + - id: ftckpt_qtZ5Gyk4BLq1SfLFWp3RtO3P + created_at: 1646126127 + fineTunedModelCheckpoint: gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-10 + stepNumber: 10 + metrics: + step: 10 + train_loss: 0.478 + train_mean_token_accuracy: 0.924 + valid_loss: 10.112 + valid_mean_token_accuracy: 0.145 + full_valid_loss: 0.567 + full_valid_mean_token_accuracy: 0.944 + fineTuningJobId: ftjob-72a2792ef7d24ba7b82c7fe4a37e379f + object: fine_tuning.job.checkpoint + - id: ftckpt_frtXDR2453C4FG67t03MLPs5 + created_at: 1646126137 + fineTunedModelCheckpoint: gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-20 + stepNumber: 20 + metrics: + step: 20 + train_loss: 0.355 + train_mean_token_accuracy: 0.947 + valid_loss: 11.32 + valid_mean_token_accuracy: 0.122 + full_valid_loss: 0.317 + full_valid_mean_token_accuracy: 0.955 + fineTuningJobId: ftjob-72a2792ef7d24ba7b82c7fe4a37e379f + object: fine_tuning.job.checkpoint + - id: ftckpt_agLk6Gio560ORp14gl123fgd + created_at: 1646126147 + fineTunedModelCheckpoint: gpt-35-turbo-0613.ft-72a2792ef7d24ba7b82c7fe4a37e379f:ckpt-step-30 + stepNumber: 30 + metrics: + step: 30 + train_loss: 0.155 + train_mean_token_accuracy: 0.975 + valid_loss: 9.31 + valid_mean_token_accuracy: 0.092 + full_valid_loss: 0.114 + full_valid_mean_token_accuracy: 0.963 + fineTuningJobId: ftjob-72a2792ef7d24ba7b82c7fe4a37e379f + object: fine_tuning.job.checkpoint + object: list diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_events.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_events.json new file mode 100644 index 000000000000..b2617b83d29a --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_events.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "fine-tuning-job-id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "has_more": false, + "data": [ + { + "id": "ftevent-363dcd7cb4c74539bc53293c1dceef05", + "created_at": 1646126127, + "level": "info", + "message": "Job enqueued. Waiting for jobs ahead to complete.", + "type": "message", + "object": "fine_tuning.job.event" + }, + { + "id": "ftevent-8c2a44999790437cb3230e543fa2cf0f", + "created_at": 1646126169, + "level": "info", + "message": "Job started.", + "type": "message", + "object": "fine_tuning.job.event" + }, + { + "id": "ftevent-2d47d651d2f3484c8187c88c00078147", + "created_at": 1646126192, + "level": "info", + "message": "Job succeeded.", + "type": "message", + "object": "fine_tuning.job.event" + } + ], + "object": "list" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_events.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_events.yaml new file mode 100644 index 000000000000..e4aed28b2a40 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_job_events.yaml @@ -0,0 +1,33 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + fine-tuning-job-id: ft-72a2792ef7d24ba7b82c7fe4a37e379f +responses: + 200: + headers: {} + body: + has_more: false + data: + - id: ftevent-363dcd7cb4c74539bc53293c1dceef05 + created_at: 1646126127 + level: Info + message: Job enqueued. Waiting for jobs ahead to complete. + type: message + data: + object: fine_tuning.job.event + - id: ftevent-8c2a44999790437cb3230e543fa2cf0f + created_at: 1646126169 + level: Info + message: Job started. + type: message + data: + object: fine_tuning.job.event + - id: ftevent-2d47d651d2f3484c8187c88c00078147 + created_at: 1646126192 + level: Info + message: Job succeeded. + type: message + data: + object: fine_tuning.job.event + object: list diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_jobs.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_jobs.json new file mode 100644 index 000000000000..2f9740a91187 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_jobs.json @@ -0,0 +1,47 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "has_more": false, + "data": [ + { + "hyperparameters": { + "n_epochs": -1 + }, + "integrations": [ + { + "type": "wandb", + "wandb": { + "project": "custom-wandb-project", + "tags": [ + "project:tag", + "lineage" + ] + } + } + ], + "status": "succeeded", + "model": "curie", + "fine_tuned_model": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "training_file": "file-181a1cbdcdcf4677ada87f63a0928099", + "result_files": [ + "file-181a1cbdcdcf4677ada87f63a0928099" + ], + "finished_at": 1646127311, + "trained_tokens": 2342, + "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "fine_tuning.job" + } + ], + "object": "list" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_jobs.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_jobs.yaml new file mode 100644 index 000000000000..3d8fea24de1f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_finetuning_jobs.yaml @@ -0,0 +1,38 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: '{api key}' + api-version: 2024-12-01-preview +responses: + 200: + headers: {} + body: + has_more: false + data: + - hyperparameters: + n_epochs: -1 + suffix: + seed: + integrations: + - type: wandb + wandb: + project: custom-wandb-project + name: + entity: + tags: + - project:tag + - lineage + status: succeeded + model: curie + fine_tuned_model: curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f + training_file: file-181a1cbdcdcf4677ada87f63a0928099 + validation_file: + result_files: + - file-181a1cbdcdcf4677ada87f63a0928099 + finished_at: 1646127311 + organisation_id: + trained_tokens: 2342 + error: + id: ft-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: fine_tuning.job + object: list diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job.json new file mode 100644 index 000000000000..da3e74caf4fa --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "api-version": "2024-12-01-preview", + "job-id": "ingestion-job" + }, + "responses": { + "200": { + "body": { + "kind": "UserCompute", + "jobId": "ingestion-job", + "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev", + "compute": { + "kind": "ServerlessCompute" + }, + "target": { + "kind": "AzureAISearch", + "connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection" + }, + "datasource": { + "kind": "Dataset", + "datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1", + "datasetType": "uri_folder" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job.yaml new file mode 100644 index 000000000000..00d33dadf2ea --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job.yaml @@ -0,0 +1,21 @@ +parameters: + api-version: 2024-12-01-preview + job-id: ingestion-job +responses: + "200": + body: + kind: UserCompute + jobId: ingestion-job + workspaceId: >- + /subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev + compute: + kind: ServerlessCompute + target: + kind: AzureAISearch + connectionId: >- + /subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection + datasource: + kind: Dataset + datasetId: >- + azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1 + datasetType: uri_folder diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job_run.json new file mode 100644 index 000000000000..07437986c44f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job_run.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2024-12-01-preview", + "job-id": "ingestion-job", + "run-id": "5ef7a436-1147-4cbb-82e0-3d502bcc6a7b" + }, + "responses": { + "200": { + "body": { + "jobId": "ingestion-job", + "runId": "5ef7a436-1147-4cbb-82e0-3d502bcc6a7b", + "status": "running", + "progress": { + "stageProgress": [ + { + "name": "Preprocessing", + "totalItems": 14, + "processedItems": 0, + "state": "notRunning" + }, + { + "name": "Indexing", + "state": "notRunning" + } + ] + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job_run.yaml new file mode 100644 index 000000000000..e96e0fd745ba --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_ingestion_job_run.yaml @@ -0,0 +1,18 @@ +parameters: + api-version: 2024-12-01-preview + job-id: ingestion-job + run-id: 5ef7a436-1147-4cbb-82e0-3d502bcc6a7b +responses: + "200": + body: + jobId: ingestion-job + runId: 5ef7a436-1147-4cbb-82e0-3d502bcc6a7b + status: running + progress: + stageProgress: + - name: Preprocessing + totalItems: 14 + processedItems: 0 + state: notRunning + - name: Indexing + state: notRunning diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_base.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_base.json new file mode 100644 index 000000000000..3e375c3a5f31 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_base.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "model-id": "curie" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "status": "succeeded", + "capabilities": { + "fine_tune": true, + "inference": true, + "completion": true, + "chat_completion": false, + "embeddings": false + }, + "lifecycle_status": "generally-available", + "deprecation": { + "fine_tune": 1677662127, + "inference": 1709284527 + }, + "id": "curie", + "created_at": 1646126127, + "object": "model" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_base.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_base.yaml new file mode 100644 index 000000000000..eece35dfcdb7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_base.yaml @@ -0,0 +1,25 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + model-id: curie +responses: + 200: + headers: {} + body: + status: succeeded + model: + fine_tune: + capabilities: + fine_tune: true + inference: true + completion: true + chat_completion: false + embeddings: false + lifecycle_status: generally-available + deprecation: + fine_tune: 1677662127 + inference: 1709284527 + id: curie + created_at: 1646126127 + object: model diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_finetune.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_finetune.json new file mode 100644 index 000000000000..32f9fe925191 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_finetune.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "model-id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "status": "succeeded", + "model": "curie", + "fine_tune": "ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "capabilities": { + "fine_tune": false, + "inference": true, + "completion": true, + "chat_completion": false, + "embeddings": false + }, + "lifecycle_status": "generally-available", + "deprecation": { + "inference": 1709284527 + }, + "id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "model" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_finetune.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_finetune.yaml new file mode 100644 index 000000000000..c3eb11057a62 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_model_finetune.yaml @@ -0,0 +1,24 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + model-id: curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f +responses: + 200: + headers: {} + body: + status: succeeded + model: curie + fine_tune: ft-72a2792ef7d24ba7b82c7fe4a37e379f + capabilities: + fine_tune: false + inference: true + completion: true + chat_completion: false + embeddings: false + lifecycle_status: generally-available + deprecation: + inference: 1709284527 + id: curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: model diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_models.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_models.json new file mode 100644 index 000000000000..df2aa17dbab6 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_models.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "data": [ + { + "status": "succeeded", + "capabilities": { + "fine_tune": true, + "inference": true, + "completion": true, + "chat_completion": false, + "embeddings": false + }, + "lifecycle_status": "generally-available", + "deprecation": { + "fine_tune": 1677662127, + "inference": 1709284527 + }, + "id": "curie", + "created_at": 1646126127, + "object": "model" + }, + { + "status": "succeeded", + "model": "curie", + "fine_tune": "ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "capabilities": { + "fine_tune": false, + "inference": true, + "completion": true, + "chat_completion": false, + "embeddings": false + }, + "lifecycle_status": "generally-available", + "deprecation": { + "inference": 1709284527 + }, + "id": "curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "model" + } + ], + "object": "list" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_models.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_models.yaml new file mode 100644 index 000000000000..90b7db2ba06c --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/get_models.yaml @@ -0,0 +1,41 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview +responses: + 200: + headers: {} + body: + data: + - status: succeeded + model: + fine_tune: + capabilities: + fine_tune: true + inference: true + completion: true + chat_completion: false + embeddings: false + lifecycle_status: generally-available + deprecation: + fine_tune: 1677662127 + inference: 1709284527 + id: curie + created_at: 1646126127 + object: model + - status: succeeded + model: curie + fine_tune: ft-72a2792ef7d24ba7b82c7fe4a37e379f + capabilities: + fine_tune: false + inference: true + completion: true + chat_completion: false + embeddings: false + lifecycle_status: generally-available + deprecation: + inference: 1709284527 + id: curie.ft-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: model + object: list diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/import_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/import_file.json new file mode 100644 index 000000000000..582fc95df520 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/import_file.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "fileImport": { + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "content_url": "https://www.contoso.com/trainingdata/puppy.jsonl" + }, + "content-Type": "application/json" + }, + "responses": { + "201": { + "headers": { + "location": "https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099" + }, + "body": { + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/import_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/import_file.yaml new file mode 100644 index 000000000000..3b1133f5c89d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/import_file.yaml @@ -0,0 +1,47 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + fileImport: + purpose: fine-tune + filename: puppy.jsonl + content_url: &o0 + absolutePath: /trainingdata/puppy.jsonl + absoluteUri: *o0 + localPath: /trainingdata/puppy.jsonl + authority: www.contoso.com + hostNameType: Dns + isDefaultPort: true + isFile: false + isLoopback: false + pathAndQuery: /trainingdata/puppy.jsonl + segments: + - / + - trainingdata/ + - puppy.jsonl + isUnc: false + host: www.contoso.com + port: 443 + query: "" + fragment: "" + scheme: https + originalString: *o0 + dnsSafeHost: www.contoso.com + idnHost: www.contoso.com + isAbsoluteUri: true + userEscaped: false + userInfo: "" + metadata: + Content-Type: application/json +responses: + 201: + headers: + Location: https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099 + body: + metadata: + bytes: + purpose: fine-tune + filename: puppy.jsonl + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_job_runs.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_job_runs.json new file mode 100644 index 000000000000..20b2e32c41c2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_job_runs.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2024-12-01-preview", + "job-id": "ingestion-job" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "jobId": "ingestion-job", + "runId": "f375b912-331c-4fc5-8e9f-2d7205e3e036", + "status": "succeeded" + }, + { + "jobId": "ingestion-job", + "runId": "07f2d192-add7-4202-a2e3-858c2577f4fd", + "status": "failed" + }, + { + "jobId": "ingestion-job", + "runId": "5ef7a436-1147-4cbb-82e0-3d502bcc6a7b", + "status": "running" + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_job_runs.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_job_runs.yaml new file mode 100644 index 000000000000..5f0aba23face --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_job_runs.yaml @@ -0,0 +1,16 @@ +parameters: + api-version: 2024-12-01-preview + job-id: ingestion-job +responses: + "200": + body: + value: + - jobId: ingestion-job + runId: f375b912-331c-4fc5-8e9f-2d7205e3e036 + status: succeeded + - jobId: ingestion-job + runId: 07f2d192-add7-4202-a2e3-858c2577f4fd + status: failed + - jobId: ingestion-job + runId: 5ef7a436-1147-4cbb-82e0-3d502bcc6a7b + status: running diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_jobs.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_jobs.json new file mode 100644 index 000000000000..da0191dfe394 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_jobs.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "api-version": "2024-12-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "jobId": "usercompute-ingestion-job", + "kind": "UserCompute", + "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev" + }, + { + "jobId": "syscompute-ingestion-job", + "kind": "SystemCompute" + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_jobs.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_jobs.yaml new file mode 100644 index 000000000000..65b83c418aca --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/list_ingestion_jobs.yaml @@ -0,0 +1,12 @@ +parameters: + api-version: 2024-12-01-preview +responses: + "200": + body: + value: + - jobId: usercompute-ingestion-job + kind: UserCompute + workspaceId: >- + /subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev + - jobId: syscompute-ingestion-job + kind: SystemCompute diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_batch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_batch.json new file mode 100644 index 000000000000..82f9bd602d1d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_batch.json @@ -0,0 +1,52 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "batchCreateRequest": { + "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f", + "endpoint": "/chat/completions", + "completion_window": "24h", + "metadata": { + "batch_description": "Evaluation job" + } + }, + "content-Type": "application/json" + }, + "responses": { + "201": { + "headers": { + "deployment-enqueued-tokens": 1000, + "deployment-maximum-enqueued-tokens": 5000 + }, + "body": { + "object": "batch", + "id": "batch_72a2792ef7d24ba7b82c7fe4a37e379f", + "endpoint": "/chat/completions", + "errors": null, + "input_file_id": "file-b4fa7277f3eb4722ac18b90f46102c3f", + "completion_window": "24h", + "status": "validating", + "output_file_id": null, + "error_file_id": null, + "created_at": 1646126127, + "in_progress_at": null, + "expires_at": null, + "finalizing_at": null, + "completed_at": null, + "failed_at": null, + "expired_at": null, + "cancelling_at": null, + "cancelled_at": null, + "request_counts": { + "total": 0, + "completed": 0, + "failed": 0 + }, + "metadata": { + "batch_description": "Evaluation job" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_batch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_batch.yaml new file mode 100644 index 000000000000..438ea285de08 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_batch.yaml @@ -0,0 +1,41 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + batchCreateRequest: + input_file_id: file-b4fa7277f3eb4722ac18b90f46102c3f + endpoint: /chat/completions + completion_window: 24h + metadata: + batch_description: Evaluation job + content-Type: application/json +responses: + "201": + headers: + deployment-enqueued-tokens: 1000 + deployment-maximum-enqueued-tokens: 5000 + body: + object: batch + id: batch_72a2792ef7d24ba7b82c7fe4a37e379f + endpoint: /chat/completions + errors: null + input_file_id: file-b4fa7277f3eb4722ac18b90f46102c3f + completion_window: 24h + status: validating + output_file_id: null + error_file_id: null + created_at: 1646126127 + in_progress_at: null + expires_at: null + finalizing_at: null + completed_at: null + failed_at: null + expired_at: null + cancelling_at: null + cancelled_at: null + request_counts: + total: 0 + completed: 0 + failed: 0 + metadata: + batch_description: Evaluation job diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_finetuning_job.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_finetuning_job.json new file mode 100644 index 000000000000..f027761b2bf6 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_finetuning_job.json @@ -0,0 +1,54 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "fineTuningJob": { + "integrations": [ + { + "type": "wandb", + "wandb": { + "project": "custom-wandb-project", + "tags": [ + "project:tag", + "lineage" + ] + } + } + ], + "model": "curie", + "training_file": "file-181a1cbdcdcf4677ada87f63a0928099" + }, + "content-Type": "application/json" + }, + "responses": { + "201": { + "headers": { + "location": "https://aoairesource.openai.azure.com/openai/fine_tuning/jobs/ft-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "body": { + "hyperparameters": { + "n_epochs": -1 + }, + "integrations": [ + { + "type": "wandb", + "wandb": { + "project": "custom-wandb-project", + "tags": [ + "project:tag", + "lineage" + ] + } + } + ], + "status": "pending", + "model": "curie", + "training_file": "file-181a1cbdcdcf4677ada87f63a0928099", + "id": "ft-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "fine_tuning.job" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_finetuning_job.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_finetuning_job.yaml new file mode 100644 index 000000000000..3e4274534d5b --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/post_finetuning_job.yaml @@ -0,0 +1,51 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: '{api key}' + api-version: 2024-12-01-preview + fineTuningJob: + hyperparameters: + suffix: + seed: + integrations: + - type: wandb + wandb: + project: custom-wandb-project + name: + entity: + tags: + - project:tag + - lineage + model: curie + trainingFile: file-181a1cbdcdcf4677ada87f63a0928099 + validationFile: + Content-Type: application/json +responses: + 201: + headers: + Location: https://aoairesource.openai.azure.com/openai/fine_tuning/jobs/ft-72a2792ef7d24ba7b82c7fe4a37e379f + body: + hyperparameters: + n_epochs: -1 + suffix: + seed: + integrations: + - type: wandb + wandb: + project: custom-wandb-project + name: + entity: + tags: + - project:tag + - lineage + status: pending + model: curie + fine_tuned_model: + training_file: file-181a1cbdcdcf4677ada87f63a0928099 + validation_file: + result_files: + finished_at: + organisation_id: + error: + id: ft-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: fine_tuning.job diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_sc.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_sc.json new file mode 100644 index 000000000000..9589df983ab0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_sc.json @@ -0,0 +1,72 @@ +{ + "parameters": { + "api-version": "2024-12-01-preview", + "job-id": "ingestion-job", + "ingestionJob": { + "kind": "SystemCompute", + "searchServiceConnection": { + "kind": "EndpointWithManagedIdentity", + "endpoint": "https://aykame-dev-search.search.windows.net" + }, + "datasource": { + "kind": "Storage", + "connection": { + "kind": "EndpointWithManagedIdentity", + "endpoint": "https://mystorage.blob.core.windows.net/", + "resourceId": "/subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage" + }, + "containerName": "container", + "chunking": { + "maxChunkSizeInTokens": 2048 + }, + "embeddings": [ + { + "connection": { + "kind": "RelativeConnection" + }, + "deploymentName": "Ada" + } + ] + }, + "dataRefreshIntervalInHours": 24, + "completionAction": "keepAllAssets" + } + }, + "responses": { + "200": { + "headers": { + "operation-location": "https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2024-12-01-preview" + }, + "body": { + "kind": "SystemCompute", + "jobId": "ingestion-job", + "searchServiceConnection": { + "kind": "EndpointWithManagedIdentity", + "endpoint": "https://aykame-dev-search.search.windows.net" + }, + "datasource": { + "kind": "Storage", + "connection": { + "kind": "EndpointWithManagedIdentity", + "endpoint": "https://mystorage.blob.core.windows.net/", + "resourceId": "/subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage" + }, + "containerName": "container", + "chunking": { + "maxChunkSizeInTokens": 2048 + }, + "embeddings": [ + { + "connection": { + "kind": "RelativeConnection" + }, + "deploymentName": "Ada" + } + ] + }, + "dataRefreshIntervalInHours": 24, + "completionAction": "keepAllAssets" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_sc.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_sc.yaml new file mode 100644 index 000000000000..ca0c8bab0937 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_sc.yaml @@ -0,0 +1,51 @@ +parameters: + api-version: 2024-12-01-preview + job-id: ingestion-job + ingestionJob: + kind: SystemCompute + searchServiceConnection: + kind: EndpointWithManagedIdentity + endpoint: "https://aykame-dev-search.search.windows.net" + datasource: + kind: Storage + connection: + kind: EndpointWithManagedIdentity + endpoint: "https://mystorage.blob.core.windows.net/" + resourceId: >- + /subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage + containerName: container + chunking: + maxChunkSizeInTokens: 2048 + embeddings: + - connection: + kind: RelativeConnection + deploymentName: Ada + dataRefreshIntervalInHours: 24 + completionAction: keepAllAssets +responses: + "200": + headers: + operation-location: >- + https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2024-12-01-preview + body: + kind: SystemCompute + jobId: ingestion-job + searchServiceConnection: + kind: EndpointWithManagedIdentity + endpoint: "https://aykame-dev-search.search.windows.net" + datasource: + kind: Storage + connection: + kind: EndpointWithManagedIdentity + endpoint: "https://mystorage.blob.core.windows.net/" + resourceId: >- + /subscriptions/1234567-abcd-1234-5678-1234abcd/resourceGroups/my-resource/providers/Microsoft.Storage/storageAccounts/mystorage + containerName: container + chunking: + maxChunkSizeInTokens: 2048 + embeddings: + - connection: + kind: RelativeConnection + deploymentName: Ada + dataRefreshIntervalInHours: 24 + completionAction: keepAllAssets diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_uc.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_uc.json new file mode 100644 index 000000000000..5b4afeb2bc22 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_uc.json @@ -0,0 +1,46 @@ +{ + "parameters": { + "api-version": "2024-12-01-preview", + "job-id": "ingestion-job", + "ingestionJob": { + "kind": "UserCompute", + "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev", + "compute": { + "kind": "ServerlessCompute" + }, + "target": { + "kind": "AzureAISearch", + "connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection" + }, + "datasource": { + "kind": "Dataset", + "datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1", + "datasetType": "uri_folder" + } + } + }, + "responses": { + "200": { + "headers": { + "operation-location": "https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2024-12-01-preview" + }, + "body": { + "kind": "UserCompute", + "jobId": "ingestion-job", + "workspaceId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev", + "compute": { + "kind": "ServerlessCompute" + }, + "target": { + "kind": "AzureAISearch", + "connectionId": "/subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection" + }, + "datasource": { + "kind": "Dataset", + "datasetId": "azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1", + "datasetType": "uri_folder" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_uc.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_uc.yaml new file mode 100644 index 000000000000..a2b0857354dc --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/put_ingestion_job_uc.yaml @@ -0,0 +1,39 @@ +parameters: + api-version: 2024-12-01-preview + job-id: ingestion-job + ingestionJob: + kind: UserCompute + workspaceId: >- + /subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev + compute: + kind: ServerlessCompute + target: + kind: AzureAISearch + connectionId: >- + /subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection + datasource: + kind: Dataset + datasetId: >- + azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1 + datasetType: uri_folder +responses: + "200": + headers: + operation-location: >- + https://aoairesource.openai.azure.com/openai/ingestion/jobs/ingestion-job/runs/72a2792ef7d24ba7b82c7fe4a37e379f?api-version=2024-12-01-preview + body: + kind: UserCompute + jobId: ingestion-job + workspaceId: >- + /subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev + compute: + kind: ServerlessCompute + target: + kind: AzureAISearch + connectionId: >- + /subscriptions/f375b912-331c-4fc5-8e9f-2d7205e3e036/resourceGroups/adrama-copilot-demo/providers/Microsoft.MachineLearningServices/workspaces/adrama-rag-dev/connections/search-connection + datasource: + kind: Dataset + datasetId: >- + azureml://locations/centraluseuap/workspaces/83317fe6-efa6-4e4a-b020-d0edd11ec382/data/PlainText/versions/1 + datasetType: uri_folder diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file.json new file mode 100644 index 000000000000..7b2cd95b1b00 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file.json @@ -0,0 +1,24 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "purpose": "fine-tune", + "content-Type": "multipart/form-data", + "file": "raw file content" + }, + "responses": { + "201": { + "headers": { + "location": "https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099" + }, + "body": { + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file.yaml new file mode 100644 index 000000000000..56e384d441a7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file.yaml @@ -0,0 +1,19 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + purpose: fine-tune + Content-Type: multipart/form-data + file: raw file content +responses: + 201: + headers: + Location: https://aoairesource.openai.azure.com/openai/files/file-181a1cbdcdcf4677ada87f63a0928099 + body: + metadata: + bytes: + purpose: fine-tune + filename: puppy.jsonl + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_cancel.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_cancel.json new file mode 100644 index 000000000000..a26ac8d3ec35 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_cancel.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "upload-id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "bytes": 2097152, + "filename": "training_data_v21.jsonl", + "purpose": "fine-tune", + "status": "cancelled", + "expires_at": 1646133327, + "file": { + "bytes": 140, + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + }, + "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "upload" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_cancel.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_cancel.yaml new file mode 100644 index 000000000000..c66eb69598a4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_cancel.yaml @@ -0,0 +1,25 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + upload-id: fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f +responses: + 200: + headers: {} + body: + bytes: 2097152 + filename: training_data_v21.jsonl + purpose: fine-tune + status: cancelled + expires_at: 1646133327 + file: + metadata: + bytes: 140 + purpose: fine-tune + filename: puppy.jsonl + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file + id: fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: upload diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_complete.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_complete.json new file mode 100644 index 000000000000..c0a0deb66234 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_complete.json @@ -0,0 +1,37 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "upload-id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f", + "body": { + "part_ids": [ + "LnmictL3p0u4LH/ko343nw==", + "LmmictL3p0u4LH/ko343nw==" + ] + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "bytes": 2097152, + "filename": "training_data_v21.jsonl", + "purpose": "fine-tune", + "status": "completed", + "expires_at": 1646133327, + "file": { + "bytes": 140, + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + }, + "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "upload" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_complete.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_complete.yaml new file mode 100644 index 000000000000..acdcca282f1e --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_complete.yaml @@ -0,0 +1,30 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + upload-id: fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f + body: + part_ids: + - LnmictL3p0u4LH/ko343nw== + - LmmictL3p0u4LH/ko343nw== + md5: +responses: + 200: + headers: {} + body: + bytes: 2097152 + filename: training_data_v21.jsonl + purpose: fine-tune + status: completed + expires_at: 1646133327 + file: + metadata: + bytes: 140 + purpose: fine-tune + filename: puppy.jsonl + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file + id: fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: upload diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_part.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_part.json new file mode 100644 index 000000000000..5cefc9bf3fe1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_part.json @@ -0,0 +1,22 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "upload-id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f", + "data": "raw file content", + "content-Type": "multipart/form-data" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "upload_id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f", + "azure_block_id": "LnmictL3p0u4LH/ko343nw==", + "id": "uplprt-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "upload.part" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_part.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_part.yaml new file mode 100644 index 000000000000..cb5e49484689 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_part.yaml @@ -0,0 +1,16 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + upload-id: fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f + data: raw file content + Content-Type: multipart/form-data +responses: + 200: + headers: {} + body: + upload_id: fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f + azure_block_id: LnmictL3p0u4LH/ko343nw== + id: uplprt-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: upload.part diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_start.json b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_start.json new file mode 100644 index 000000000000..0b4579360dc0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_start.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "endpoint": "https://aoairesource.openai.azure.com", + "api-key": "{api key}", + "api-version": "2024-12-01-preview", + "body": { + "purpose": "fine-tune", + "filename": "training_data_v21.jsonl", + "bytes": 2097152, + "mime_type": "application/json" + } + }, + "responses": { + "201": { + "headers": { + "location": "https://aoairesource.openai.azure.com/openai/uploads/runs/fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f" + }, + "body": { + "bytes": 2097152, + "filename": "training_data_v21.jsonl", + "purpose": "fine-tune", + "status": "pending", + "expires_at": 1646133327, + "file": { + "bytes": 140, + "purpose": "fine-tune", + "filename": "puppy.jsonl", + "id": "file-181a1cbdcdcf4677ada87f63a0928099", + "created_at": 1646126127, + "object": "file" + }, + "id": "fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f", + "created_at": 1646126127, + "object": "upload" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_start.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_start.yaml new file mode 100644 index 000000000000..464d5e3d4000 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-12-01-preview/examples/upload_file_start.yaml @@ -0,0 +1,30 @@ +parameters: + endpoint: https://aoairesource.openai.azure.com + api-key: "{api key}" + api-version: 2024-12-01-preview + body: + purpose: fine-tune + filename: training_data_v21.jsonl + bytes: 2097152 + mimeType: application/json +responses: + 201: + headers: + Location: https://aoairesource.openai.azure.com/openai/uploads/runs/fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f + body: + bytes: 2097152 + filename: training_data_v21.jsonl + purpose: fine-tune + status: pending + expires_at: 1646133327 + file: + metadata: + bytes: 140 + purpose: fine-tune + filename: puppy.jsonl + id: file-181a1cbdcdcf4677ada87f63a0928099 + created_at: 1646126127 + object: file + id: fine-tune-72a2792ef7d24ba7b82c7fe4a37e379f + created_at: 1646126127 + object: upload diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/readme.md b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/readme.md index ec2c64450f43..b263be62f7f9 100644 --- a/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/readme.md +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/authoring/readme.md @@ -431,3 +431,23 @@ directive: - suppress: IntegerTypeMustHaveFormat reason: API stewardship board recommend to use format "unixtime" which is not supported by linter at the moment. ``` + +## AzureOpenAI 2024-12-01-preview +These settings apply only when `--tag=release_2024_12_01_preview` is specified on the command line. + +``` yaml $(tag) == 'release_2024_12_01_preview' +input-file: preview/2024-12-01-preview/azureopenai.json +``` + +AutoRest-Linter Suppressions + +``` yaml +# Ignore autorest-linter issues that cannot be resolved without breaking compatibility to existing openai api +directive: + - suppress: DefinitionsPropertiesNamesCamelCase + reason: Existing external API uses property names like n_epochs, created_at, not following naming/casing guidelines from azure. + - suppress: ValidFormats + reason: API stewardship board recommend to use format "unixtime" which is not supported by linter at the moment. + - suppress: IntegerTypeMustHaveFormat + reason: API stewardship board recommend to use format "unixtime" which is not supported by linter at the moment. +``` diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_speech.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_speech.json new file mode 100644 index 000000000000..2adac2aaf7ec --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_speech.json @@ -0,0 +1,18 @@ +{ + "title": "Synthesizes audio from the provided text.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "input": "Hi! What are you going to make?", + "voice": "fable", + "response_format": "mp3" + } + }, + "responses": { + "200": { + "body": "101010101" + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_speech.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_speech.yaml new file mode 100644 index 000000000000..c72e349ea38d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_speech.yaml @@ -0,0 +1,12 @@ +parameters: + api-version: 2024-12-01-preview + body: + input: Hi! What are you going to make? + response_format: mp3 + voice: fable + deployment-id: + endpoint: "{endpoint}" +responses: + "200": + body: "101010101" +title: Synthesizes audio from the provided text. diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_object.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_object.json new file mode 100644 index 000000000000..ec817bc4150b --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_object.json @@ -0,0 +1,15 @@ +{ + "title": "Gets transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "" + }, + "responses": { + "200": { + "body": { + "text": "A structured object when requesting json or verbose_json" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_object.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_object.yaml new file mode 100644 index 000000000000..666424e17cb9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_object.yaml @@ -0,0 +1,9 @@ +parameters: + api-version: 2024-12-01-preview + deployment-id: + endpoint: "{endpoint}" +responses: + "200": + body: + text: A structured object when requesting json or verbose_json +title: Gets transcribed text and associated metadata from provided spoken audio data. diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_text.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_text.json new file mode 100644 index 000000000000..80daf38450ef --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_text.json @@ -0,0 +1,15 @@ +{ + "title": "Gets transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": "---multipart-boundary\nContent-Disposition: form-data; name=\"file\"; filename=\"file.wav\"\nContent-Type: application/octet-stream\n\nRIFF..audio.data.omitted\n---multipart-boundary--" + }, + "responses": { + "200": { + "type": "string", + "example": "plain text when requesting text, srt, or vtt" + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_text.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_text.yaml new file mode 100644 index 000000000000..e6b9b0fa5077 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_transcription_text.yaml @@ -0,0 +1,19 @@ +parameters: + api-version: 2024-12-01-preview + body: '---multipart-boundary + + Content-Disposition: form-data; name="file"; filename="file.wav" + + Content-Type: application/octet-stream + + + RIFF..audio.data.omitted + + ---multipart-boundary--' + deployment-id: + endpoint: "{endpoint}" +responses: + "200": + example: plain text when requesting text, srt, or vtt + type: string +title: Gets transcribed text and associated metadata from provided spoken audio data. diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_object.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_object.json new file mode 100644 index 000000000000..fc92fbc01f40 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_object.json @@ -0,0 +1,16 @@ +{ + "title": "Gets English language transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": "---multipart-boundary\nContent-Disposition: form-data; name=\"file\"; filename=\"file.wav\"\nContent-Type: application/octet-stream\n\nRIFF..audio.data.omitted\n---multipart-boundary--" + }, + "responses": { + "200": { + "body": { + "text": "A structured object when requesting json or verbose_json" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_object.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_object.yaml new file mode 100644 index 000000000000..bc6b7e6355c0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_object.yaml @@ -0,0 +1,21 @@ +parameters: + api-version: 2024-12-01-preview + body: '---multipart-boundary + + Content-Disposition: form-data; name="file"; filename="file.wav" + + Content-Type: application/octet-stream + + + RIFF..audio.data.omitted + + ---multipart-boundary--' + deployment-id: + endpoint: "{endpoint}" +responses: + "200": + body: + text: A structured object when requesting json or verbose_json +title: + Gets English language transcribed text and associated metadata from provided + spoken audio data. diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_text.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_text.json new file mode 100644 index 000000000000..da5a29106773 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_text.json @@ -0,0 +1,15 @@ +{ + "title": "Gets English language transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": "---multipart-boundary\nContent-Disposition: form-data; name=\"file\"; filename=\"file.wav\"\nContent-Type: application/octet-stream\n\nRIFF..audio.data.omitted\n---multipart-boundary--" + }, + "responses": { + "200": { + "type": "string", + "example": "plain text when requesting text, srt, or vtt" + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_text.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_text.yaml new file mode 100644 index 000000000000..cbd7a7474b26 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/audio_translation_text.yaml @@ -0,0 +1,21 @@ +parameters: + api-version: 2024-12-01-preview + body: '---multipart-boundary + + Content-Disposition: form-data; name="file"; filename="file.wav" + + Content-Type: application/octet-stream + + + RIFF..audio.data.omitted + + ---multipart-boundary--' + deployment-id: + endpoint: "{endpoint}" +responses: + "200": + example: plain text when requesting text, srt, or vtt + type: string +title: + Gets English language transcribed text and associated metadata from provided + spoken audio data. diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_run.json new file mode 100644 index 000000000000..3946b75655b4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_run.json @@ -0,0 +1,46 @@ +{ + "title": "Cancels a run that is `in_progress`.\n", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "run_id": "run_abc123" + }, + "responses": { + "200": { + "body": { + "id": "run_abc123", + "object": "thread.run", + "created_at": 1699076126, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "cancelling", + "started_at": 1699076126, + "expires_at": 1699076726, + "cancelled_at": null, + "failed_at": null, + "completed_at": null, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": "You summarize books.", + "tools": [ + { + "type": "file_search" + } + ], + "tool_resources": { + "file_search": { + "vector_store_ids": [ + "vs_123" + ] + } + }, + "metadata": {}, + "usage": null, + "temperature": 1.0, + "top_p": 1.0, + "response_format": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_run.yaml new file mode 100644 index 000000000000..7ac55283f336 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_run.yaml @@ -0,0 +1,35 @@ +title: | + Cancels a run that is `in_progress`. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + run_id: run_abc123 +responses: + "200": + body: + id: run_abc123 + object: thread.run + created_at: 1699076126 + assistant_id: asst_abc123 + thread_id: thread_abc123 + status: cancelling + started_at: 1699076126 + expires_at: 1699076726 + cancelled_at: null + failed_at: null + completed_at: null + last_error: null + model: gpt-4-turbo + instructions: You summarize books. + tools: + - type: file_search + tool_resources: + file_search: + vector_store_ids: + - vs_123 + metadata: {} + usage: null + temperature: 1 + top_p: 1 + response_format: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_vector_store_file_batch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_vector_store_file_batch.json new file mode 100644 index 000000000000..5b741e5e717f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_vector_store_file_batch.json @@ -0,0 +1,27 @@ +{ + "title": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "batch_id": "vsfb_abc123" + }, + "responses": { + "200": { + "body": { + "id": "vsfb_abc123", + "object": "vector_store.file_batch", + "created_at": 1699061776, + "vector_store_id": "vs_abc123", + "status": "cancelling", + "file_counts": { + "in_progress": 12, + "completed": 3, + "failed": 0, + "cancelled": 0, + "total": 15 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_vector_store_file_batch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_vector_store_file_batch.yaml new file mode 100644 index 000000000000..215e203703de --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/cancel_vector_store_file_batch.yaml @@ -0,0 +1,20 @@ +title: Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + batch_id: vsfb_abc123 +responses: + "200": + body: + id: vsfb_abc123 + object: vector_store.file_batch + created_at: 1699061776 + vector_store_id: vs_abc123 + status: cancelling + file_counts: + in_progress: 12 + completed: 3 + failed: 0 + cancelled: 0 + total: 15 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions.json new file mode 100644 index 000000000000..56e58d94c2c7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions.json @@ -0,0 +1,43 @@ +{ + "title": "Creates a completion for the provided prompt, parameters and chosen model.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "system", + "content": "you are a helpful assistant that talks like a pirate" + }, + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!" + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions.yaml new file mode 100644 index 000000000000..504b29691a59 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions.yaml @@ -0,0 +1,45 @@ +title: Creates a completion for the provided prompt, parameters and chosen model. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: system + content: you are a helpful assistant that talks like a pirate + - role: user + content: can you tell me how to care for a parrot? +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: |- + Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy: + + 1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr! + + 2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh! + + 3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands! + + 4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh! + + 5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr! + + 6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag! + + 7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be. + + 8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners. + + So there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' "Yo-ho-ho" for many years to come! Good luck, sailor, and may the wind be at yer back! + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_advanced.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_advanced.json new file mode 100644 index 000000000000..b54c0d093eed --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_advanced.json @@ -0,0 +1,96 @@ +{ + "title": "Creates a completion based on Azure Search vector data, previous assistant message and user-assigned managed identity.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a cat?" + }, + { + "role": "assistant", + "content": "Content of the completion [doc1].", + "context": { + "intent": "cat care" + } + }, + { + "role": "user", + "content": "how about dog?" + } + ], + "data_sources": [ + { + "type": "azure_search", + "parameters": { + "endpoint": "https://your-search-endpoint.search.windows.net/", + "authentication": { + "type": "user_assigned_managed_identity", + "managed_identity_resource_id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resource-name}" + }, + "index_name": "{index name}", + "query_type": "vector", + "embedding_dependency": { + "type": "deployment_name", + "deployment_name": "{embedding deployment name}" + }, + "in_scope": true, + "top_n_documents": 5, + "strictness": 3, + "role_information": "You are an AI assistant that helps people find information.", + "fields_mapping": { + "content_fields_separator": "\\n", + "content_fields": [ + "content" + ], + "filepath_field": "filepath", + "title_field": "title", + "url_field": "url", + "vector_fields": [ + "contentvector" + ] + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Content of the completion [doc1].", + "context": { + "citations": [ + { + "content": "Citation content 2.", + "title": "Citation Title 2", + "filepath": "contoso2.txt", + "url": "https://contoso.blob.windows.net/container/contoso2.txt", + "chunk_id": "0" + } + ], + "intent": "dog care" + } + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_advanced.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_advanced.yaml new file mode 100644 index 000000000000..65bee58e5185 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_advanced.yaml @@ -0,0 +1,63 @@ +title: Creates a completion based on Azure Search vector data, previous assistant message and user-assigned managed identity. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: user + content: can you tell me how to care for a cat? + - role: assistant + content: Content of the completion [doc1]. + context: + intent: cat care + - role: user + content: how about dog? + data_sources: + - type: azure_search + parameters: + endpoint: https://your-search-endpoint.search.windows.net/ + authentication: + type: user_assigned_managed_identity + managed_identity_resource_id: /subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resource-name} + index_name: "{index name}" + query_type: vector + embedding_dependency: + type: deployment_name + deployment_name: "{embedding deployment name}" + in_scope: true + top_n_documents: 5 + strictness: 3 + role_information: You are an AI assistant that helps people find information. + fields_mapping: + content_fields_separator: \n + content_fields: + - content + filepath_field: filepath + title_field: title + url_field: url + vector_fields: + - contentvector +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: Content of the completion [doc1]. + context: + citations: + - content: Citation content 2. + title: Citation Title 2 + filepath: contoso2.txt + url: https://contoso.blob.windows.net/container/contoso2.txt + chunk_id: "0" + intent: dog care + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_image_vector.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_image_vector.json new file mode 100644 index 000000000000..7c8d02a5e929 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_image_vector.json @@ -0,0 +1,58 @@ +{ + "title": "Creates a completion based on Azure Search image vector data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a dog?" + } + ], + "data_sources": [ + { + "type": "azure_search", + "parameters": { + "endpoint": "https://your-search-endpoint.search.windows.net/", + "index_name": "{index name}", + "query_type": "vector", + "fields_mapping": { + "image_vector_fields": [ + "image_vector" + ] + }, + "authentication": { + "type": "api_key", + "key": "{api key}" + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Content of the completion." + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_image_vector.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_image_vector.yaml new file mode 100644 index 000000000000..98a616f39213 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_image_vector.yaml @@ -0,0 +1,36 @@ +title: Creates a completion based on Azure Search image vector data. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: user + content: can you tell me how to care for a dog? + data_sources: + - type: azure_search + parameters: + endpoint: https://your-search-endpoint.search.windows.net/ + index_name: "{index name}" + query_type: vector + fields_mapping: + image_vector_fields: + - image_vector + authentication: + type: api_key + key: "{api key}" +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: Content of the completion. + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_minimum.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_minimum.json new file mode 100644 index 000000000000..47b501f96648 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_minimum.json @@ -0,0 +1,63 @@ +{ + "title": "Creates a completion based on Azure Search data and system-assigned managed identity.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a dog?" + } + ], + "data_sources": [ + { + "type": "azure_search", + "parameters": { + "endpoint": "https://your-search-endpoint.search.windows.net/", + "index_name": "{index name}", + "authentication": { + "type": "system_assigned_managed_identity" + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Content of the completion [doc1].", + "context": { + "citations": [ + { + "content": "Citation content.", + "title": "Citation Title", + "filepath": "contoso.txt", + "url": "https://contoso.blob.windows.net/container/contoso.txt", + "chunk_id": "0" + } + ], + "intent": "dog care" + } + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_minimum.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_minimum.yaml new file mode 100644 index 000000000000..a99876d44dca --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_azure_search_minimum.yaml @@ -0,0 +1,39 @@ +title: Creates a completion based on Azure Search data and system-assigned managed identity. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: user + content: can you tell me how to care for a dog? + data_sources: + - type: azure_search + parameters: + endpoint: https://your-search-endpoint.search.windows.net/ + index_name: "{index name}" + authentication: + type: system_assigned_managed_identity +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: Content of the completion [doc1]. + context: + citations: + - content: Citation content. + title: Citation Title + filepath: contoso.txt + url: https://contoso.blob.windows.net/container/contoso.txt + chunk_id: "0" + intent: dog care + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_cosmos_db.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_cosmos_db.json new file mode 100644 index 000000000000..d3c0302025f6 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_cosmos_db.json @@ -0,0 +1,77 @@ +{ + "title": "Creates a completion for the provided Azure Cosmos DB.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a dog?" + } + ], + "data_sources": [ + { + "type": "azure_cosmos_db", + "parameters": { + "authentication": { + "type": "connection_string", + "connection_string": "mongodb+srv://rawantest:{password}$@{cluster-name}.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" + }, + "database_name": "vectordb", + "container_name": "azuredocs", + "index_name": "azuredocindex", + "embedding_dependency": { + "type": "deployment_name", + "deployment_name": "{embedding deployment name}" + }, + "fields_mapping": { + "content_fields": [ + "content" + ], + "vector_fields": [ + "contentvector" + ] + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Content of the completion [doc1].", + "context": { + "citations": [ + { + "content": "Citation content.", + "title": "Citation Title", + "filepath": "contoso.txt", + "url": "https://contoso.blob.windows.net/container/contoso.txt", + "chunk_id": "0" + } + ], + "intent": "dog care" + } + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_cosmos_db.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_cosmos_db.yaml new file mode 100644 index 000000000000..ba816225d05c --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_cosmos_db.yaml @@ -0,0 +1,49 @@ +title: Creates a completion for the provided Azure Cosmos DB. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: user + content: can you tell me how to care for a dog? + data_sources: + - type: azure_cosmos_db + parameters: + authentication: + type: connection_string + connection_string: mongodb+srv://rawantest:{password}$@{cluster-name}.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000 + database_name: vectordb + container_name: azuredocs + index_name: azuredocindex + embedding_dependency: + type: deployment_name + deployment_name: "{embedding deployment name}" + fields_mapping: + content_fields: + - content + vector_fields: + - contentvector +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: Content of the completion [doc1]. + context: + citations: + - content: Citation content. + title: Citation Title + filepath: contoso.txt + url: https://contoso.blob.windows.net/container/contoso.txt + chunk_id: "0" + intent: dog care + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_elasticsearch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_elasticsearch.json new file mode 100644 index 000000000000..e621a5db2c42 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_elasticsearch.json @@ -0,0 +1,65 @@ +{ + "title": "Creates a completion for the provided Elasticsearch.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a dog?" + } + ], + "data_sources": [ + { + "type": "elasticsearch", + "parameters": { + "endpoint": "https://your-elasticsearch-endpoint.eastus.azurecontainer.io", + "index_name": "{index name}", + "authentication": { + "type": "key_and_key_id", + "key": "{key}", + "key_id": "{key id}" + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Content of the completion [doc1].", + "context": { + "citations": [ + { + "content": "Citation content.", + "title": "Citation Title", + "filepath": "contoso.txt", + "url": "https://contoso.blob.windows.net/container/contoso.txt", + "chunk_id": "0" + } + ], + "intent": "dog care" + } + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_elasticsearch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_elasticsearch.yaml new file mode 100644 index 000000000000..0b80a39f5d27 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_elasticsearch.yaml @@ -0,0 +1,41 @@ +title: Creates a completion for the provided Elasticsearch. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: user + content: can you tell me how to care for a dog? + data_sources: + - type: elasticsearch + parameters: + endpoint: https://your-elasticsearch-endpoint.eastus.azurecontainer.io + index_name: "{index name}" + authentication: + type: key_and_key_id + key: "{key}" + key_id: "{key id}" +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: Content of the completion [doc1]. + context: + citations: + - content: Citation content. + title: Citation Title + filepath: contoso.txt + url: https://contoso.blob.windows.net/container/contoso.txt + chunk_id: "0" + intent: dog care + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_mongo_db.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_mongo_db.json new file mode 100644 index 000000000000..60bf9afd1344 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_mongo_db.json @@ -0,0 +1,80 @@ +{ + "title": "Creates a completion for the provided Mongo DB.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a dog?" + } + ], + "data_sources": [ + { + "type": "mongo_db", + "parameters": { + "authentication": { + "type": "username_and_password", + "username": "", + "password": "" + }, + "endpoint": "", + "app_name": "", + "database_name": "sampledb", + "collection_name": "samplecollection", + "index_name": "sampleindex", + "embedding_dependency": { + "type": "deployment_name", + "deployment_name": "{embedding deployment name}" + }, + "fields_mapping": { + "content_fields": [ + "content" + ], + "vector_fields": [ + "contentvector" + ] + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Content of the completion [doc1].", + "context": { + "citations": [ + { + "content": "Citation content.", + "title": "Citation Title", + "filepath": "contoso.txt", + "url": "https://contoso.blob.windows.net/container/contoso.txt", + "chunk_id": "0" + } + ], + "intent": "dog care" + } + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_mongo_db.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_mongo_db.yaml new file mode 100644 index 000000000000..4c9d7cacb690 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_mongo_db.yaml @@ -0,0 +1,52 @@ +title: Creates a completion for the provided Azure Cosmos DB. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: user + content: can you tell me how to care for a dog? + data_sources: + - type: mongo_db + parameters: + authentication: + type: username_and_password + username: + password: + endpoint: + app_name: + database_name: sampledb + collection_name: samplecollection + index_name: azuredocindex + embedding_dependency: + type: deployment_name + deployment_name: "{embedding deployment name}" + fields_mapping: + content_fields: + - content + vector_fields: + - contentvector +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: Content of the completion [doc1]. + context: + citations: + - content: Citation content. + title: Citation Title + filepath: contoso.txt + url: https://contoso.blob.windows.net/container/contoso.txt + chunk_id: "0" + intent: dog care + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_pinecone.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_pinecone.json new file mode 100644 index 000000000000..cee1eb81ac59 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_pinecone.json @@ -0,0 +1,77 @@ +{ + "title": "Creates a completion for the provided Pinecone resource.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a dog?" + } + ], + "data_sources": [ + { + "type": "pinecone", + "parameters": { + "authentication": { + "type": "api_key", + "key": "{api key}" + }, + "environment": "{environment name}", + "index_name": "{index name}", + "embedding_dependency": { + "type": "deployment_name", + "deployment_name": "{embedding deployment name}" + }, + "fields_mapping": { + "title_field": "title", + "url_field": "url", + "filepath_field": "filepath", + "content_fields": [ + "content" + ], + "content_fields_separator": "\n" + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Content of the completion [doc1].", + "context": { + "citations": [ + { + "content": "Citation content.", + "title": "Citation Title", + "filepath": "contoso.txt", + "url": "https://contoso.blob.windows.net/container/contoso.txt", + "chunk_id": "0" + } + ], + "intent": "dog care" + } + } + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_pinecone.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_pinecone.yaml new file mode 100644 index 000000000000..ef2e5c2830ef --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/chat_completions_pinecone.yaml @@ -0,0 +1,51 @@ +title: Creates a completion for the provided Pinecone resource. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: + body: + messages: + - role: user + content: can you tell me how to care for a dog? + data_sources: + - type: pinecone + parameters: + authentication: + type: api_key + key: "{api key}" + environment: "{environment name}" + index_name: "{index name}" + embedding_dependency: + type: deployment_name + deployment_name: "{embedding deployment name}" + fields_mapping: + title_field: title + url_field: url + filepath_field: filepath + content_fields: + - content + content_fields_separator: |+ + +responses: + "200": + body: + id: chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn + created: 1686676106 + choices: + - index: 0 + finish_reason: stop + message: + role: assistant + content: Content of the completion [doc1]. + context: + citations: + - content: Citation content. + title: Citation Title + filepath: contoso.txt + url: https://contoso.blob.windows.net/container/contoso.txt + chunk_id: "0" + intent: dog care + usage: + completion_tokens: 557 + prompt_tokens: 33 + total_tokens: 590 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/completions.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/completions.json new file mode 100644 index 000000000000..4f5fe9ae45d6 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/completions.json @@ -0,0 +1,38 @@ +{ + "operationId": "GetCompletions", + "title": "Creates a completion for the provided prompt, parameters and chosen model.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "prompt": [ + "tell me a joke about mango" + ], + "max_tokens": 32, + "temperature": 1.0, + "n": 1 + } + }, + "responses": { + "200": { + "body": { + "id": "cmpl-7QmVI15qgYVllxK0FtxVGG6ywfzaq", + "created": 1686617332, + "choices": [ + { + "text": "es\n\nWhat do you call a mango who's in charge?\n\nThe head mango.", + "index": 0, + "finish_reason": "stop", + "logprobs": null + } + ], + "usage": { + "completion_tokens": 20, + "prompt_tokens": 6, + "total_tokens": 26 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_assistant.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_assistant.json new file mode 100644 index 000000000000..1b0f7fb49f12 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_assistant.json @@ -0,0 +1,39 @@ +{ + "title": "Create an assistant with a model and instructions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "body": { + "name": "Math Tutor", + "instructions": "When a customer asks about a specific math problem, use Python to evaluate their query.", + "tools": [ + { + "type": "code_interpreter" + } + ], + "model": "gpt-4-1106-preview" + } + }, + "responses": { + "200": { + "body": { + "id": "asst_4nsG2qgNzimRPE7MazXTXbU7", + "object": "assistant", + "created_at": 1707295707, + "name": "Math Tutor", + "description": null, + "model": "gpt-4-1106-preview", + "instructions": "When a customer asks about a specific math problem, use Python to evaluate their query.", + "tools": [ + { + "type": "code_interpreter" + } + ], + "metadata": {}, + "top_p": 1.0, + "temperature": 1.0, + "response_format": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_assistant.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_assistant.yaml new file mode 100644 index 000000000000..1168181a5ce8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_assistant.yaml @@ -0,0 +1,26 @@ +title: Create an assistant with a model and instructions. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + body: + name: Math Tutor + instructions: When a customer asks about a specific math problem, use Python to evaluate their query. + tools: + - type: code_interpreter + model: gpt-4-1106-preview +responses: + "200": + body: + id: asst_4nsG2qgNzimRPE7MazXTXbU7 + object: assistant + created_at: 1707295707 + name: Math Tutor + description: null + model: gpt-4-1106-preview + instructions: When a customer asks about a specific math problem, use Python to evaluate their query. + tools: + - type: code_interpreter + metadata: {} + top_p: 1 + temperature: 1 + response_format: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_message.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_message.json new file mode 100644 index 000000000000..a2dc963d2a6a --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_message.json @@ -0,0 +1,36 @@ +{ + "title": "Create a message.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "body": { + "role": "user", + "content": "What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces." + } + }, + "responses": { + "200": { + "body": { + "id": "msg_as3XIk1tpVP3hdHjWBGg3uG4", + "object": "thread.message", + "created_at": 1707298421, + "assistant_id": null, + "thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "run_id": null, + "role": "user", + "content": [ + { + "type": "text", + "text": { + "value": "What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces.", + "annotations": [] + } + } + ], + "attachments": [], + "metadata": {} + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_message.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_message.yaml new file mode 100644 index 000000000000..18a3db445847 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_message.yaml @@ -0,0 +1,25 @@ +title: Create a message. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_v7V4csrNOxtNmgcwGg496Smx + body: + role: user + content: What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces. +responses: + "200": + body: + id: msg_as3XIk1tpVP3hdHjWBGg3uG4 + object: thread.message + created_at: 1707298421 + assistant_id: null + thread_id: thread_v7V4csrNOxtNmgcwGg496Smx + run_id: null + role: user + content: + - type: text + text: + value: What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces. + annotations: [] + attachments: [] + metadata: {} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_run.json new file mode 100644 index 000000000000..b95a191179c7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_run.json @@ -0,0 +1,49 @@ +{ + "title": "Create a run.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "body": { + "assistant_id": "asst_abc123" + } + }, + "responses": { + "200": { + "body": { + "id": "run_abc123", + "object": "thread.run", + "created_at": 1699063290, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "queued", + "started_at": 1699063290, + "expires_at": null, + "cancelled_at": null, + "failed_at": null, + "completed_at": 1699063291, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": null, + "incomplete_details": null, + "tools": [ + { + "type": "code_interpreter" + } + ], + "metadata": {}, + "usage": null, + "temperature": 1.0, + "top_p": 1.0, + "max_prompt_tokens": 1000, + "max_completion_tokens": 1000, + "truncation_strategy": { + "type": "auto", + "last_messages": null + }, + "response_format": "auto", + "tool_choice": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_run.yaml new file mode 100644 index 000000000000..5ae50aac92bc --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_run.yaml @@ -0,0 +1,38 @@ +title: Create a run. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + body: + assistant_id: asst_abc123 +responses: + "200": + body: + id: run_abc123 + object: thread.run + created_at: 1699063290 + assistant_id: asst_abc123 + thread_id: thread_abc123 + status: queued + started_at: 1699063290 + expires_at: null + cancelled_at: null + failed_at: null + completed_at: 1699063291 + last_error: null + model: gpt-4-turbo + instructions: null + incomplete_details: null + tools: + - type: code_interpreter + metadata: {} + usage: null + temperature: 1 + top_p: 1 + max_prompt_tokens: 1000 + max_completion_tokens: 1000 + truncation_strategy: + type: auto + last_messages: null + response_format: auto + tool_choice: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread.json new file mode 100644 index 000000000000..a5885f545616 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread.json @@ -0,0 +1,17 @@ +{ + "title": "Creates a thread.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "object": "thread", + "created_at": 1707297136, + "metadata": {} + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread.yaml new file mode 100644 index 000000000000..99a1e07eebd8 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread.yaml @@ -0,0 +1,11 @@ +title: Creates a thread. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview +responses: + "200": + body: + id: thread_v7V4csrNOxtNmgcwGg496Smx + object: thread + created_at: 1707297136 + metadata: {} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread_and_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread_and_run.json new file mode 100644 index 000000000000..4998df44d4a4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread_and_run.json @@ -0,0 +1,54 @@ +{ + "title": "Create a thread and run it in one request.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "body": { + "assistant_id": "asst_abc123", + "thread": { + "messages": [ + { + "role": "user", + "content": "Explain deep learning to a 5 year old." + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "run_abc123", + "object": "thread.run", + "created_at": 1699076792, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "queued", + "started_at": null, + "expires_at": 1699077392, + "cancelled_at": null, + "failed_at": null, + "completed_at": null, + "required_action": null, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": "You are a helpful assistant.", + "tools": [], + "tool_resources": {}, + "metadata": {}, + "temperature": 1.0, + "top_p": 1.0, + "max_completion_tokens": null, + "max_prompt_tokens": null, + "truncation_strategy": { + "type": "auto", + "last_messages": null + }, + "incomplete_details": null, + "usage": null, + "response_format": "auto", + "tool_choice": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread_and_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread_and_run.yaml new file mode 100644 index 000000000000..1363843d0755 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_thread_and_run.yaml @@ -0,0 +1,42 @@ +title: Create a thread and run it in one request. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + body: + assistant_id: asst_abc123 + thread: + messages: + - role: user + content: Explain deep learning to a 5 year old. +responses: + "200": + body: + id: run_abc123 + object: thread.run + created_at: 1699076792 + assistant_id: asst_abc123 + thread_id: thread_abc123 + status: queued + started_at: null + expires_at: 1699077392 + cancelled_at: null + failed_at: null + completed_at: null + required_action: null + last_error: null + model: gpt-4-turbo + instructions: You are a helpful assistant. + tools: [] + tool_resources: {} + metadata: {} + temperature: 1 + top_p: 1 + max_completion_tokens: null + max_prompt_tokens: null + truncation_strategy: + type: auto + last_messages: null + incomplete_details: null + usage: null + response_format: auto + tool_choice: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store.json new file mode 100644 index 000000000000..e9cee884656d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store.json @@ -0,0 +1,28 @@ +{ + "title": "Creates a vector store.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview" + }, + "body": { + "name": "Support FAQ" + }, + "responses": { + "200": { + "body": { + "id": "vs_abc123", + "object": "vector_store", + "created_at": 1699061776, + "name": "Support FAQ", + "bytes": 139920, + "file_counts": { + "in_progress": 0, + "completed": 3, + "failed": 0, + "cancelled": 0, + "total": 3 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store.yaml new file mode 100644 index 000000000000..3fbd30637636 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store.yaml @@ -0,0 +1,20 @@ +title: Creates a vector store. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview +body: + name: Support FAQ +responses: + "200": + body: + id: vs_abc123 + object: vector_store + created_at: 1699061776 + name: Support FAQ + bytes: 139920 + file_counts: + in_progress: 0 + completed: 3 + failed: 0 + cancelled: 0 + total: 3 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file.json new file mode 100644 index 000000000000..1e97f7958a51 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file.json @@ -0,0 +1,24 @@ +{ + "title": "Create a vector store file by attaching a File to a vector store.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "body": { + "file_id": "file-abc123" + } + }, + "responses": { + "200": { + "body": { + "id": "file-abc123", + "object": "vector_store.file", + "created_at": 1699061776, + "usage_bytes": 1234, + "vector_store_id": "vs_abcd", + "status": "completed", + "last_error": null + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file.yaml new file mode 100644 index 000000000000..eebed5105a64 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file.yaml @@ -0,0 +1,17 @@ +title: Create a vector store file by attaching a File to a vector store. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + body: + file_id: file-abc123 +responses: + "200": + body: + id: file-abc123 + object: vector_store.file + created_at: 1699061776 + usage_bytes: 1234 + vector_store_id: vs_abcd + status: completed + last_error: null diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file_batch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file_batch.json new file mode 100644 index 000000000000..6b10c16931cc --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file_batch.json @@ -0,0 +1,30 @@ +{ + "title": "Create a vector store file batch.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "body": { + "file_ids": [ + "file-abc123", + "file-abc456" + ] + } + }, + "responses": { + "200": { + "id": "vsfb_abc123", + "object": "vector_store.file_batch", + "created_at": 1699061776, + "vector_store_id": "vs_abc123", + "status": "in_progress", + "file_counts": { + "in_progress": 1, + "completed": 1, + "failed": 0, + "cancelled": 0, + "total": 0 + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file_batch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file_batch.yaml new file mode 100644 index 000000000000..4d09c306a3a9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/create_vector_store_file_batch.yaml @@ -0,0 +1,22 @@ +title: Create a vector store file batch. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + body: + file_ids: + - file-abc123 + - file-abc456 +responses: + "200": + id: vsfb_abc123 + object: vector_store.file_batch + created_at: 1699061776 + vector_store_id: vs_abc123 + status: in_progress + file_counts: + in_progress: 1 + completed: 1 + failed: 0 + cancelled: 0 + total: 0 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant.json new file mode 100644 index 000000000000..e572cb32d47a --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant.json @@ -0,0 +1,17 @@ +{ + "title": "Deletes an assistant.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "assistant_id": "asst_4nsG2qgNzimRPE7MazXTXbU7" + }, + "responses": { + "200": { + "body": { + "id": "asst_4nsG2qgNzimRPE7MazXTXbU7", + "object": "assistant.deleted", + "deleted": true + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant.yaml new file mode 100644 index 000000000000..27da69c94878 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant.yaml @@ -0,0 +1,11 @@ +title: Deletes an assistant. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + assistant_id: asst_4nsG2qgNzimRPE7MazXTXbU7 +responses: + "200": + body: + id: asst_4nsG2qgNzimRPE7MazXTXbU7 + object: assistant.deleted + deleted: true diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant_file.json new file mode 100644 index 000000000000..c715c6e3219e --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant_file.json @@ -0,0 +1,18 @@ +{ + "title": "Deletes an AssistantFile.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "assistant_id": "asst_diz3BOIsXHMnqNnoMCyO9jlA", + "file_id": "assistant-Vau3gDQ1MfiBJk4flihOxwZX" + }, + "responses": { + "200": { + "body": { + "id": "assistant-Vau3gDQ1MfiBJk4flihOxwZX", + "object": "assistant.file.deleted", + "deleted": true + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant_file.yaml new file mode 100644 index 000000000000..29026c4f78fd --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_assistant_file.yaml @@ -0,0 +1,12 @@ +title: Deletes an AssistantFile. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + assistant_id: asst_diz3BOIsXHMnqNnoMCyO9jlA + file_id: assistant-Vau3gDQ1MfiBJk4flihOxwZX +responses: + "200": + body: + id: assistant-Vau3gDQ1MfiBJk4flihOxwZX + object: assistant.file.deleted + deleted: true diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_message.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_message.json new file mode 100644 index 000000000000..b200dd98ce2b --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_message.json @@ -0,0 +1,18 @@ +{ + "title": "Deletes a message.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "message_id": "msg_abc123" + }, + "responses": { + "200": { + "body": { + "id": "msg_abc123", + "object": "thread.message.deleted", + "deleted": true + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_message.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_message.yaml new file mode 100644 index 000000000000..a8538623fd4f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_message.yaml @@ -0,0 +1,12 @@ +title: Deletes a message. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + message_id: msg_abc123 +responses: + "200": + body: + id: msg_abc123 + object: thread.message.deleted + deleted: true diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_thread.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_thread.json new file mode 100644 index 000000000000..b502d2730179 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_thread.json @@ -0,0 +1,17 @@ +{ + "title": "Deletes a thread.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx" + }, + "responses": { + "200": { + "body": { + "id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "object": "thread.deleted", + "deleted": true + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_thread.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_thread.yaml new file mode 100644 index 000000000000..589a8c57b77c --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_thread.yaml @@ -0,0 +1,11 @@ +title: Deletes a thread. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_v7V4csrNOxtNmgcwGg496Smx +responses: + "200": + body: + id: thread_v7V4csrNOxtNmgcwGg496Smx + object: thread.deleted + deleted: true diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store.json new file mode 100644 index 000000000000..82128ed504cc --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store.json @@ -0,0 +1,17 @@ +{ + "title": "Deletes a vector store.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123 " + }, + "responses": { + "200": { + "body": { + "id": "vs_abc123", + "object": "vector_store.deleted", + "deleted": true + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store.yaml new file mode 100644 index 000000000000..10acf6607304 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store.yaml @@ -0,0 +1,11 @@ +title: Deletes a vector store. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: "vs_abc123 " +responses: + "200": + body: + id: vs_abc123 + object: vector_store.deleted + deleted: true diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store_file.json new file mode 100644 index 000000000000..c0b08e874af1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store_file.json @@ -0,0 +1,18 @@ +{ + "title": "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 endpoint.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "file_id": "file_abc123" + }, + "responses": { + "200": { + "body": { + "id": "file_abc123", + "object": "vector_store.file.deleted", + "deleted": true + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store_file.yaml new file mode 100644 index 000000000000..ac310c3b2cf9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/delete_vector_store_file.yaml @@ -0,0 +1,12 @@ +title: 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 endpoint. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + file_id: file_abc123 +responses: + "200": + body: + id: file_abc123 + object: vector_store.file.deleted + deleted: true diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/embeddings.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/embeddings.json new file mode 100644 index 000000000000..1ecca952a540 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/embeddings.json @@ -0,0 +1,1566 @@ +{ + "title": "Return the embeddings for a given prompt.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "deployment-afa0669ca01e4693ae3a93baf40f26d6", + "body": { + "input": [ + "this is a test" + ] + } + }, + "responses": { + "200": { + "body": { + "data": [ + { + "index": 0, + "embedding": [ + -0.012838088, + -0.007421397, + -0.017617522, + -0.028278312, + -0.018666342, + 0.01737855, + -0.01821495, + -0.006950092, + -0.009937238, + -0.038580645, + 0.010674067, + 0.02412286, + -0.013647936, + 0.013189907, + 0.0021125758, + 0.012406612, + 0.020790534, + 0.00074595667, + 0.008397198, + -0.00535031, + 0.008968075, + 0.014351576, + -0.014086051, + 0.015055214, + -0.022211088, + -0.025198232, + 0.0065186154, + -0.036350243, + 0.009180495, + -0.009698266, + 0.009446018, + -0.008463579, + -0.0040426035, + -0.03443847, + -0.00091273896, + -0.0019217303, + 0.002349888, + -0.021560553, + 0.016515596, + -0.015572986, + 0.0038666942, + -0.00008432463, + 0.0032178196, + -0.020365695, + -0.009631885, + -0.007647093, + 0.0033837722, + -0.026764825, + -0.010501476, + 0.020219658, + 0.024640633, + -0.0066912062, + -0.036456455, + -0.0040923897, + -0.013966565, + 0.017816665, + 0.005366905, + 0.022835068, + 0.0103488, + -0.0010811808, + -0.028942121, + 0.0074280356, + -0.017033368, + 0.0074877786, + 0.021640211, + 0.002499245, + 0.013316032, + 0.0021524043, + 0.010129742, + 0.0054731146, + 0.03143805, + 0.014856071, + 0.0023366117, + -0.0008243692, + 0.022781964, + 0.003038591, + -0.017617522, + 0.0013309394, + 0.0022154662, + 0.00097414135, + 0.012041516, + -0.027906578, + -0.023817508, + 0.013302756, + -0.003003741, + -0.006890349, + 0.0016744611, + 0.023658194, + -0.015851786, + -0.0045305043, + -0.003038591, + 0.017710455, + 0.019237218, + 0.016037652, + -0.022503164, + 0.025795663, + -0.001129307, + 0.032500144, + -0.008178141, + -0.019940857, + -0.009877495, + 0.00018918588, + 0.023060765, + -0.005692172, + -0.018347712, + -0.011039163, + -0.0062066247, + -0.0000524047, + 0.020126723, + -0.0011691356, + -0.015811957, + 0.020086896, + -0.009114114, + -0.03056182, + 0.0029025099, + -0.006591635, + -0.014046223, + -0.01590489, + -0.02307404, + -0.008861865, + -0.004832538, + 0.010030171, + 0.02311387, + -0.012652221, + 0.024906157, + 0.003860056, + -0.01936998, + -0.02957938, + -0.008357369, + -0.0016371218, + 0.027800368, + 0.0077333883, + 0.021626934, + 0.02140124, + -0.030482162, + 0.026406368, + -0.008277712, + 0.012884554, + -0.043784916, + -0.0145639945, + -0.0070297495, + 0.034889862, + -0.00041508878, + -0.010528029, + -0.009572142, + 0.015692472, + 0.037810627, + -0.0022021902, + 0.008662722, + -0.016794397, + 0.0003090866, + -0.0060506295, + 0.015227805, + 0.0006650548, + 0.01842737, + 0.036801632, + -0.002461076, + -0.0029390194, + -0.0057120863, + -0.012486269, + -0.0046831807, + -0.0017474802, + -0.0036210844, + -0.01178263, + 0.017869769, + 0.039111692, + 0.010946229, + 0.018467197, + 0.0027780454, + -0.005851486, + -0.016489044, + 0.03186289, + -0.040333103, + 0.016648358, + -0.006870435, + 0.0072687212, + 0.000002370982, + 0.006465511, + -0.018201673, + -0.00020526254, + -0.025410652, + 0.02010017, + 0.017537864, + 0.022821793, + 0.0064555537, + -0.0012969191, + 0.02157383, + -0.0053536287, + -0.0087622935, + -0.010952868, + 0.017564416, + 0.02185263, + 0.0004733796, + 0.0018337755, + -0.6954606, + -0.011231667, + 0.02748174, + 0.003929756, + 0.0144843375, + 0.045192193, + 0.01898497, + -0.0070363875, + -0.007813046, + 0.017604245, + -0.017790113, + 0.011165286, + -0.0036376796, + -0.014736585, + 0.0016421003, + -0.019144284, + -0.0072222543, + -0.023127146, + 0.006936816, + 0.025198232, + 0.0030219958, + 0.011722887, + -0.004271618, + -0.0011127117, + -0.0051047, + 0.00077333883, + 0.018599961, + 0.0074877786, + 0.010820106, + 0.0033406245, + -0.015055214, + 0.02384406, + 0.006090458, + 0.00891497, + 0.023366116, + -0.011078991, + -0.019582398, + 0.0011566891, + 0.015413672, + 0.01793615, + -0.014736585, + 0.002492607, + 0.027800368, + 0.023923717, + -0.007421397, + 0.0016105693, + 0.011337877, + -0.015041938, + -0.008768932, + -0.003982861, + 0.002884255, + -0.007832959, + 0.0025457118, + -0.0023548664, + -0.0061767534, + -0.016754568, + 0.0006036523, + 0.0105346665, + 0.0055361767, + 0.01478969, + -0.0011251582, + 0.009605332, + -0.0037140178, + -0.017537864, + -0.021733144, + 0.012897831, + -0.024481317, + 0.022290744, + 0.0056523434, + -0.005366905, + 0.0020412162, + 0.013435517, + -0.003408665, + -0.01705992, + 0.029446619, + 0.022011945, + 0.009226961, + -0.003310753, + -0.007939169, + 0.021308305, + 0.0026718357, + 0.002129171, + -0.020047067, + -0.007474502, + 0.021534001, + -0.0110590765, + -0.018374264, + -0.001664504, + -0.003923118, + 0.015387119, + 0.025516862, + 0.0016421003, + -0.017498035, + -0.01825478, + 0.01451089, + -0.008198055, + -0.011656506, + 0.0044242945, + 0.031491153, + 0.01017621, + -0.010408543, + -0.009034456, + -0.0023283141, + 0.012021601, + 0.015639367, + 0.011736163, + 0.007912617, + 0.02031259, + 0.022104878, + -0.02241023, + 0.00041156227, + -0.009817752, + -0.030880447, + -0.0017823302, + 0.0030933553, + -0.04128899, + -0.0007783174, + 0.012393335, + 0.0122273825, + -0.009087561, + 0.022728859, + -0.002884255, + 0.028065892, + 0.0047396044, + 0.008065294, + 0.015519881, + 0.0133956885, + -0.02279524, + -0.011729525, + 0.0037206558, + -0.0046732235, + 0.003587894, + 0.024401661, + -0.013574918, + 0.012685412, + -0.0041620894, + 0.020578114, + 0.007394845, + 0.014139156, + -0.012512821, + -0.021042781, + 0.022423506, + -0.015360567, + 0.004009413, + 0.0104550095, + -0.024799947, + -0.0081449505, + -0.00063850236, + 0.0070231115, + -0.0009633545, + -0.015705748, + -0.0028942123, + -0.008815398, + 0.007461226, + -0.014417957, + -0.012931022, + 0.0015674217, + -0.02506547, + -0.0063128346, + -0.013422241, + -0.0058614435, + -0.0006007482, + -0.015002109, + 0.0037040606, + -0.008410474, + -0.0016089098, + -0.018653065, + 0.020538285, + -0.016980262, + -0.042244878, + -0.017498035, + 0.006727716, + -0.01877255, + 0.008987989, + 0.00077665783, + -0.0007119364, + -0.0067243967, + 0.0038467797, + -0.018055636, + -0.01440468, + 0.007534245, + 0.0051212953, + 0.002741536, + 0.011523744, + -0.0018603279, + 0.023684746, + 0.016196968, + 0.01731217, + -0.01992758, + 0.009372999, + -0.01982137, + 0.001150051, + -0.014417957, + 0.005672258, + -0.015785405, + 0.0049387473, + -0.0051445286, + 0.012632307, + 0.0011666464, + 0.024587527, + 0.04259006, + -0.0025672857, + 0.02311387, + -0.014524166, + 0.0013848739, + -0.04105002, + -0.010089914, + -0.009087561, + 0.015440224, + 0.009207047, + 0.0128048975, + -0.030216638, + -0.02549031, + 0.00499849, + 0.02737553, + 0.024985814, + -0.015055214, + 0.007580712, + -0.003979542, + 0.0016304837, + 0.0010446712, + 0.0033373055, + 0.0066314633, + -0.011948583, + -0.021281753, + 0.012161002, + 0.030747686, + 0.03555367, + 0.023751127, + -0.03159736, + -0.0110590765, + 0.015758853, + -0.0012197511, + -0.0023249951, + -0.0007488608, + 0.0074877786, + 0.01643594, + -0.008098484, + 0.03730613, + -0.0010056724, + -0.000034798173, + 0.011702972, + 0.039563086, + -0.012280487, + 0.027747264, + 0.018387541, + 0.033057746, + -0.004835857, + -0.00471969, + 0.025450481, + -0.0051146573, + 0.014603823, + 0.00022258384, + 0.00060863094, + 0.015665919, + -0.021626934, + -0.013674489, + 0.0062066247, + 0.018560132, + 0.031942543, + 0.012054792, + 0.004902238, + 0.0028510645, + -0.027667606, + 0.009817752, + -0.002580562, + 0.0069036256, + 0.020047067, + -0.009704905, + -0.012619031, + -0.0056755766, + -0.0036443176, + 0.019383255, + 0.0030701219, + 0.024972538, + 0.009100837, + 0.026353262, + 0.012758431, + 0.029074885, + 0.021202097, + -0.0038102702, + -0.032048754, + 0.003996137, + 0.0029738694, + 0.0032277768, + -0.026127568, + -0.02213143, + 0.0028742978, + 0.0010637557, + 0.000580419, + 0.0021789568, + 0.00083764544, + 0.026924139, + -0.03265946, + 0.0059211864, + 0.021892458, + 0.01178263, + 0.0018188398, + 0.009718181, + -0.020047067, + 0.017989255, + 0.0046035233, + -0.010561219, + -0.010342162, + 0.009505761, + -0.018334435, + -0.00667793, + -0.024534423, + 0.00035347888, + 0.00082561385, + -0.006143563, + 0.016820949, + -0.0013500239, + -0.0069832825, + 0.015347291, + -0.005094743, + 0.001838754, + 0.017073197, + 0.02521151, + 0.006209944, + -0.015612815, + -0.009744733, + -0.019794818, + 0.007786493, + 0.037624758, + 0.017564416, + 0.0076802834, + 0.0026203906, + 0.0022403593, + -0.024560975, + -0.04062518, + -0.016581977, + 0.00789934, + 0.0099305995, + 0.006996559, + 0.011078991, + 0.016236795, + -0.0068969876, + 0.01374087, + 0.014922452, + -0.0042882133, + 0.00022901449, + -0.0006692036, + 0.001359981, + -0.00007581957, + 0.0042616613, + 0.0066381013, + 0.012512821, + 0.021534001, + 0.0032775626, + 0.016913882, + -0.00789934, + -0.009200408, + -0.020286039, + -0.017033368, + 0.014378128, + 0.009233599, + 0.0070828544, + -0.013229736, + 0.025928425, + -0.011862287, + 0.008383922, + 0.012632307, + -0.0003097089, + 0.007593988, + 0.0059079104, + -0.0026369859, + -0.0262205, + 0.003335646, + -0.0067609064, + -0.0042882133, + 0.008549875, + -0.007600626, + -0.012592479, + 0.028623493, + -0.0030502076, + -0.006989921, + -0.015785405, + 0.010050085, + 0.016714739, + -0.023724575, + -0.006346025, + -0.014245366, + -0.032154962, + -0.03388087, + -0.024308728, + -0.002461076, + -0.003733932, + -0.02195884, + -0.021069333, + -0.022144707, + -0.007872788, + -0.017179407, + -0.009034456, + -0.010893124, + -0.02478667, + -0.020153277, + -0.023976821, + 0.014656927, + 0.0005368565, + -0.015878338, + 0.010123105, + -0.0030717815, + 0.01555971, + 0.0018321159, + -0.036244035, + 0.00017176087, + -0.013375774, + -0.010375353, + 0.026512576, + 0.016581977, + 0.013847079, + 0.015719024, + 0.013223098, + 0.004975257, + -0.0010579474, + -0.0034385365, + -0.029048331, + 0.017298892, + -0.022529716, + 0.008463579, + -0.014723309, + -0.005814977, + -0.009027818, + -0.009738095, + -0.0104682855, + -0.005044957, + 0.007905979, + 0.011656506, + 0.003153098, + -0.0005231654, + 0.019954132, + -0.021985391, + -0.005307162, + 0.0021839354, + -0.025184957, + 0.013926737, + -0.0059908866, + 0.0065717204, + 0.009884133, + -0.0062298584, + 0.03388087, + 0.0028577026, + -0.015931444, + 0.0010986058, + -0.025808938, + 0.0022835068, + 0.014152432, + 0.015227805, + 0.013701041, + -0.007872788, + -0.030614924, + -0.026393091, + 0.0010753724, + -0.016940435, + 0.013647936, + -0.007408121, + -0.024308728, + -0.031915992, + -0.018161846, + 0.00072521257, + 0.028862465, + 0.012234021, + -0.019555846, + -0.027641054, + -0.00082810316, + -0.0019150922, + -0.016276624, + -0.01125822, + -0.034146395, + -0.015294186, + 0.006671292, + -0.015533158, + 0.013674489, + -0.0011766035, + -0.017325444, + -0.023233354, + -0.013189907, + 0.0005580154, + -0.03188944, + -0.007056302, + -0.0059942054, + 0.03411984, + 0.04317421, + 0.029420065, + 0.006488744, + -0.0022436783, + 0.013063784, + 0.00012207884, + 0.008118398, + -0.023246631, + 0.0051909955, + -0.00894816, + 0.0081316745, + 0.0023200165, + 0.011510468, + -0.0005770999, + 0.00016979019, + 0.010129742, + 0.015506605, + -0.0073815687, + 0.0031995648, + -0.026578957, + -0.016674912, + 0.0049652997, + 0.0072687212, + -0.016568702, + -0.001964878, + -0.015692472, + -0.0048955996, + 0.027773816, + 0.012864641, + 0.01594472, + 0.008244522, + 0.017139578, + -0.01772373, + -0.0012521119, + 0.011689696, + 0.0111121815, + -0.0036476366, + 0.0012570905, + -0.007826322, + -0.016754568, + 0.011948583, + -0.0045968853, + 0.023963546, + -0.0052739717, + 0.014656927, + 0.009731457, + 0.010727172, + -0.01705992, + -0.0026071144, + 0.010760362, + 0.000919377, + -0.006365939, + -0.03013698, + -0.010554581, + -0.018613236, + 0.013886908, + 0.029420065, + -0.013030593, + 0.016860778, + -0.019237218, + -0.022118153, + 0.007919255, + -0.0004003605, + 0.046546366, + 0.01349526, + 0.006352663, + 0.014258642, + 0.0031813101, + -0.027017072, + 0.0070828544, + -0.020219658, + 0.0037140178, + 0.023366116, + 0.040386207, + -0.016382834, + -0.0023681426, + 0.0064522345, + 0.016528873, + 0.0006804054, + -0.02891557, + -0.0043545947, + 0.01101261, + -0.0014778073, + -0.018055636, + -0.0077001974, + -0.0358723, + 0.003373815, + -0.00071940426, + -0.011822458, + -0.024295451, + -0.009791199, + -0.026565682, + 0.020989677, + -0.035155386, + 0.01832116, + 0.014776413, + -0.028012788, + -0.007262083, + 0.0030402504, + -0.029446619, + 0.00010174965, + 0.009758009, + 0.03767786, + -0.0154535, + 0.009346447, + 0.016077481, + 0.0041189417, + -0.027800368, + 0.01720596, + -0.011158649, + 0.027800368, + -0.03003077, + -0.0072819972, + 0.0014296811, + 0.0145374425, + 0.0043280423, + -0.017086472, + -0.01611731, + -0.01258584, + -0.016927158, + 0.007607264, + 0.018825656, + 0.011331239, + -0.0057784673, + 0.001569911, + -0.013900184, + -0.014776413, + -0.0050814664, + -0.0012454737, + -0.0115967635, + -0.017458206, + -0.013203184, + -0.0063692583, + -0.01244644, + 0.011882202, + 0.0007708495, + -0.02035242, + 0.016250072, + 0.018414093, + -0.029526275, + 0.012751793, + -0.01555971, + 0.0013840442, + -0.019502742, + 0.0063758963, + 0.0037538463, + -0.035686433, + 0.027534844, + -0.016409386, + -0.03247359, + -0.008782208, + -0.0059842486, + 0.014338299, + 0.009233599, + -0.0053171194, + 0.006160158, + 0.0072952732, + 0.01401967, + 0.008815398, + -0.023790956, + 0.013096974, + -0.0031365028, + 0.005044957, + 0.0005356118, + -0.009379637, + 0.0066248253, + -0.00010724682, + 0.010289057, + 0.008815398, + -0.02279524, + -0.019701885, + -0.0027747264, + 0.016183691, + -0.014205537, + -0.003933075, + -0.013375774, + -0.005751915, + -0.010116466, + 0.004988533, + -0.005904591, + -0.008656085, + -0.017431654, + -0.011988411, + -0.01594472, + 0.00660823, + -0.027216217, + 0.0073218257, + -0.029977666, + -0.004593566, + -0.026671892, + -0.028517283, + -0.0050084474, + 0.009844304, + 0.025729282, + -0.013780698, + -0.026751548, + 0.004905557, + -0.035951957, + -0.026738273, + -0.019768266, + 0.0048690476, + 0.005250738, + 0.0014603822, + -0.018892037, + 0.017683903, + 0.0067177587, + 0.027694158, + -0.002618731, + -0.012419888, + 0.01772373, + -0.0032593077, + 0.006611549, + 0.016648358, + -0.03789028, + -0.023100592, + 0.023684746, + 0.0031248862, + 0.016382834, + 0.019967409, + -0.008941523, + -0.02014, + 0.0073882067, + 0.011357792, + -0.0031796505, + -0.0030253148, + -0.0010206081, + -0.017577693, + -0.009598695, + 0.002915786, + 0.001325131, + -0.0029207645, + -0.010780277, + -0.00325101, + -0.00811176, + -0.00073434, + -0.030083876, + -0.012864641, + -0.012745155, + -0.011769353, + 0.018785827, + -0.008264436, + -0.002675155, + 0.024255622, + 0.005483072, + -0.018480474, + -0.005426648, + 0.015095043, + 0.00044392303, + 0.011271496, + -0.0027548121, + 0.0026884312, + -0.00894816, + -0.015161424, + -0.014975557, + -0.024600804, + 0.004457485, + -0.015519881, + -0.012366783, + -0.012579202, + 0.01478969, + 0.0075541595, + -0.017962702, + -0.0017441611, + -0.014059499, + 0.005499667, + -0.0026884312, + 0.0031929268, + 0.0010853296, + -0.008045379, + 0.017471483, + 0.02590187, + -0.018546855, + -0.007826322, + 0.009333171, + 0.0157323, + 0.000086036016, + 0.004776114, + 0.22155327, + 0.006787459, + -0.0017823302, + 0.024919434, + 0.0023449094, + 0.03210186, + 0.0047329664, + -0.010879848, + 0.0044342517, + 0.015334014, + 0.029499723, + 0.019715162, + -0.008569789, + -0.0018901994, + -0.0077400263, + -0.019210665, + -0.005088105, + -0.023153698, + -0.032739118, + -0.029313855, + 0.00082146504, + -0.0212552, + 0.0044309325, + -0.005446562, + 0.018613236, + -0.009751371, + -0.013023955, + -0.001996409, + 0.01915756, + 0.017431654, + -0.031092867, + -0.0070231115, + 0.025330994, + -0.00018099198, + -0.025131851, + -0.011025886, + 0.0116498675, + -0.02506547, + 0.029234199, + -0.012287126, + 0.0069766445, + 0.0018752636, + 0.014271918, + 0.005108019, + -0.0109064, + 0.014391404, + 0.0062597296, + -0.031411495, + 0.00014935728, + 0.013236375, + -0.02891557, + -0.0006671292, + 0.008662722, + 0.012161002, + 0.020963125, + -0.0133691365, + 0.02653913, + -0.017989255, + 0.007978998, + 0.0093398085, + -0.02024621, + 0.03265946, + -0.02846418, + 0.025397375, + -0.024693737, + -0.0027050264, + -0.019330151, + -0.0104417335, + 0.015626092, + -0.006541849, + 0.004653309, + -0.025118576, + 0.0038268655, + 0.004045923, + -0.017564416, + -0.02444149, + 0.030296294, + 0.028756255, + 0.03927101, + 0.010767001, + -0.012034878, + -0.007122683, + -0.022476612, + -0.034942966, + -0.028411074, + -0.03927101, + -0.0037505273, + -0.0038799702, + -0.00037111135, + -0.009718181, + -0.013455432, + -0.015400395, + -0.0066978442, + -0.010760362, + 0.015121595, + 0.03111942, + 0.007992274, + 0.0270569, + -0.003104972, + 0.010056724, + -0.018414093, + 0.006472149, + 0.021281753, + 0.0043579135, + -0.00021490853, + 0.0008546556, + -0.01269205, + -0.003936394, + 0.0008870163, + 0.0009816092, + 0.0054664765, + -0.031278733, + 0.017245788, + 0.00027734818, + 0.005161124, + 0.0048093046, + -0.003923118, + -0.027149836, + 0.006950092, + -0.00615352, + 0.014205537, + 0.0016620146, + 0.0047396044, + 0.0039994563, + -0.015440224, + -0.0055627287, + -0.026273604, + 0.0013276202, + 0.0021009592, + -0.034810204, + 0.0064522345, + 0.00042608313, + 0.02307404, + -0.005957696, + 0.0016869075, + -0.0032775626, + -0.009041094, + -0.01227385, + -0.04349284, + 0.015652644, + 0.013468708, + -0.0023249951, + -0.011171925, + 0.0030352718, + -0.0061203293, + -0.023153698, + 0.046068422, + -0.005582643, + -0.02405648, + 0.005433286, + -0.02814555, + -0.0036874653, + 0.0067841397, + 0.006628144, + 0.029844904, + -0.0044276137, + -0.029127989, + -0.04548427, + 0.022091601, + 0.0038069512, + -0.030269742, + 0.0051578046, + 0.043572497, + -0.0144843375, + -0.02891557, + -0.010461648, + -0.17375894, + 0.029154541, + 0.019648781, + -0.00038335036, + 0.0029572742, + -0.0026469429, + 0.035925403, + -0.012021601, + 0.0015566348, + -0.0033124126, + 0.0010430117, + -0.010620962, + -0.022582822, + 0.00601412, + 0.008364008, + -0.0016586956, + -0.0011102224, + -0.013860356, + 0.022542993, + 0.020564837, + 0.018414093, + -0.008908332, + 0.032951534, + -0.011908754, + 0.010169571, + -0.011198477, + 0.0029108075, + 0.033084296, + 0.0029008503, + -0.0010015236, + -0.019794818, + 0.005844848, + 0.011669782, + 0.0052208668, + 0.010129742, + 0.0037737607, + 0.02880936, + -0.018599961, + -0.015095043, + 0.026578957, + 0.019662056, + 0.006823968, + -0.00045885876, + -0.019396532, + -0.0047993474, + 0.017192682, + 0.039589636, + -0.00874238, + 0.02146762, + -0.007667007, + 0.018785827, + -0.012758431, + -0.010010257, + -0.02052501, + 0.016090758, + 0.0061867107, + -0.0145507185, + 0.008065294, + 0.0104284575, + -0.0022386997, + -0.008324179, + -0.021640211, + 0.01705992, + -0.010541305, + -0.01639611, + -0.0074413116, + -0.034703992, + 0.007016473, + -0.003083398, + 0.0013691084, + -0.005108019, + -0.007886064, + 0.00053270767, + -0.018865485, + 0.025503585, + 0.005101381, + -0.027534844, + 0.015028661, + -0.009286704, + 0.006233177, + 0.00004343289, + 0.036031615, + 0.00957878, + 0.019250493, + 0.0024411618, + 0.0023664832, + -0.0030269742, + -0.007939169, + 0.0058581247, + 0.00587472, + 0.036589216, + -0.035288148, + -0.012997403, + -0.0110989055, + -0.002492607, + 0.008151589, + -0.008085207, + -0.00734174, + -0.0016802694, + 0.008403837, + -0.007793131, + -0.003913161, + -0.025437204, + 0.027123282, + 0.019330151, + -0.008729103, + 0.003943032, + 0.010289057, + 0.029977666, + 0.0014836156, + -0.024282174, + -0.0024361832, + 0.0110325245, + 0.021719867, + 0.012844726, + 0.015002109, + 0.020737428, + -0.013037231, + 0.014802966, + -0.0027332383, + 0.041634172, + -0.00926679, + -0.018759275, + 0.018666342, + 0.005386819, + -0.008822037, + -0.068399, + -0.054804165, + 0.027800368, + 0.04954679, + -0.00437119, + 0.029127989, + 0.03180978, + 0.021321582, + -0.022503164, + 0.010554581, + -0.006823968, + -0.021387963, + -0.021865906, + -0.0074479496, + 0.0037206558, + 0.004132218, + 0.01073381, + -0.0021673401, + -0.0012819833, + 0.041235887, + -0.010202762, + 0.004839176, + 0.0081715025, + -0.030402504, + -0.023764404, + -0.010800191, + -0.018374264, + 0.033641897, + 0.005416691, + -0.0055096243, + -0.0032775626, + -0.018095464, + 0.008563151, + -0.02339267, + -0.013674489, + 0.0023382711, + -0.028411074, + -0.0024063117, + 0.026658615, + -0.012413249, + 0.009333171, + 0.026446195, + -0.009107475, + -0.024560975, + 0.0011085629, + -0.02395027, + 0.0013857037, + 0.01926377, + -0.0020710877, + -0.031278733, + -0.015095043, + 0.0041720467, + -0.012798259, + 0.010162933, + 0.0063128346, + -0.010972782, + 0.045617033, + 0.016874054, + -0.010368714, + -0.0055992384, + -0.0092999805, + 0.0015782086, + -0.013581555, + 0.017843217, + -0.01615714, + 0.0036575939, + -0.027110007, + -0.013621384, + 0.022197811, + 0.0013964906, + -0.007348378, + 0.0145772705, + -0.003996137, + 0.0008364008, + -0.03411984, + 0.013030593, + -0.021454344, + -0.05034336, + 0.021095887, + -0.0055029863, + -0.025623072, + -0.023525432, + 0.007335102, + -0.043413185, + 0.016316453, + 0.016196968, + 0.0093132565, + -0.0110989055, + 0.0154535, + -0.045218747, + 0.0037737607, + 0.01639611, + 0.019887751, + -0.023366116, + -0.024043202, + 0.014258642, + 0.004271618, + -0.006877073, + 0.021387963, + -0.0019781543, + -0.036350243, + -0.009114114, + -0.037359234, + 0.01919739, + 0.011829097, + -0.015665919, + -0.0015591241, + 0.0144843375, + -0.003139822, + -0.024083031, + -0.015307462, + -0.0040990277, + -0.013223098, + 0.0024278855, + -0.008702551, + -0.0033207103, + -0.009804476, + -0.010554581, + 0.031066315, + 0.0044408897, + 0.025370823, + 0.009406189, + 0.025583243, + -0.002066109, + 0.015267633, + 0.008337456, + -0.009426104, + 0.01590489, + -0.011716249, + 0.007713474, + -0.029552827, + -0.013900184, + 0.0050150855, + -0.01650232, + -0.0015757193, + 0.008549875, + -0.020471904, + 0.008397198, + -0.013136802, + 0.021520725, + 0.0060406723, + 0.012858002, + -0.004723009, + -0.029313855, + 0.009240237, + -0.0212552, + -0.028118998, + 0.017803388, + -0.0314646, + 0.012353507, + 0.029632485, + -0.000016128512, + 0.016966987, + 0.009711542, + -0.037253026, + -0.015095043, + 0.013442155, + -0.00905437, + -0.000982439, + -0.0020495139, + 0.008337456, + -0.020644495, + 0.042085562, + -0.000744712, + 0.021135716, + -0.0072886352, + 0.01643594, + 0.013767422, + -0.0044707614, + -0.014763137, + 0.018852208, + -0.03080079, + -0.0049188333, + 0.0058846767, + 0.008330817, + 0.008257798, + 0.024202518, + 0.02307404, + 0.011065715, + 0.00036053188, + -0.00049412367, + 0.036270585, + 0.027043626, + 0.011902116, + -0.027773816, + 0.013289479, + 0.018374264, + -0.0033157317, + 0.0016636741, + 0.0020677685, + -0.012293763, + 0.008184779, + -0.034252603, + 0.010753725, + 0.008675998, + 0.00968499, + -0.003793675, + -0.011218391, + 0.010375353, + -0.0005737809, + 0.019781543, + 0.020591391, + 0.019954132, + -0.00053976063, + -0.0059444197, + -0.022675755, + -0.010003619, + 0.0038467797, + -0.0212552, + -0.033482585, + -0.015572986, + 0.0037737607, + 0.01451089, + 0.0036376796, + 0.007454588, + 0.013979842, + -0.013402327, + 0.014975557, + -0.010435095, + 0.0151747, + -0.030375952, + 0.023166973, + -0.0024760119, + -0.005881358, + 0.019914305, + -0.008596341, + 0.017737007, + -0.0036111271, + 0.012499545, + -0.02647275, + 0.0053901384, + 0.008556513, + 0.019648781, + 0.00874238, + -0.012439802, + -0.028623493, + -0.022330573, + -0.0029340407, + -0.016303178, + 0.007474502, + -0.016555425, + 0.060645696, + 0.0023631642, + -0.012054792, + 0.017604245, + 0.013103612, + 0.026061187, + 0.015533158, + 0.025742557, + 0.00013753316, + -0.013940013, + 0.02880936, + 0.010109829, + -0.0036111271, + -0.012419888, + -0.045457717, + 0.022835068, + -0.014139156, + 0.007819683, + -0.010461648, + -0.012008325, + 0.008895056, + 0.015984548, + 0.024043202, + -0.00059825886, + -0.0036376796, + -0.007939169, + 0.0242689, + -0.022197811, + -0.026313433, + -0.026724996, + 0.010939592, + 0.0023449094, + -0.012074706, + -0.018493751, + 0.017697178, + -0.0052142288, + -0.00360117, + 0.0056058764, + 0.01070062, + 0.0035248317, + 0.023671469, + 0.030880447, + -0.020299314, + -0.0145905465, + 0.018055636, + -0.013727593, + -0.023313012, + 0.013236375, + -0.0020113448 + ] + } + ], + "usage": { + "prompt_tokens": 4, + "total_tokens": 4 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/embeddings.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/embeddings.yaml new file mode 100644 index 000000000000..020ac10d40ab --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/embeddings.yaml @@ -0,0 +1,1553 @@ +title: Return the embeddings for a given prompt. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + deployment-id: deployment-afa0669ca01e4693ae3a93baf40f26d6 + body: + input: + - this is a test +responses: + "200": + body: + data: + - index: 0 + embedding: + - -0.012838088 + - -0.007421397 + - -0.017617522 + - -0.028278312 + - -0.018666342 + - 0.01737855 + - -0.01821495 + - -0.006950092 + - -0.009937238 + - -0.038580645 + - 0.010674067 + - 0.02412286 + - -0.013647936 + - 0.013189907 + - 0.0021125758 + - 0.012406612 + - 0.020790534 + - 0.00074595667 + - 0.008397198 + - -0.00535031 + - 0.008968075 + - 0.014351576 + - -0.014086051 + - 0.015055214 + - -0.022211088 + - -0.025198232 + - 0.0065186154 + - -0.036350243 + - 0.009180495 + - -0.009698266 + - 0.009446018 + - -0.008463579 + - -0.0040426035 + - -0.03443847 + - -0.00091273896 + - -0.0019217303 + - 0.002349888 + - -0.021560553 + - 0.016515596 + - -0.015572986 + - 0.0038666942 + - -8.432463e-05 + - 0.0032178196 + - -0.020365695 + - -0.009631885 + - -0.007647093 + - 0.0033837722 + - -0.026764825 + - -0.010501476 + - 0.020219658 + - 0.024640633 + - -0.0066912062 + - -0.036456455 + - -0.0040923897 + - -0.013966565 + - 0.017816665 + - 0.005366905 + - 0.022835068 + - 0.0103488 + - -0.0010811808 + - -0.028942121 + - 0.0074280356 + - -0.017033368 + - 0.0074877786 + - 0.021640211 + - 0.002499245 + - 0.013316032 + - 0.0021524043 + - 0.010129742 + - 0.0054731146 + - 0.03143805 + - 0.014856071 + - 0.0023366117 + - -0.0008243692 + - 0.022781964 + - 0.003038591 + - -0.017617522 + - 0.0013309394 + - 0.0022154662 + - 0.00097414135 + - 0.012041516 + - -0.027906578 + - -0.023817508 + - 0.013302756 + - -0.003003741 + - -0.006890349 + - 0.0016744611 + - 0.023658194 + - -0.015851786 + - -0.0045305043 + - -0.003038591 + - 0.017710455 + - 0.019237218 + - 0.016037652 + - -0.022503164 + - 0.025795663 + - -0.001129307 + - 0.032500144 + - -0.008178141 + - -0.019940857 + - -0.009877495 + - 0.00018918588 + - 0.023060765 + - -0.005692172 + - -0.018347712 + - -0.011039163 + - -0.0062066247 + - -5.24047e-05 + - 0.020126723 + - -0.0011691356 + - -0.015811957 + - 0.020086896 + - -0.009114114 + - -0.03056182 + - 0.0029025099 + - -0.006591635 + - -0.014046223 + - -0.01590489 + - -0.02307404 + - -0.008861865 + - -0.004832538 + - 0.010030171 + - 0.02311387 + - -0.012652221 + - 0.024906157 + - 0.003860056 + - -0.01936998 + - -0.02957938 + - -0.008357369 + - -0.0016371218 + - 0.027800368 + - 0.0077333883 + - 0.021626934 + - 0.02140124 + - -0.030482162 + - 0.026406368 + - -0.008277712 + - 0.012884554 + - -0.043784916 + - -0.0145639945 + - -0.0070297495 + - 0.034889862 + - -0.00041508878 + - -0.010528029 + - -0.009572142 + - 0.015692472 + - 0.037810627 + - -0.0022021902 + - 0.008662722 + - -0.016794397 + - 0.0003090866 + - -0.0060506295 + - 0.015227805 + - 0.0006650548 + - 0.01842737 + - 0.036801632 + - -0.002461076 + - -0.0029390194 + - -0.0057120863 + - -0.012486269 + - -0.0046831807 + - -0.0017474802 + - -0.0036210844 + - -0.01178263 + - 0.017869769 + - 0.039111692 + - 0.010946229 + - 0.018467197 + - 0.0027780454 + - -0.005851486 + - -0.016489044 + - 0.03186289 + - -0.040333103 + - 0.016648358 + - -0.006870435 + - 0.0072687212 + - 2.370982e-06 + - 0.006465511 + - -0.018201673 + - -0.00020526254 + - -0.025410652 + - 0.02010017 + - 0.017537864 + - 0.022821793 + - 0.0064555537 + - -0.0012969191 + - 0.02157383 + - -0.0053536287 + - -0.0087622935 + - -0.010952868 + - 0.017564416 + - 0.02185263 + - 0.0004733796 + - 0.0018337755 + - -0.6954606 + - -0.011231667 + - 0.02748174 + - 0.003929756 + - 0.0144843375 + - 0.045192193 + - 0.01898497 + - -0.0070363875 + - -0.007813046 + - 0.017604245 + - -0.017790113 + - 0.011165286 + - -0.0036376796 + - -0.014736585 + - 0.0016421003 + - -0.019144284 + - -0.0072222543 + - -0.023127146 + - 0.006936816 + - 0.025198232 + - 0.0030219958 + - 0.011722887 + - -0.004271618 + - -0.0011127117 + - -0.0051047 + - 0.00077333883 + - 0.018599961 + - 0.0074877786 + - 0.010820106 + - 0.0033406245 + - -0.015055214 + - 0.02384406 + - 0.006090458 + - 0.00891497 + - 0.023366116 + - -0.011078991 + - -0.019582398 + - 0.0011566891 + - 0.015413672 + - 0.01793615 + - -0.014736585 + - 0.002492607 + - 0.027800368 + - 0.023923717 + - -0.007421397 + - 0.0016105693 + - 0.011337877 + - -0.015041938 + - -0.008768932 + - -0.003982861 + - 0.002884255 + - -0.007832959 + - 0.0025457118 + - -0.0023548664 + - -0.0061767534 + - -0.016754568 + - 0.0006036523 + - 0.0105346665 + - 0.0055361767 + - 0.01478969 + - -0.0011251582 + - 0.009605332 + - -0.0037140178 + - -0.017537864 + - -0.021733144 + - 0.012897831 + - -0.024481317 + - 0.022290744 + - 0.0056523434 + - -0.005366905 + - 0.0020412162 + - 0.013435517 + - -0.003408665 + - -0.01705992 + - 0.029446619 + - 0.022011945 + - 0.009226961 + - -0.003310753 + - -0.007939169 + - 0.021308305 + - 0.0026718357 + - 0.002129171 + - -0.020047067 + - -0.007474502 + - 0.021534001 + - -0.0110590765 + - -0.018374264 + - -0.001664504 + - -0.003923118 + - 0.015387119 + - 0.025516862 + - 0.0016421003 + - -0.017498035 + - -0.01825478 + - 0.01451089 + - -0.008198055 + - -0.011656506 + - 0.0044242945 + - 0.031491153 + - 0.01017621 + - -0.010408543 + - -0.009034456 + - -0.0023283141 + - 0.012021601 + - 0.015639367 + - 0.011736163 + - 0.007912617 + - 0.02031259 + - 0.022104878 + - -0.02241023 + - 0.00041156227 + - -0.009817752 + - -0.030880447 + - -0.0017823302 + - 0.0030933553 + - -0.04128899 + - -0.0007783174 + - 0.012393335 + - 0.0122273825 + - -0.009087561 + - 0.022728859 + - -0.002884255 + - 0.028065892 + - 0.0047396044 + - 0.008065294 + - 0.015519881 + - 0.0133956885 + - -0.02279524 + - -0.011729525 + - 0.0037206558 + - -0.0046732235 + - 0.003587894 + - 0.024401661 + - -0.013574918 + - 0.012685412 + - -0.0041620894 + - 0.020578114 + - 0.007394845 + - 0.014139156 + - -0.012512821 + - -0.021042781 + - 0.022423506 + - -0.015360567 + - 0.004009413 + - 0.0104550095 + - -0.024799947 + - -0.0081449505 + - -0.00063850236 + - 0.0070231115 + - -0.0009633545 + - -0.015705748 + - -0.0028942123 + - -0.008815398 + - 0.007461226 + - -0.014417957 + - -0.012931022 + - 0.0015674217 + - -0.02506547 + - -0.0063128346 + - -0.013422241 + - -0.0058614435 + - -0.0006007482 + - -0.015002109 + - 0.0037040606 + - -0.008410474 + - -0.0016089098 + - -0.018653065 + - 0.020538285 + - -0.016980262 + - -0.042244878 + - -0.017498035 + - 0.006727716 + - -0.01877255 + - 0.008987989 + - 0.00077665783 + - -0.0007119364 + - -0.0067243967 + - 0.0038467797 + - -0.018055636 + - -0.01440468 + - 0.007534245 + - 0.0051212953 + - 0.002741536 + - 0.011523744 + - -0.0018603279 + - 0.023684746 + - 0.016196968 + - 0.01731217 + - -0.01992758 + - 0.009372999 + - -0.01982137 + - 0.001150051 + - -0.014417957 + - 0.005672258 + - -0.015785405 + - 0.0049387473 + - -0.0051445286 + - 0.012632307 + - 0.0011666464 + - 0.024587527 + - 0.04259006 + - -0.0025672857 + - 0.02311387 + - -0.014524166 + - 0.0013848739 + - -0.04105002 + - -0.010089914 + - -0.009087561 + - 0.015440224 + - 0.009207047 + - 0.0128048975 + - -0.030216638 + - -0.02549031 + - 0.00499849 + - 0.02737553 + - 0.024985814 + - -0.015055214 + - 0.007580712 + - -0.003979542 + - 0.0016304837 + - 0.0010446712 + - 0.0033373055 + - 0.0066314633 + - -0.011948583 + - -0.021281753 + - 0.012161002 + - 0.030747686 + - 0.03555367 + - 0.023751127 + - -0.03159736 + - -0.0110590765 + - 0.015758853 + - -0.0012197511 + - -0.0023249951 + - -0.0007488608 + - 0.0074877786 + - 0.01643594 + - -0.008098484 + - 0.03730613 + - -0.0010056724 + - -3.4798173e-05 + - 0.011702972 + - 0.039563086 + - -0.012280487 + - 0.027747264 + - 0.018387541 + - 0.033057746 + - -0.004835857 + - -0.00471969 + - 0.025450481 + - -0.0051146573 + - 0.014603823 + - 0.00022258384 + - 0.00060863094 + - 0.015665919 + - -0.021626934 + - -0.013674489 + - 0.0062066247 + - 0.018560132 + - 0.031942543 + - 0.012054792 + - 0.004902238 + - 0.0028510645 + - -0.027667606 + - 0.009817752 + - -0.002580562 + - 0.0069036256 + - 0.020047067 + - -0.009704905 + - -0.012619031 + - -0.0056755766 + - -0.0036443176 + - 0.019383255 + - 0.0030701219 + - 0.024972538 + - 0.009100837 + - 0.026353262 + - 0.012758431 + - 0.029074885 + - 0.021202097 + - -0.0038102702 + - -0.032048754 + - 0.003996137 + - 0.0029738694 + - 0.0032277768 + - -0.026127568 + - -0.02213143 + - 0.0028742978 + - 0.0010637557 + - 0.000580419 + - 0.0021789568 + - 0.00083764544 + - 0.026924139 + - -0.03265946 + - 0.0059211864 + - 0.021892458 + - 0.01178263 + - 0.0018188398 + - 0.009718181 + - -0.020047067 + - 0.017989255 + - 0.0046035233 + - -0.010561219 + - -0.010342162 + - 0.009505761 + - -0.018334435 + - -0.00667793 + - -0.024534423 + - 0.00035347888 + - 0.00082561385 + - -0.006143563 + - 0.016820949 + - -0.0013500239 + - -0.0069832825 + - 0.015347291 + - -0.005094743 + - 0.001838754 + - 0.017073197 + - 0.02521151 + - 0.006209944 + - -0.015612815 + - -0.009744733 + - -0.019794818 + - 0.007786493 + - 0.037624758 + - 0.017564416 + - 0.0076802834 + - 0.0026203906 + - 0.0022403593 + - -0.024560975 + - -0.04062518 + - -0.016581977 + - 0.00789934 + - 0.0099305995 + - 0.006996559 + - 0.011078991 + - 0.016236795 + - -0.0068969876 + - 0.01374087 + - 0.014922452 + - -0.0042882133 + - 0.00022901449 + - -0.0006692036 + - 0.001359981 + - -7.581957e-05 + - 0.0042616613 + - 0.0066381013 + - 0.012512821 + - 0.021534001 + - 0.0032775626 + - 0.016913882 + - -0.00789934 + - -0.009200408 + - -0.020286039 + - -0.017033368 + - 0.014378128 + - 0.009233599 + - 0.0070828544 + - -0.013229736 + - 0.025928425 + - -0.011862287 + - 0.008383922 + - 0.012632307 + - -0.0003097089 + - 0.007593988 + - 0.0059079104 + - -0.0026369859 + - -0.0262205 + - 0.003335646 + - -0.0067609064 + - -0.0042882133 + - 0.008549875 + - -0.007600626 + - -0.012592479 + - 0.028623493 + - -0.0030502076 + - -0.006989921 + - -0.015785405 + - 0.010050085 + - 0.016714739 + - -0.023724575 + - -0.006346025 + - -0.014245366 + - -0.032154962 + - -0.03388087 + - -0.024308728 + - -0.002461076 + - -0.003733932 + - -0.02195884 + - -0.021069333 + - -0.022144707 + - -0.007872788 + - -0.017179407 + - -0.009034456 + - -0.010893124 + - -0.02478667 + - -0.020153277 + - -0.023976821 + - 0.014656927 + - 0.0005368565 + - -0.015878338 + - 0.010123105 + - -0.0030717815 + - 0.01555971 + - 0.0018321159 + - -0.036244035 + - 0.00017176087 + - -0.013375774 + - -0.010375353 + - 0.026512576 + - 0.016581977 + - 0.013847079 + - 0.015719024 + - 0.013223098 + - 0.004975257 + - -0.0010579474 + - -0.0034385365 + - -0.029048331 + - 0.017298892 + - -0.022529716 + - 0.008463579 + - -0.014723309 + - -0.005814977 + - -0.009027818 + - -0.009738095 + - -0.0104682855 + - -0.005044957 + - 0.007905979 + - 0.011656506 + - 0.003153098 + - -0.0005231654 + - 0.019954132 + - -0.021985391 + - -0.005307162 + - 0.0021839354 + - -0.025184957 + - 0.013926737 + - -0.0059908866 + - 0.0065717204 + - 0.009884133 + - -0.0062298584 + - 0.03388087 + - 0.0028577026 + - -0.015931444 + - 0.0010986058 + - -0.025808938 + - 0.0022835068 + - 0.014152432 + - 0.015227805 + - 0.013701041 + - -0.007872788 + - -0.030614924 + - -0.026393091 + - 0.0010753724 + - -0.016940435 + - 0.013647936 + - -0.007408121 + - -0.024308728 + - -0.031915992 + - -0.018161846 + - 0.00072521257 + - 0.028862465 + - 0.012234021 + - -0.019555846 + - -0.027641054 + - -0.00082810316 + - -0.0019150922 + - -0.016276624 + - -0.01125822 + - -0.034146395 + - -0.015294186 + - 0.006671292 + - -0.015533158 + - 0.013674489 + - -0.0011766035 + - -0.017325444 + - -0.023233354 + - -0.013189907 + - 0.0005580154 + - -0.03188944 + - -0.007056302 + - -0.0059942054 + - 0.03411984 + - 0.04317421 + - 0.029420065 + - 0.006488744 + - -0.0022436783 + - 0.013063784 + - 0.00012207884 + - 0.008118398 + - -0.023246631 + - 0.0051909955 + - -0.00894816 + - 0.0081316745 + - 0.0023200165 + - 0.011510468 + - -0.0005770999 + - 0.00016979019 + - 0.010129742 + - 0.015506605 + - -0.0073815687 + - 0.0031995648 + - -0.026578957 + - -0.016674912 + - 0.0049652997 + - 0.0072687212 + - -0.016568702 + - -0.001964878 + - -0.015692472 + - -0.0048955996 + - 0.027773816 + - 0.012864641 + - 0.01594472 + - 0.008244522 + - 0.017139578 + - -0.01772373 + - -0.0012521119 + - 0.011689696 + - 0.0111121815 + - -0.0036476366 + - 0.0012570905 + - -0.007826322 + - -0.016754568 + - 0.011948583 + - -0.0045968853 + - 0.023963546 + - -0.0052739717 + - 0.014656927 + - 0.009731457 + - 0.010727172 + - -0.01705992 + - -0.0026071144 + - 0.010760362 + - 0.000919377 + - -0.006365939 + - -0.03013698 + - -0.010554581 + - -0.018613236 + - 0.013886908 + - 0.029420065 + - -0.013030593 + - 0.016860778 + - -0.019237218 + - -0.022118153 + - 0.007919255 + - -0.0004003605 + - 0.046546366 + - 0.01349526 + - 0.006352663 + - 0.014258642 + - 0.0031813101 + - -0.027017072 + - 0.0070828544 + - -0.020219658 + - 0.0037140178 + - 0.023366116 + - 0.040386207 + - -0.016382834 + - -0.0023681426 + - 0.0064522345 + - 0.016528873 + - 0.0006804054 + - -0.02891557 + - -0.0043545947 + - 0.01101261 + - -0.0014778073 + - -0.018055636 + - -0.0077001974 + - -0.0358723 + - 0.003373815 + - -0.00071940426 + - -0.011822458 + - -0.024295451 + - -0.009791199 + - -0.026565682 + - 0.020989677 + - -0.035155386 + - 0.01832116 + - 0.014776413 + - -0.028012788 + - -0.007262083 + - 0.0030402504 + - -0.029446619 + - 0.00010174965 + - 0.009758009 + - 0.03767786 + - -0.0154535 + - 0.009346447 + - 0.016077481 + - 0.0041189417 + - -0.027800368 + - 0.01720596 + - -0.011158649 + - 0.027800368 + - -0.03003077 + - -0.0072819972 + - 0.0014296811 + - 0.0145374425 + - 0.0043280423 + - -0.017086472 + - -0.01611731 + - -0.01258584 + - -0.016927158 + - 0.007607264 + - 0.018825656 + - 0.011331239 + - -0.0057784673 + - 0.001569911 + - -0.013900184 + - -0.014776413 + - -0.0050814664 + - -0.0012454737 + - -0.0115967635 + - -0.017458206 + - -0.013203184 + - -0.0063692583 + - -0.01244644 + - 0.011882202 + - 0.0007708495 + - -0.02035242 + - 0.016250072 + - 0.018414093 + - -0.029526275 + - 0.012751793 + - -0.01555971 + - 0.0013840442 + - -0.019502742 + - 0.0063758963 + - 0.0037538463 + - -0.035686433 + - 0.027534844 + - -0.016409386 + - -0.03247359 + - -0.008782208 + - -0.0059842486 + - 0.014338299 + - 0.009233599 + - -0.0053171194 + - 0.006160158 + - 0.0072952732 + - 0.01401967 + - 0.008815398 + - -0.023790956 + - 0.013096974 + - -0.0031365028 + - 0.005044957 + - 0.0005356118 + - -0.009379637 + - 0.0066248253 + - -0.00010724682 + - 0.010289057 + - 0.008815398 + - -0.02279524 + - -0.019701885 + - -0.0027747264 + - 0.016183691 + - -0.014205537 + - -0.003933075 + - -0.013375774 + - -0.005751915 + - -0.010116466 + - 0.004988533 + - -0.005904591 + - -0.008656085 + - -0.017431654 + - -0.011988411 + - -0.01594472 + - 0.00660823 + - -0.027216217 + - 0.0073218257 + - -0.029977666 + - -0.004593566 + - -0.026671892 + - -0.028517283 + - -0.0050084474 + - 0.009844304 + - 0.025729282 + - -0.013780698 + - -0.026751548 + - 0.004905557 + - -0.035951957 + - -0.026738273 + - -0.019768266 + - 0.0048690476 + - 0.005250738 + - 0.0014603822 + - -0.018892037 + - 0.017683903 + - 0.0067177587 + - 0.027694158 + - -0.002618731 + - -0.012419888 + - 0.01772373 + - -0.0032593077 + - 0.006611549 + - 0.016648358 + - -0.03789028 + - -0.023100592 + - 0.023684746 + - 0.0031248862 + - 0.016382834 + - 0.019967409 + - -0.008941523 + - -0.02014 + - 0.0073882067 + - 0.011357792 + - -0.0031796505 + - -0.0030253148 + - -0.0010206081 + - -0.017577693 + - -0.009598695 + - 0.002915786 + - 0.001325131 + - -0.0029207645 + - -0.010780277 + - -0.00325101 + - -0.00811176 + - -0.00073434 + - -0.030083876 + - -0.012864641 + - -0.012745155 + - -0.011769353 + - 0.018785827 + - -0.008264436 + - -0.002675155 + - 0.024255622 + - 0.005483072 + - -0.018480474 + - -0.005426648 + - 0.015095043 + - 0.00044392303 + - 0.011271496 + - -0.0027548121 + - 0.0026884312 + - -0.00894816 + - -0.015161424 + - -0.014975557 + - -0.024600804 + - 0.004457485 + - -0.015519881 + - -0.012366783 + - -0.012579202 + - 0.01478969 + - 0.0075541595 + - -0.017962702 + - -0.0017441611 + - -0.014059499 + - 0.005499667 + - -0.0026884312 + - 0.0031929268 + - 0.0010853296 + - -0.008045379 + - 0.017471483 + - 0.02590187 + - -0.018546855 + - -0.007826322 + - 0.009333171 + - 0.0157323 + - 8.6036016e-05 + - 0.004776114 + - 0.22155327 + - 0.006787459 + - -0.0017823302 + - 0.024919434 + - 0.0023449094 + - 0.03210186 + - 0.0047329664 + - -0.010879848 + - 0.0044342517 + - 0.015334014 + - 0.029499723 + - 0.019715162 + - -0.008569789 + - -0.0018901994 + - -0.0077400263 + - -0.019210665 + - -0.005088105 + - -0.023153698 + - -0.032739118 + - -0.029313855 + - 0.00082146504 + - -0.0212552 + - 0.0044309325 + - -0.005446562 + - 0.018613236 + - -0.009751371 + - -0.013023955 + - -0.001996409 + - 0.01915756 + - 0.017431654 + - -0.031092867 + - -0.0070231115 + - 0.025330994 + - -0.00018099198 + - -0.025131851 + - -0.011025886 + - 0.0116498675 + - -0.02506547 + - 0.029234199 + - -0.012287126 + - 0.0069766445 + - 0.0018752636 + - 0.014271918 + - 0.005108019 + - -0.0109064 + - 0.014391404 + - 0.0062597296 + - -0.031411495 + - 0.00014935728 + - 0.013236375 + - -0.02891557 + - -0.0006671292 + - 0.008662722 + - 0.012161002 + - 0.020963125 + - -0.0133691365 + - 0.02653913 + - -0.017989255 + - 0.007978998 + - 0.0093398085 + - -0.02024621 + - 0.03265946 + - -0.02846418 + - 0.025397375 + - -0.024693737 + - -0.0027050264 + - -0.019330151 + - -0.0104417335 + - 0.015626092 + - -0.006541849 + - 0.004653309 + - -0.025118576 + - 0.0038268655 + - 0.004045923 + - -0.017564416 + - -0.02444149 + - 0.030296294 + - 0.028756255 + - 0.03927101 + - 0.010767001 + - -0.012034878 + - -0.007122683 + - -0.022476612 + - -0.034942966 + - -0.028411074 + - -0.03927101 + - -0.0037505273 + - -0.0038799702 + - -0.00037111135 + - -0.009718181 + - -0.013455432 + - -0.015400395 + - -0.0066978442 + - -0.010760362 + - 0.015121595 + - 0.03111942 + - 0.007992274 + - 0.0270569 + - -0.003104972 + - 0.010056724 + - -0.018414093 + - 0.006472149 + - 0.021281753 + - 0.0043579135 + - -0.00021490853 + - 0.0008546556 + - -0.01269205 + - -0.003936394 + - 0.0008870163 + - 0.0009816092 + - 0.0054664765 + - -0.031278733 + - 0.017245788 + - 0.00027734818 + - 0.005161124 + - 0.0048093046 + - -0.003923118 + - -0.027149836 + - 0.006950092 + - -0.00615352 + - 0.014205537 + - 0.0016620146 + - 0.0047396044 + - 0.0039994563 + - -0.015440224 + - -0.0055627287 + - -0.026273604 + - 0.0013276202 + - 0.0021009592 + - -0.034810204 + - 0.0064522345 + - 0.00042608313 + - 0.02307404 + - -0.005957696 + - 0.0016869075 + - -0.0032775626 + - -0.009041094 + - -0.01227385 + - -0.04349284 + - 0.015652644 + - 0.013468708 + - -0.0023249951 + - -0.011171925 + - 0.0030352718 + - -0.0061203293 + - -0.023153698 + - 0.046068422 + - -0.005582643 + - -0.02405648 + - 0.005433286 + - -0.02814555 + - -0.0036874653 + - 0.0067841397 + - 0.006628144 + - 0.029844904 + - -0.0044276137 + - -0.029127989 + - -0.04548427 + - 0.022091601 + - 0.0038069512 + - -0.030269742 + - 0.0051578046 + - 0.043572497 + - -0.0144843375 + - -0.02891557 + - -0.010461648 + - -0.17375894 + - 0.029154541 + - 0.019648781 + - -0.00038335036 + - 0.0029572742 + - -0.0026469429 + - 0.035925403 + - -0.012021601 + - 0.0015566348 + - -0.0033124126 + - 0.0010430117 + - -0.010620962 + - -0.022582822 + - 0.00601412 + - 0.008364008 + - -0.0016586956 + - -0.0011102224 + - -0.013860356 + - 0.022542993 + - 0.020564837 + - 0.018414093 + - -0.008908332 + - 0.032951534 + - -0.011908754 + - 0.010169571 + - -0.011198477 + - 0.0029108075 + - 0.033084296 + - 0.0029008503 + - -0.0010015236 + - -0.019794818 + - 0.005844848 + - 0.011669782 + - 0.0052208668 + - 0.010129742 + - 0.0037737607 + - 0.02880936 + - -0.018599961 + - -0.015095043 + - 0.026578957 + - 0.019662056 + - 0.006823968 + - -0.00045885876 + - -0.019396532 + - -0.0047993474 + - 0.017192682 + - 0.039589636 + - -0.00874238 + - 0.02146762 + - -0.007667007 + - 0.018785827 + - -0.012758431 + - -0.010010257 + - -0.02052501 + - 0.016090758 + - 0.0061867107 + - -0.0145507185 + - 0.008065294 + - 0.0104284575 + - -0.0022386997 + - -0.008324179 + - -0.021640211 + - 0.01705992 + - -0.010541305 + - -0.01639611 + - -0.0074413116 + - -0.034703992 + - 0.007016473 + - -0.003083398 + - 0.0013691084 + - -0.005108019 + - -0.007886064 + - 0.00053270767 + - -0.018865485 + - 0.025503585 + - 0.005101381 + - -0.027534844 + - 0.015028661 + - -0.009286704 + - 0.006233177 + - 4.343289e-05 + - 0.036031615 + - 0.00957878 + - 0.019250493 + - 0.0024411618 + - 0.0023664832 + - -0.0030269742 + - -0.007939169 + - 0.0058581247 + - 0.00587472 + - 0.036589216 + - -0.035288148 + - -0.012997403 + - -0.0110989055 + - -0.002492607 + - 0.008151589 + - -0.008085207 + - -0.00734174 + - -0.0016802694 + - 0.008403837 + - -0.007793131 + - -0.003913161 + - -0.025437204 + - 0.027123282 + - 0.019330151 + - -0.008729103 + - 0.003943032 + - 0.010289057 + - 0.029977666 + - 0.0014836156 + - -0.024282174 + - -0.0024361832 + - 0.0110325245 + - 0.021719867 + - 0.012844726 + - 0.015002109 + - 0.020737428 + - -0.013037231 + - 0.014802966 + - -0.0027332383 + - 0.041634172 + - -0.00926679 + - -0.018759275 + - 0.018666342 + - 0.005386819 + - -0.008822037 + - -0.068399 + - -0.054804165 + - 0.027800368 + - 0.04954679 + - -0.00437119 + - 0.029127989 + - 0.03180978 + - 0.021321582 + - -0.022503164 + - 0.010554581 + - -0.006823968 + - -0.021387963 + - -0.021865906 + - -0.0074479496 + - 0.0037206558 + - 0.004132218 + - 0.01073381 + - -0.0021673401 + - -0.0012819833 + - 0.041235887 + - -0.010202762 + - 0.004839176 + - 0.0081715025 + - -0.030402504 + - -0.023764404 + - -0.010800191 + - -0.018374264 + - 0.033641897 + - 0.005416691 + - -0.0055096243 + - -0.0032775626 + - -0.018095464 + - 0.008563151 + - -0.02339267 + - -0.013674489 + - 0.0023382711 + - -0.028411074 + - -0.0024063117 + - 0.026658615 + - -0.012413249 + - 0.009333171 + - 0.026446195 + - -0.009107475 + - -0.024560975 + - 0.0011085629 + - -0.02395027 + - 0.0013857037 + - 0.01926377 + - -0.0020710877 + - -0.031278733 + - -0.015095043 + - 0.0041720467 + - -0.012798259 + - 0.010162933 + - 0.0063128346 + - -0.010972782 + - 0.045617033 + - 0.016874054 + - -0.010368714 + - -0.0055992384 + - -0.0092999805 + - 0.0015782086 + - -0.013581555 + - 0.017843217 + - -0.01615714 + - 0.0036575939 + - -0.027110007 + - -0.013621384 + - 0.022197811 + - 0.0013964906 + - -0.007348378 + - 0.0145772705 + - -0.003996137 + - 0.0008364008 + - -0.03411984 + - 0.013030593 + - -0.021454344 + - -0.05034336 + - 0.021095887 + - -0.0055029863 + - -0.025623072 + - -0.023525432 + - 0.007335102 + - -0.043413185 + - 0.016316453 + - 0.016196968 + - 0.0093132565 + - -0.0110989055 + - 0.0154535 + - -0.045218747 + - 0.0037737607 + - 0.01639611 + - 0.019887751 + - -0.023366116 + - -0.024043202 + - 0.014258642 + - 0.004271618 + - -0.006877073 + - 0.021387963 + - -0.0019781543 + - -0.036350243 + - -0.009114114 + - -0.037359234 + - 0.01919739 + - 0.011829097 + - -0.015665919 + - -0.0015591241 + - 0.0144843375 + - -0.003139822 + - -0.024083031 + - -0.015307462 + - -0.0040990277 + - -0.013223098 + - 0.0024278855 + - -0.008702551 + - -0.0033207103 + - -0.009804476 + - -0.010554581 + - 0.031066315 + - 0.0044408897 + - 0.025370823 + - 0.009406189 + - 0.025583243 + - -0.002066109 + - 0.015267633 + - 0.008337456 + - -0.009426104 + - 0.01590489 + - -0.011716249 + - 0.007713474 + - -0.029552827 + - -0.013900184 + - 0.0050150855 + - -0.01650232 + - -0.0015757193 + - 0.008549875 + - -0.020471904 + - 0.008397198 + - -0.013136802 + - 0.021520725 + - 0.0060406723 + - 0.012858002 + - -0.004723009 + - -0.029313855 + - 0.009240237 + - -0.0212552 + - -0.028118998 + - 0.017803388 + - -0.0314646 + - 0.012353507 + - 0.029632485 + - -1.6128512e-05 + - 0.016966987 + - 0.009711542 + - -0.037253026 + - -0.015095043 + - 0.013442155 + - -0.00905437 + - -0.000982439 + - -0.0020495139 + - 0.008337456 + - -0.020644495 + - 0.042085562 + - -0.000744712 + - 0.021135716 + - -0.0072886352 + - 0.01643594 + - 0.013767422 + - -0.0044707614 + - -0.014763137 + - 0.018852208 + - -0.03080079 + - -0.0049188333 + - 0.0058846767 + - 0.008330817 + - 0.008257798 + - 0.024202518 + - 0.02307404 + - 0.011065715 + - 0.00036053188 + - -0.00049412367 + - 0.036270585 + - 0.027043626 + - 0.011902116 + - -0.027773816 + - 0.013289479 + - 0.018374264 + - -0.0033157317 + - 0.0016636741 + - 0.0020677685 + - -0.012293763 + - 0.008184779 + - -0.034252603 + - 0.010753725 + - 0.008675998 + - 0.00968499 + - -0.003793675 + - -0.011218391 + - 0.010375353 + - -0.0005737809 + - 0.019781543 + - 0.020591391 + - 0.019954132 + - -0.00053976063 + - -0.0059444197 + - -0.022675755 + - -0.010003619 + - 0.0038467797 + - -0.0212552 + - -0.033482585 + - -0.015572986 + - 0.0037737607 + - 0.01451089 + - 0.0036376796 + - 0.007454588 + - 0.013979842 + - -0.013402327 + - 0.014975557 + - -0.010435095 + - 0.0151747 + - -0.030375952 + - 0.023166973 + - -0.0024760119 + - -0.005881358 + - 0.019914305 + - -0.008596341 + - 0.017737007 + - -0.0036111271 + - 0.012499545 + - -0.02647275 + - 0.0053901384 + - 0.008556513 + - 0.019648781 + - 0.00874238 + - -0.012439802 + - -0.028623493 + - -0.022330573 + - -0.0029340407 + - -0.016303178 + - 0.007474502 + - -0.016555425 + - 0.060645696 + - 0.0023631642 + - -0.012054792 + - 0.017604245 + - 0.013103612 + - 0.026061187 + - 0.015533158 + - 0.025742557 + - 0.00013753316 + - -0.013940013 + - 0.02880936 + - 0.010109829 + - -0.0036111271 + - -0.012419888 + - -0.045457717 + - 0.022835068 + - -0.014139156 + - 0.007819683 + - -0.010461648 + - -0.012008325 + - 0.008895056 + - 0.015984548 + - 0.024043202 + - -0.00059825886 + - -0.0036376796 + - -0.007939169 + - 0.0242689 + - -0.022197811 + - -0.026313433 + - -0.026724996 + - 0.010939592 + - 0.0023449094 + - -0.012074706 + - -0.018493751 + - 0.017697178 + - -0.0052142288 + - -0.00360117 + - 0.0056058764 + - 0.01070062 + - 0.0035248317 + - 0.023671469 + - 0.030880447 + - -0.020299314 + - -0.0145905465 + - 0.018055636 + - -0.013727593 + - -0.023313012 + - 0.013236375 + - -0.0020113448 + usage: + prompt_tokens: 4 + total_tokens: 4 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_speech.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_speech.json new file mode 100644 index 000000000000..14b9ff3f8021 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_speech.json @@ -0,0 +1,19 @@ +{ + "operationId": "GenerateSpeechFromText", + "title": "Generates text-to-speech audio from the input text.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "input": "The text to generate audio for", + "voice": "alloy" + } + }, + "responses": { + "200": { + "content-type": "application/octet-stream", + "body": "RIFF...audio.data.omitted" + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_transcription_object.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_transcription_object.json new file mode 100644 index 000000000000..629ca7bc14e9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_transcription_object.json @@ -0,0 +1,17 @@ +{ + "operationId": "GetAudioTranscriptionAsResponseObject", + "title": "Gets transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "file": "U3dhZ2dlciByb2Nrcw==" + }, + "responses": { + "200": { + "body": { + "text": "A structured object when requesting json or verbose_json" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_transcription_text.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_transcription_text.json new file mode 100644 index 000000000000..a6c4e9aadfc2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_transcription_text.json @@ -0,0 +1,16 @@ +{ + "operationId": "GetAudioTranscriptionAsPlainText", + "title": "Gets transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "file": "U3dhZ2dlciByb2Nrcw==" + }, + "responses": { + "200": { + "type": "string", + "body": "plain text when requesting text, srt, or vtt" + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_translation_object.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_translation_object.json new file mode 100644 index 000000000000..b0346104e6e9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_translation_object.json @@ -0,0 +1,17 @@ +{ + "operationId": "GetAudioTranslationAsResponseObject", + "title": "Gets English language transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "file": "U3dhZ2dlciByb2Nrcw==" + }, + "responses": { + "200": { + "body": { + "text": "A structured object when requesting json or verbose_json" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_translation_text.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_translation_text.json new file mode 100644 index 000000000000..15d086f76ee5 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_audio_translation_text.json @@ -0,0 +1,16 @@ +{ + "operationId": "GetAudioTranslationAsPlainText", + "title": "Gets English language transcribed text and associated metadata from provided spoken audio data.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "file": "U3dhZ2dlciByb2Nrcw==" + }, + "responses": { + "200": { + "type": "string", + "body": "plain text when requesting text, srt, or vtt" + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_chat_completions.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_chat_completions.json new file mode 100644 index 000000000000..f21e3badcf1f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_chat_completions.json @@ -0,0 +1,45 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion for the provided prompt, parameters and chosen model.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "system", + "content": "you are a helpful assistant that talks like a pirate" + }, + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!" + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_completions.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_completions.json new file mode 100644 index 000000000000..bb02f500ccd4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_completions.json @@ -0,0 +1,38 @@ +{ + "operationId": "GetCompletions", + "title": "Creates a completion for the provided prompt, parameters and chosen model.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "prompt": [ + "tell me a joke about mango" + ], + "max_tokens": 32, + "temperature": 1.0, + "n": 1 + } + }, + "responses": { + "200": { + "body": { + "id": "cmpl-7QmVI15qgYVllxK0FtxVGG6ywfzaq", + "created": 1686617332, + "choices": [ + { + "text": "es\n\nWhat do you call a mango who's in charge?\n\nThe head mango.", + "index": 0, + "finish_reason": "stop", + "logprobs": null + } + ], + "usage": { + "completion_tokens": 20, + "prompt_tokens": 6, + "total_tokens": 26 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_embeddings.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_embeddings.json new file mode 100644 index 000000000000..d0740c8068d2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_embeddings.json @@ -0,0 +1,1567 @@ +{ + "operationId": "GetEmbeddings", + "title": "Return the embeddings for a given prompt.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "deployment-afa0669ca01e4693ae3a93baf40f26d6", + "body": { + "input": [ + "this is a test" + ] + } + }, + "responses": { + "200": { + "body": { + "data": [ + { + "index": 0, + "embedding": [ + -0.012838088, + -0.007421397, + -0.017617522, + -0.028278312, + -0.018666342, + 0.01737855, + -0.01821495, + -0.006950092, + -0.009937238, + -0.038580645, + 0.010674067, + 0.02412286, + -0.013647936, + 0.013189907, + 0.0021125758, + 0.012406612, + 0.020790534, + 0.00074595667, + 0.008397198, + -0.00535031, + 0.008968075, + 0.014351576, + -0.014086051, + 0.015055214, + -0.022211088, + -0.025198232, + 0.0065186154, + -0.036350243, + 0.009180495, + -0.009698266, + 0.009446018, + -0.008463579, + -0.0040426035, + -0.03443847, + -0.00091273896, + -0.0019217303, + 0.002349888, + -0.021560553, + 0.016515596, + -0.015572986, + 0.0038666942, + -0.00008432463, + 0.0032178196, + -0.020365695, + -0.009631885, + -0.007647093, + 0.0033837722, + -0.026764825, + -0.010501476, + 0.020219658, + 0.024640633, + -0.0066912062, + -0.036456455, + -0.0040923897, + -0.013966565, + 0.017816665, + 0.005366905, + 0.022835068, + 0.0103488, + -0.0010811808, + -0.028942121, + 0.0074280356, + -0.017033368, + 0.0074877786, + 0.021640211, + 0.002499245, + 0.013316032, + 0.0021524043, + 0.010129742, + 0.0054731146, + 0.03143805, + 0.014856071, + 0.0023366117, + -0.0008243692, + 0.022781964, + 0.003038591, + -0.017617522, + 0.0013309394, + 0.0022154662, + 0.00097414135, + 0.012041516, + -0.027906578, + -0.023817508, + 0.013302756, + -0.003003741, + -0.006890349, + 0.0016744611, + 0.023658194, + -0.015851786, + -0.0045305043, + -0.003038591, + 0.017710455, + 0.019237218, + 0.016037652, + -0.022503164, + 0.025795663, + -0.001129307, + 0.032500144, + -0.008178141, + -0.019940857, + -0.009877495, + 0.00018918588, + 0.023060765, + -0.005692172, + -0.018347712, + -0.011039163, + -0.0062066247, + -0.0000524047, + 0.020126723, + -0.0011691356, + -0.015811957, + 0.020086896, + -0.009114114, + -0.03056182, + 0.0029025099, + -0.006591635, + -0.014046223, + -0.01590489, + -0.02307404, + -0.008861865, + -0.004832538, + 0.010030171, + 0.02311387, + -0.012652221, + 0.024906157, + 0.003860056, + -0.01936998, + -0.02957938, + -0.008357369, + -0.0016371218, + 0.027800368, + 0.0077333883, + 0.021626934, + 0.02140124, + -0.030482162, + 0.026406368, + -0.008277712, + 0.012884554, + -0.043784916, + -0.0145639945, + -0.0070297495, + 0.034889862, + -0.00041508878, + -0.010528029, + -0.009572142, + 0.015692472, + 0.037810627, + -0.0022021902, + 0.008662722, + -0.016794397, + 0.0003090866, + -0.0060506295, + 0.015227805, + 0.0006650548, + 0.01842737, + 0.036801632, + -0.002461076, + -0.0029390194, + -0.0057120863, + -0.012486269, + -0.0046831807, + -0.0017474802, + -0.0036210844, + -0.01178263, + 0.017869769, + 0.039111692, + 0.010946229, + 0.018467197, + 0.0027780454, + -0.005851486, + -0.016489044, + 0.03186289, + -0.040333103, + 0.016648358, + -0.006870435, + 0.0072687212, + 0.000002370982, + 0.006465511, + -0.018201673, + -0.00020526254, + -0.025410652, + 0.02010017, + 0.017537864, + 0.022821793, + 0.0064555537, + -0.0012969191, + 0.02157383, + -0.0053536287, + -0.0087622935, + -0.010952868, + 0.017564416, + 0.02185263, + 0.0004733796, + 0.0018337755, + -0.6954606, + -0.011231667, + 0.02748174, + 0.003929756, + 0.0144843375, + 0.045192193, + 0.01898497, + -0.0070363875, + -0.007813046, + 0.017604245, + -0.017790113, + 0.011165286, + -0.0036376796, + -0.014736585, + 0.0016421003, + -0.019144284, + -0.0072222543, + -0.023127146, + 0.006936816, + 0.025198232, + 0.0030219958, + 0.011722887, + -0.004271618, + -0.0011127117, + -0.0051047, + 0.00077333883, + 0.018599961, + 0.0074877786, + 0.010820106, + 0.0033406245, + -0.015055214, + 0.02384406, + 0.006090458, + 0.00891497, + 0.023366116, + -0.011078991, + -0.019582398, + 0.0011566891, + 0.015413672, + 0.01793615, + -0.014736585, + 0.002492607, + 0.027800368, + 0.023923717, + -0.007421397, + 0.0016105693, + 0.011337877, + -0.015041938, + -0.008768932, + -0.003982861, + 0.002884255, + -0.007832959, + 0.0025457118, + -0.0023548664, + -0.0061767534, + -0.016754568, + 0.0006036523, + 0.0105346665, + 0.0055361767, + 0.01478969, + -0.0011251582, + 0.009605332, + -0.0037140178, + -0.017537864, + -0.021733144, + 0.012897831, + -0.024481317, + 0.022290744, + 0.0056523434, + -0.005366905, + 0.0020412162, + 0.013435517, + -0.003408665, + -0.01705992, + 0.029446619, + 0.022011945, + 0.009226961, + -0.003310753, + -0.007939169, + 0.021308305, + 0.0026718357, + 0.002129171, + -0.020047067, + -0.007474502, + 0.021534001, + -0.0110590765, + -0.018374264, + -0.001664504, + -0.003923118, + 0.015387119, + 0.025516862, + 0.0016421003, + -0.017498035, + -0.01825478, + 0.01451089, + -0.008198055, + -0.011656506, + 0.0044242945, + 0.031491153, + 0.01017621, + -0.010408543, + -0.009034456, + -0.0023283141, + 0.012021601, + 0.015639367, + 0.011736163, + 0.007912617, + 0.02031259, + 0.022104878, + -0.02241023, + 0.00041156227, + -0.009817752, + -0.030880447, + -0.0017823302, + 0.0030933553, + -0.04128899, + -0.0007783174, + 0.012393335, + 0.0122273825, + -0.009087561, + 0.022728859, + -0.002884255, + 0.028065892, + 0.0047396044, + 0.008065294, + 0.015519881, + 0.0133956885, + -0.02279524, + -0.011729525, + 0.0037206558, + -0.0046732235, + 0.003587894, + 0.024401661, + -0.013574918, + 0.012685412, + -0.0041620894, + 0.020578114, + 0.007394845, + 0.014139156, + -0.012512821, + -0.021042781, + 0.022423506, + -0.015360567, + 0.004009413, + 0.0104550095, + -0.024799947, + -0.0081449505, + -0.00063850236, + 0.0070231115, + -0.0009633545, + -0.015705748, + -0.0028942123, + -0.008815398, + 0.007461226, + -0.014417957, + -0.012931022, + 0.0015674217, + -0.02506547, + -0.0063128346, + -0.013422241, + -0.0058614435, + -0.0006007482, + -0.015002109, + 0.0037040606, + -0.008410474, + -0.0016089098, + -0.018653065, + 0.020538285, + -0.016980262, + -0.042244878, + -0.017498035, + 0.006727716, + -0.01877255, + 0.008987989, + 0.00077665783, + -0.0007119364, + -0.0067243967, + 0.0038467797, + -0.018055636, + -0.01440468, + 0.007534245, + 0.0051212953, + 0.002741536, + 0.011523744, + -0.0018603279, + 0.023684746, + 0.016196968, + 0.01731217, + -0.01992758, + 0.009372999, + -0.01982137, + 0.001150051, + -0.014417957, + 0.005672258, + -0.015785405, + 0.0049387473, + -0.0051445286, + 0.012632307, + 0.0011666464, + 0.024587527, + 0.04259006, + -0.0025672857, + 0.02311387, + -0.014524166, + 0.0013848739, + -0.04105002, + -0.010089914, + -0.009087561, + 0.015440224, + 0.009207047, + 0.0128048975, + -0.030216638, + -0.02549031, + 0.00499849, + 0.02737553, + 0.024985814, + -0.015055214, + 0.007580712, + -0.003979542, + 0.0016304837, + 0.0010446712, + 0.0033373055, + 0.0066314633, + -0.011948583, + -0.021281753, + 0.012161002, + 0.030747686, + 0.03555367, + 0.023751127, + -0.03159736, + -0.0110590765, + 0.015758853, + -0.0012197511, + -0.0023249951, + -0.0007488608, + 0.0074877786, + 0.01643594, + -0.008098484, + 0.03730613, + -0.0010056724, + -0.000034798173, + 0.011702972, + 0.039563086, + -0.012280487, + 0.027747264, + 0.018387541, + 0.033057746, + -0.004835857, + -0.00471969, + 0.025450481, + -0.0051146573, + 0.014603823, + 0.00022258384, + 0.00060863094, + 0.015665919, + -0.021626934, + -0.013674489, + 0.0062066247, + 0.018560132, + 0.031942543, + 0.012054792, + 0.004902238, + 0.0028510645, + -0.027667606, + 0.009817752, + -0.002580562, + 0.0069036256, + 0.020047067, + -0.009704905, + -0.012619031, + -0.0056755766, + -0.0036443176, + 0.019383255, + 0.0030701219, + 0.024972538, + 0.009100837, + 0.026353262, + 0.012758431, + 0.029074885, + 0.021202097, + -0.0038102702, + -0.032048754, + 0.003996137, + 0.0029738694, + 0.0032277768, + -0.026127568, + -0.02213143, + 0.0028742978, + 0.0010637557, + 0.000580419, + 0.0021789568, + 0.00083764544, + 0.026924139, + -0.03265946, + 0.0059211864, + 0.021892458, + 0.01178263, + 0.0018188398, + 0.009718181, + -0.020047067, + 0.017989255, + 0.0046035233, + -0.010561219, + -0.010342162, + 0.009505761, + -0.018334435, + -0.00667793, + -0.024534423, + 0.00035347888, + 0.00082561385, + -0.006143563, + 0.016820949, + -0.0013500239, + -0.0069832825, + 0.015347291, + -0.005094743, + 0.001838754, + 0.017073197, + 0.02521151, + 0.006209944, + -0.015612815, + -0.009744733, + -0.019794818, + 0.007786493, + 0.037624758, + 0.017564416, + 0.0076802834, + 0.0026203906, + 0.0022403593, + -0.024560975, + -0.04062518, + -0.016581977, + 0.00789934, + 0.0099305995, + 0.006996559, + 0.011078991, + 0.016236795, + -0.0068969876, + 0.01374087, + 0.014922452, + -0.0042882133, + 0.00022901449, + -0.0006692036, + 0.001359981, + -0.00007581957, + 0.0042616613, + 0.0066381013, + 0.012512821, + 0.021534001, + 0.0032775626, + 0.016913882, + -0.00789934, + -0.009200408, + -0.020286039, + -0.017033368, + 0.014378128, + 0.009233599, + 0.0070828544, + -0.013229736, + 0.025928425, + -0.011862287, + 0.008383922, + 0.012632307, + -0.0003097089, + 0.007593988, + 0.0059079104, + -0.0026369859, + -0.0262205, + 0.003335646, + -0.0067609064, + -0.0042882133, + 0.008549875, + -0.007600626, + -0.012592479, + 0.028623493, + -0.0030502076, + -0.006989921, + -0.015785405, + 0.010050085, + 0.016714739, + -0.023724575, + -0.006346025, + -0.014245366, + -0.032154962, + -0.03388087, + -0.024308728, + -0.002461076, + -0.003733932, + -0.02195884, + -0.021069333, + -0.022144707, + -0.007872788, + -0.017179407, + -0.009034456, + -0.010893124, + -0.02478667, + -0.020153277, + -0.023976821, + 0.014656927, + 0.0005368565, + -0.015878338, + 0.010123105, + -0.0030717815, + 0.01555971, + 0.0018321159, + -0.036244035, + 0.00017176087, + -0.013375774, + -0.010375353, + 0.026512576, + 0.016581977, + 0.013847079, + 0.015719024, + 0.013223098, + 0.004975257, + -0.0010579474, + -0.0034385365, + -0.029048331, + 0.017298892, + -0.022529716, + 0.008463579, + -0.014723309, + -0.005814977, + -0.009027818, + -0.009738095, + -0.0104682855, + -0.005044957, + 0.007905979, + 0.011656506, + 0.003153098, + -0.0005231654, + 0.019954132, + -0.021985391, + -0.005307162, + 0.0021839354, + -0.025184957, + 0.013926737, + -0.0059908866, + 0.0065717204, + 0.009884133, + -0.0062298584, + 0.03388087, + 0.0028577026, + -0.015931444, + 0.0010986058, + -0.025808938, + 0.0022835068, + 0.014152432, + 0.015227805, + 0.013701041, + -0.007872788, + -0.030614924, + -0.026393091, + 0.0010753724, + -0.016940435, + 0.013647936, + -0.007408121, + -0.024308728, + -0.031915992, + -0.018161846, + 0.00072521257, + 0.028862465, + 0.012234021, + -0.019555846, + -0.027641054, + -0.00082810316, + -0.0019150922, + -0.016276624, + -0.01125822, + -0.034146395, + -0.015294186, + 0.006671292, + -0.015533158, + 0.013674489, + -0.0011766035, + -0.017325444, + -0.023233354, + -0.013189907, + 0.0005580154, + -0.03188944, + -0.007056302, + -0.0059942054, + 0.03411984, + 0.04317421, + 0.029420065, + 0.006488744, + -0.0022436783, + 0.013063784, + 0.00012207884, + 0.008118398, + -0.023246631, + 0.0051909955, + -0.00894816, + 0.0081316745, + 0.0023200165, + 0.011510468, + -0.0005770999, + 0.00016979019, + 0.010129742, + 0.015506605, + -0.0073815687, + 0.0031995648, + -0.026578957, + -0.016674912, + 0.0049652997, + 0.0072687212, + -0.016568702, + -0.001964878, + -0.015692472, + -0.0048955996, + 0.027773816, + 0.012864641, + 0.01594472, + 0.008244522, + 0.017139578, + -0.01772373, + -0.0012521119, + 0.011689696, + 0.0111121815, + -0.0036476366, + 0.0012570905, + -0.007826322, + -0.016754568, + 0.011948583, + -0.0045968853, + 0.023963546, + -0.0052739717, + 0.014656927, + 0.009731457, + 0.010727172, + -0.01705992, + -0.0026071144, + 0.010760362, + 0.000919377, + -0.006365939, + -0.03013698, + -0.010554581, + -0.018613236, + 0.013886908, + 0.029420065, + -0.013030593, + 0.016860778, + -0.019237218, + -0.022118153, + 0.007919255, + -0.0004003605, + 0.046546366, + 0.01349526, + 0.006352663, + 0.014258642, + 0.0031813101, + -0.027017072, + 0.0070828544, + -0.020219658, + 0.0037140178, + 0.023366116, + 0.040386207, + -0.016382834, + -0.0023681426, + 0.0064522345, + 0.016528873, + 0.0006804054, + -0.02891557, + -0.0043545947, + 0.01101261, + -0.0014778073, + -0.018055636, + -0.0077001974, + -0.0358723, + 0.003373815, + -0.00071940426, + -0.011822458, + -0.024295451, + -0.009791199, + -0.026565682, + 0.020989677, + -0.035155386, + 0.01832116, + 0.014776413, + -0.028012788, + -0.007262083, + 0.0030402504, + -0.029446619, + 0.00010174965, + 0.009758009, + 0.03767786, + -0.0154535, + 0.009346447, + 0.016077481, + 0.0041189417, + -0.027800368, + 0.01720596, + -0.011158649, + 0.027800368, + -0.03003077, + -0.0072819972, + 0.0014296811, + 0.0145374425, + 0.0043280423, + -0.017086472, + -0.01611731, + -0.01258584, + -0.016927158, + 0.007607264, + 0.018825656, + 0.011331239, + -0.0057784673, + 0.001569911, + -0.013900184, + -0.014776413, + -0.0050814664, + -0.0012454737, + -0.0115967635, + -0.017458206, + -0.013203184, + -0.0063692583, + -0.01244644, + 0.011882202, + 0.0007708495, + -0.02035242, + 0.016250072, + 0.018414093, + -0.029526275, + 0.012751793, + -0.01555971, + 0.0013840442, + -0.019502742, + 0.0063758963, + 0.0037538463, + -0.035686433, + 0.027534844, + -0.016409386, + -0.03247359, + -0.008782208, + -0.0059842486, + 0.014338299, + 0.009233599, + -0.0053171194, + 0.006160158, + 0.0072952732, + 0.01401967, + 0.008815398, + -0.023790956, + 0.013096974, + -0.0031365028, + 0.005044957, + 0.0005356118, + -0.009379637, + 0.0066248253, + -0.00010724682, + 0.010289057, + 0.008815398, + -0.02279524, + -0.019701885, + -0.0027747264, + 0.016183691, + -0.014205537, + -0.003933075, + -0.013375774, + -0.005751915, + -0.010116466, + 0.004988533, + -0.005904591, + -0.008656085, + -0.017431654, + -0.011988411, + -0.01594472, + 0.00660823, + -0.027216217, + 0.0073218257, + -0.029977666, + -0.004593566, + -0.026671892, + -0.028517283, + -0.0050084474, + 0.009844304, + 0.025729282, + -0.013780698, + -0.026751548, + 0.004905557, + -0.035951957, + -0.026738273, + -0.019768266, + 0.0048690476, + 0.005250738, + 0.0014603822, + -0.018892037, + 0.017683903, + 0.0067177587, + 0.027694158, + -0.002618731, + -0.012419888, + 0.01772373, + -0.0032593077, + 0.006611549, + 0.016648358, + -0.03789028, + -0.023100592, + 0.023684746, + 0.0031248862, + 0.016382834, + 0.019967409, + -0.008941523, + -0.02014, + 0.0073882067, + 0.011357792, + -0.0031796505, + -0.0030253148, + -0.0010206081, + -0.017577693, + -0.009598695, + 0.002915786, + 0.001325131, + -0.0029207645, + -0.010780277, + -0.00325101, + -0.00811176, + -0.00073434, + -0.030083876, + -0.012864641, + -0.012745155, + -0.011769353, + 0.018785827, + -0.008264436, + -0.002675155, + 0.024255622, + 0.005483072, + -0.018480474, + -0.005426648, + 0.015095043, + 0.00044392303, + 0.011271496, + -0.0027548121, + 0.0026884312, + -0.00894816, + -0.015161424, + -0.014975557, + -0.024600804, + 0.004457485, + -0.015519881, + -0.012366783, + -0.012579202, + 0.01478969, + 0.0075541595, + -0.017962702, + -0.0017441611, + -0.014059499, + 0.005499667, + -0.0026884312, + 0.0031929268, + 0.0010853296, + -0.008045379, + 0.017471483, + 0.02590187, + -0.018546855, + -0.007826322, + 0.009333171, + 0.0157323, + 0.000086036016, + 0.004776114, + 0.22155327, + 0.006787459, + -0.0017823302, + 0.024919434, + 0.0023449094, + 0.03210186, + 0.0047329664, + -0.010879848, + 0.0044342517, + 0.015334014, + 0.029499723, + 0.019715162, + -0.008569789, + -0.0018901994, + -0.0077400263, + -0.019210665, + -0.005088105, + -0.023153698, + -0.032739118, + -0.029313855, + 0.00082146504, + -0.0212552, + 0.0044309325, + -0.005446562, + 0.018613236, + -0.009751371, + -0.013023955, + -0.001996409, + 0.01915756, + 0.017431654, + -0.031092867, + -0.0070231115, + 0.025330994, + -0.00018099198, + -0.025131851, + -0.011025886, + 0.0116498675, + -0.02506547, + 0.029234199, + -0.012287126, + 0.0069766445, + 0.0018752636, + 0.014271918, + 0.005108019, + -0.0109064, + 0.014391404, + 0.0062597296, + -0.031411495, + 0.00014935728, + 0.013236375, + -0.02891557, + -0.0006671292, + 0.008662722, + 0.012161002, + 0.020963125, + -0.0133691365, + 0.02653913, + -0.017989255, + 0.007978998, + 0.0093398085, + -0.02024621, + 0.03265946, + -0.02846418, + 0.025397375, + -0.024693737, + -0.0027050264, + -0.019330151, + -0.0104417335, + 0.015626092, + -0.006541849, + 0.004653309, + -0.025118576, + 0.0038268655, + 0.004045923, + -0.017564416, + -0.02444149, + 0.030296294, + 0.028756255, + 0.03927101, + 0.010767001, + -0.012034878, + -0.007122683, + -0.022476612, + -0.034942966, + -0.028411074, + -0.03927101, + -0.0037505273, + -0.0038799702, + -0.00037111135, + -0.009718181, + -0.013455432, + -0.015400395, + -0.0066978442, + -0.010760362, + 0.015121595, + 0.03111942, + 0.007992274, + 0.0270569, + -0.003104972, + 0.010056724, + -0.018414093, + 0.006472149, + 0.021281753, + 0.0043579135, + -0.00021490853, + 0.0008546556, + -0.01269205, + -0.003936394, + 0.0008870163, + 0.0009816092, + 0.0054664765, + -0.031278733, + 0.017245788, + 0.00027734818, + 0.005161124, + 0.0048093046, + -0.003923118, + -0.027149836, + 0.006950092, + -0.00615352, + 0.014205537, + 0.0016620146, + 0.0047396044, + 0.0039994563, + -0.015440224, + -0.0055627287, + -0.026273604, + 0.0013276202, + 0.0021009592, + -0.034810204, + 0.0064522345, + 0.00042608313, + 0.02307404, + -0.005957696, + 0.0016869075, + -0.0032775626, + -0.009041094, + -0.01227385, + -0.04349284, + 0.015652644, + 0.013468708, + -0.0023249951, + -0.011171925, + 0.0030352718, + -0.0061203293, + -0.023153698, + 0.046068422, + -0.005582643, + -0.02405648, + 0.005433286, + -0.02814555, + -0.0036874653, + 0.0067841397, + 0.006628144, + 0.029844904, + -0.0044276137, + -0.029127989, + -0.04548427, + 0.022091601, + 0.0038069512, + -0.030269742, + 0.0051578046, + 0.043572497, + -0.0144843375, + -0.02891557, + -0.010461648, + -0.17375894, + 0.029154541, + 0.019648781, + -0.00038335036, + 0.0029572742, + -0.0026469429, + 0.035925403, + -0.012021601, + 0.0015566348, + -0.0033124126, + 0.0010430117, + -0.010620962, + -0.022582822, + 0.00601412, + 0.008364008, + -0.0016586956, + -0.0011102224, + -0.013860356, + 0.022542993, + 0.020564837, + 0.018414093, + -0.008908332, + 0.032951534, + -0.011908754, + 0.010169571, + -0.011198477, + 0.0029108075, + 0.033084296, + 0.0029008503, + -0.0010015236, + -0.019794818, + 0.005844848, + 0.011669782, + 0.0052208668, + 0.010129742, + 0.0037737607, + 0.02880936, + -0.018599961, + -0.015095043, + 0.026578957, + 0.019662056, + 0.006823968, + -0.00045885876, + -0.019396532, + -0.0047993474, + 0.017192682, + 0.039589636, + -0.00874238, + 0.02146762, + -0.007667007, + 0.018785827, + -0.012758431, + -0.010010257, + -0.02052501, + 0.016090758, + 0.0061867107, + -0.0145507185, + 0.008065294, + 0.0104284575, + -0.0022386997, + -0.008324179, + -0.021640211, + 0.01705992, + -0.010541305, + -0.01639611, + -0.0074413116, + -0.034703992, + 0.007016473, + -0.003083398, + 0.0013691084, + -0.005108019, + -0.007886064, + 0.00053270767, + -0.018865485, + 0.025503585, + 0.005101381, + -0.027534844, + 0.015028661, + -0.009286704, + 0.006233177, + 0.00004343289, + 0.036031615, + 0.00957878, + 0.019250493, + 0.0024411618, + 0.0023664832, + -0.0030269742, + -0.007939169, + 0.0058581247, + 0.00587472, + 0.036589216, + -0.035288148, + -0.012997403, + -0.0110989055, + -0.002492607, + 0.008151589, + -0.008085207, + -0.00734174, + -0.0016802694, + 0.008403837, + -0.007793131, + -0.003913161, + -0.025437204, + 0.027123282, + 0.019330151, + -0.008729103, + 0.003943032, + 0.010289057, + 0.029977666, + 0.0014836156, + -0.024282174, + -0.0024361832, + 0.0110325245, + 0.021719867, + 0.012844726, + 0.015002109, + 0.020737428, + -0.013037231, + 0.014802966, + -0.0027332383, + 0.041634172, + -0.00926679, + -0.018759275, + 0.018666342, + 0.005386819, + -0.008822037, + -0.068399, + -0.054804165, + 0.027800368, + 0.04954679, + -0.00437119, + 0.029127989, + 0.03180978, + 0.021321582, + -0.022503164, + 0.010554581, + -0.006823968, + -0.021387963, + -0.021865906, + -0.0074479496, + 0.0037206558, + 0.004132218, + 0.01073381, + -0.0021673401, + -0.0012819833, + 0.041235887, + -0.010202762, + 0.004839176, + 0.0081715025, + -0.030402504, + -0.023764404, + -0.010800191, + -0.018374264, + 0.033641897, + 0.005416691, + -0.0055096243, + -0.0032775626, + -0.018095464, + 0.008563151, + -0.02339267, + -0.013674489, + 0.0023382711, + -0.028411074, + -0.0024063117, + 0.026658615, + -0.012413249, + 0.009333171, + 0.026446195, + -0.009107475, + -0.024560975, + 0.0011085629, + -0.02395027, + 0.0013857037, + 0.01926377, + -0.0020710877, + -0.031278733, + -0.015095043, + 0.0041720467, + -0.012798259, + 0.010162933, + 0.0063128346, + -0.010972782, + 0.045617033, + 0.016874054, + -0.010368714, + -0.0055992384, + -0.0092999805, + 0.0015782086, + -0.013581555, + 0.017843217, + -0.01615714, + 0.0036575939, + -0.027110007, + -0.013621384, + 0.022197811, + 0.0013964906, + -0.007348378, + 0.0145772705, + -0.003996137, + 0.0008364008, + -0.03411984, + 0.013030593, + -0.021454344, + -0.05034336, + 0.021095887, + -0.0055029863, + -0.025623072, + -0.023525432, + 0.007335102, + -0.043413185, + 0.016316453, + 0.016196968, + 0.0093132565, + -0.0110989055, + 0.0154535, + -0.045218747, + 0.0037737607, + 0.01639611, + 0.019887751, + -0.023366116, + -0.024043202, + 0.014258642, + 0.004271618, + -0.006877073, + 0.021387963, + -0.0019781543, + -0.036350243, + -0.009114114, + -0.037359234, + 0.01919739, + 0.011829097, + -0.015665919, + -0.0015591241, + 0.0144843375, + -0.003139822, + -0.024083031, + -0.015307462, + -0.0040990277, + -0.013223098, + 0.0024278855, + -0.008702551, + -0.0033207103, + -0.009804476, + -0.010554581, + 0.031066315, + 0.0044408897, + 0.025370823, + 0.009406189, + 0.025583243, + -0.002066109, + 0.015267633, + 0.008337456, + -0.009426104, + 0.01590489, + -0.011716249, + 0.007713474, + -0.029552827, + -0.013900184, + 0.0050150855, + -0.01650232, + -0.0015757193, + 0.008549875, + -0.020471904, + 0.008397198, + -0.013136802, + 0.021520725, + 0.0060406723, + 0.012858002, + -0.004723009, + -0.029313855, + 0.009240237, + -0.0212552, + -0.028118998, + 0.017803388, + -0.0314646, + 0.012353507, + 0.029632485, + -0.000016128512, + 0.016966987, + 0.009711542, + -0.037253026, + -0.015095043, + 0.013442155, + -0.00905437, + -0.000982439, + -0.0020495139, + 0.008337456, + -0.020644495, + 0.042085562, + -0.000744712, + 0.021135716, + -0.0072886352, + 0.01643594, + 0.013767422, + -0.0044707614, + -0.014763137, + 0.018852208, + -0.03080079, + -0.0049188333, + 0.0058846767, + 0.008330817, + 0.008257798, + 0.024202518, + 0.02307404, + 0.011065715, + 0.00036053188, + -0.00049412367, + 0.036270585, + 0.027043626, + 0.011902116, + -0.027773816, + 0.013289479, + 0.018374264, + -0.0033157317, + 0.0016636741, + 0.0020677685, + -0.012293763, + 0.008184779, + -0.034252603, + 0.010753725, + 0.008675998, + 0.00968499, + -0.003793675, + -0.011218391, + 0.010375353, + -0.0005737809, + 0.019781543, + 0.020591391, + 0.019954132, + -0.00053976063, + -0.0059444197, + -0.022675755, + -0.010003619, + 0.0038467797, + -0.0212552, + -0.033482585, + -0.015572986, + 0.0037737607, + 0.01451089, + 0.0036376796, + 0.007454588, + 0.013979842, + -0.013402327, + 0.014975557, + -0.010435095, + 0.0151747, + -0.030375952, + 0.023166973, + -0.0024760119, + -0.005881358, + 0.019914305, + -0.008596341, + 0.017737007, + -0.0036111271, + 0.012499545, + -0.02647275, + 0.0053901384, + 0.008556513, + 0.019648781, + 0.00874238, + -0.012439802, + -0.028623493, + -0.022330573, + -0.0029340407, + -0.016303178, + 0.007474502, + -0.016555425, + 0.060645696, + 0.0023631642, + -0.012054792, + 0.017604245, + 0.013103612, + 0.026061187, + 0.015533158, + 0.025742557, + 0.00013753316, + -0.013940013, + 0.02880936, + 0.010109829, + -0.0036111271, + -0.012419888, + -0.045457717, + 0.022835068, + -0.014139156, + 0.007819683, + -0.010461648, + -0.012008325, + 0.008895056, + 0.015984548, + 0.024043202, + -0.00059825886, + -0.0036376796, + -0.007939169, + 0.0242689, + -0.022197811, + -0.026313433, + -0.026724996, + 0.010939592, + 0.0023449094, + -0.012074706, + -0.018493751, + 0.017697178, + -0.0052142288, + -0.00360117, + 0.0056058764, + 0.01070062, + 0.0035248317, + 0.023671469, + 0.030880447, + -0.020299314, + -0.0145905465, + 0.018055636, + -0.013727593, + -0.023313012, + 0.013236375, + -0.0020113448 + ] + } + ], + "usage": { + "prompt_tokens": 4, + "total_tokens": 4 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_aml_index.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_aml_index.json new file mode 100644 index 000000000000..151b192a2591 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_aml_index.json @@ -0,0 +1,62 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion for the provided AML index. Uses Azure OpenAI chat extensions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ], + "data_sources": [ + { + "type": "azure_ml_index", + "parameters": { + "project_resource_id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/Microsoft.MachineLearningServices/workspaces/{workspace-id}", + "name": "gm-cars", + "version": "5" + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!", + "context": { + "citations": [ + { + "content": "Content of the citation", + "url": "https://www.example.com", + "title": "Title of the citation", + "filepath": "path/to/file", + "chunk_id": "chunk-id" + } + ] + } + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_advanced.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_advanced.json new file mode 100644 index 000000000000..76867b05e9db --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_advanced.json @@ -0,0 +1,86 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion based on Azure Cognitive Services vector data and user-assigned managed identity. Uses Azure OpenAI chat extensions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ], + "data_sources": [ + { + "type": "azure_search", + "parameters": { + "endpoint": "https://your-search-endpoint.search.windows.net/", + "authentication": { + "type": "user_assigned_managed_identity", + "managed_identity_resource_id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resource-name}" + }, + "index_name": "{index name}", + "query_type": "vector", + "embedding_dependency": { + "type": "deployment_name", + "deployment_name": "{embedding deployment name}" + }, + "in_scope": true, + "top_n_documents": 5, + "strictness": 3, + "role_information": "You are an AI assistant that helps people find information.", + "fields_mapping": { + "content_fields_separator": "\\n", + "content_fields": [ + "content" + ], + "filepath_field": "filepath", + "title_field": "title", + "url_field": "url", + "vector_fields": [ + "contentvector" + ] + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!", + "context": { + "citations": [ + { + "content": "Content of the citation", + "url": "https://www.example.com", + "title": "Title of the citation", + "filepath": "path/to/file", + "chunk_id": "chunk-id" + } + ] + } + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_image_vector.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_image_vector.json new file mode 100644 index 000000000000..2e16b13718d1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_image_vector.json @@ -0,0 +1,67 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion based on Azure Cognitive Services image vector data. Uses Azure OpenAI chat extensions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ], + "data_sources": [ + { + "type": "azure_search", + "parameters": { + "endpoint": "https://your-search-endpoint.search.windows.net/", + "index_name": "{index name}", + "query_type": "vector", + "fields_mapping": { + "image_vector_fields": [ + "image_vector" + ] + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!", + "context": { + "citations": [ + { + "content": "Content of the citation", + "url": "https://www.example.com", + "title": "Title of the citation", + "filepath": "path/to/file", + "chunk_id": "chunk-id" + } + ] + } + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_minimum.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_minimum.json new file mode 100644 index 000000000000..673c52a40431 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_azure_search_minimum.json @@ -0,0 +1,61 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion based on Azure Cognitive Services data and system-assigned managed identity. Uses Azure OpenAI chat extensions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ], + "data_sources": [ + { + "type": "azure_search", + "parameters": { + "endpoint": "https://your-search-endpoint.search.windows.net/", + "index_name": "{index name}" + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!", + "context": { + "citations": [ + { + "content": "Content of the citation", + "url": "https://www.example.com", + "title": "Title of the citation", + "filepath": "path/to/file", + "chunk_id": "chunk-id" + } + ] + } + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_cosmos_db.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_cosmos_db.json new file mode 100644 index 000000000000..4cb94685d394 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_cosmos_db.json @@ -0,0 +1,78 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion for the provided Azure Cosmos DB. Uses Azure OpenAI chat extensions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ], + "data_sources": [ + { + "type": "azure_cosmos_db", + "parameters": { + "authentication": { + "type": "connection_string", + "connection_string": "mongodb+srv://rawantest:{password}$@{cluster-name}.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" + }, + "database_name": "vectordb", + "container_name": "azuredocs", + "index_name": "azuredocindex", + "embedding_dependency": { + "type": "deployment_name", + "deployment_name": "{embedding deployment name}" + }, + "fields_mapping": { + "content_fields": [ + "content" + ], + "vector_fields": [ + "contentvector" + ] + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!", + "context": { + "citations": [ + { + "content": "Content of the citation", + "url": "https://www.example.com", + "title": "Title of the citation", + "filepath": "path/to/file", + "chunk_id": "chunk-id" + } + ] + } + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_elasticsearch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_elasticsearch.json new file mode 100644 index 000000000000..e20d83528781 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_elasticsearch.json @@ -0,0 +1,66 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion for the provided Elasticsearch. Uses Azure OpenAI chat extensions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ], + "data_sources": [ + { + "type": "elasticsearch", + "parameters": { + "endpoint": "https://your-elasticsearch-endpoint.eastus.azurecontainer.io", + "index_name": "{index name}", + "authentication": { + "type": "key_and_key_id", + "key": "{key}", + "key_id": "{key id}" + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!", + "context": { + "citations": [ + { + "content": "Content of the citation", + "url": "https://www.example.com", + "title": "Title of the citation", + "filepath": "path/to/file", + "chunk_id": "chunk-id" + } + ] + } + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_pinecone.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_pinecone.json new file mode 100644 index 000000000000..cc43a1e8bb62 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_extensions_chat_completions_pinecone.json @@ -0,0 +1,78 @@ +{ + "operationId": "GetChatCompletions", + "title": "Creates a completion for the provided Pinecone resource. Uses Azure OpenAI chat extensions.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "messages": [ + { + "role": "user", + "content": "can you tell me how to care for a parrot?" + } + ], + "data_sources": [ + { + "type": "pinecone", + "parameters": { + "authentication": { + "type": "api_key", + "key": "{api key}" + }, + "environment": "{environment name}", + "index_name": "{index name}", + "embedding_dependency": { + "type": "deployment_name", + "deployment_name": "{embedding deployment name}" + }, + "fields_mapping": { + "title_field": "title", + "url_field": "url", + "filepath_field": "filepath", + "content_fields": [ + "content" + ], + "content_fields_separator": "\n" + } + } + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", + "created": 1686676106, + "choices": [ + { + "index": 0, + "finish_reason": "stop", + "message": { + "role": "assistant", + "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!", + "context": { + "citations": [ + { + "content": "Content of the citation", + "url": "https://www.example.com", + "title": "Title of the citation", + "filepath": "path/to/file", + "chunk_id": "chunk-id" + } + ] + } + }, + "logprobs": null + } + ], + "usage": { + "completion_tokens": 557, + "prompt_tokens": 33, + "total_tokens": 590 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_image_generation.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_image_generation.json new file mode 100644 index 000000000000..6d4e47f06f1d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/generated_image_generation.json @@ -0,0 +1,31 @@ +{ + "operationId": "GetImageGenerations", + "title": "Creates images given a prompt.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deploymentId": "", + "body": { + "prompt": "In the style of WordArt, Microsoft Clippy wearing a cowboy hat.", + "n": 1, + "style": "natural", + "quality": "standard" + } + }, + "responses": { + "200": { + "body": { + "created": 1698342300, + "data": [ + { + "url": "https://dalletipusw2.blob.core.windows.net/private/images/e5451cc6-b1ad-4747-bd46-b89a3a3b8bc3/generated_00.png?se=2023-10-27T17%3A45%3A09Z&..." + }, + { + "url": "https://dalletipusw2.blob.core.windows.net/private/images/e5451cc6-b1ad-4747-bd46-b89a3a3b8bc3/generated_01.png?se=2023-10-27T17%3A45%3A09Z&...", + "revised_prompt": "A vivid, natural representation of Microsoft Clippy wearing a cowboy hat." + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_assistant_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_assistant_file.json new file mode 100644 index 000000000000..ec79d4048792 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_assistant_file.json @@ -0,0 +1,19 @@ +{ + "title": "Retrieves an AssistantFile.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "assistant_id": "asst_diz3BOIsXHMnqNnoMCyO9jlA", + "file_id": "assistant-Vau3gDQ1MfiBJk4flihOxwZX" + }, + "responses": { + "200": { + "body": { + "id": "assistant-Vau3gDQ1MfiBJk4flihOxwZX", + "object": "assistant.file", + "created_at": 1707324164, + "assistant_id": "asst_diz3BOIsXHMnqNnoMCyO9jlA" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_assistant_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_assistant_file.yaml new file mode 100644 index 000000000000..613581f70b15 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_assistant_file.yaml @@ -0,0 +1,13 @@ +title: Retrieves an AssistantFile. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + assistant_id: asst_diz3BOIsXHMnqNnoMCyO9jlA + file_id: assistant-Vau3gDQ1MfiBJk4flihOxwZX +responses: + "200": + body: + id: assistant-Vau3gDQ1MfiBJk4flihOxwZX + object: assistant.file + created_at: 1707324164 + assistant_id: asst_diz3BOIsXHMnqNnoMCyO9jlA diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message.json new file mode 100644 index 000000000000..637153e98ced --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message.json @@ -0,0 +1,33 @@ +{ + "title": "Retrieve a message.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "message_id": "msg_as3XIk1tpVP3hdHjWBGg3uG4" + }, + "responses": { + "200": { + "body": { + "id": "msg_as3XIk1tpVP3hdHjWBGg3uG4", + "object": "thread.message", + "created_at": 1707298421, + "thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "role": "user", + "content": [ + { + "type": "text", + "text": { + "value": "What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces.", + "annotations": [] + } + } + ], + "file_ids": [], + "assistant_id": null, + "run_id": null, + "metadata": {} + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message.yaml new file mode 100644 index 000000000000..2e11da0fc395 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message.yaml @@ -0,0 +1,23 @@ +title: Retrieve a message. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_v7V4csrNOxtNmgcwGg496Smx + message_id: msg_as3XIk1tpVP3hdHjWBGg3uG4 +responses: + "200": + body: + id: msg_as3XIk1tpVP3hdHjWBGg3uG4 + object: thread.message + created_at: 1707298421 + thread_id: thread_v7V4csrNOxtNmgcwGg496Smx + role: user + content: + - type: text + text: + value: What is the cube root of the sum of 12, 14, 1234, 4321, 90000, 123213541223, 443123123124, 5423324234, 234324324234, 653434534545, 200000000, 98237432984, 99999999, 99999999999, 220000000000, 3309587702? Give me the answer rounded to the nearest integer without commas or spaces. + annotations: [] + file_ids: [] + assistant_id: null + run_id: null + metadata: {} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message_file.json new file mode 100644 index 000000000000..b0ed9c81860c --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message_file.json @@ -0,0 +1,20 @@ +{ + "title": "Retrieves a message file.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "message_id": "msg_abc123", + "file_id": "file_abc123" + }, + "responses": { + "200": { + "body": { + "id": "file-abc123", + "object": "thread.message.file", + "created_at": 1699061776, + "message_id": "msg_abc123" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message_file.yaml new file mode 100644 index 000000000000..337d7a5b2cc9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_message_file.yaml @@ -0,0 +1,14 @@ +title: Retrieves a message file. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + message_id: msg_abc123 + file_id: file_abc123 +responses: + "200": + body: + id: file-abc123 + object: thread.message.file + created_at: 1699061776 + message_id: msg_abc123 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run.json new file mode 100644 index 000000000000..f1ea386ff1b9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run.json @@ -0,0 +1,32 @@ +{ + "title": "Gets a run.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_eRNwflE3ncDYak1np6MdMHJh", + "run_id": "run_HsO8tYM4K5AAMAHgK0J3om8Q" + }, + "responses": { + "200": { + "body": { + "id": "run_HsO8tYM4K5AAMAHgK0J3om8Q", + "object": "thread.run", + "created_at": 1707303196, + "assistant_id": "asst_JtTwHk28cIocgFXZPCBxhOzl", + "thread_id": "thread_eRNwflE3ncDYak1np6MdMHJh", + "status": "completed", + "started_at": 1707303197, + "expires_at": null, + "cancelled_at": null, + "failed_at": null, + "completed_at": 1707303201, + "last_error": null, + "model": "gpt-4-1106-preview", + "instructions": "You are an AI model that empowers every person and every organization on the planet to achieve more.", + "tools": [], + "file_ids": [], + "metadata": {} + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run.yaml new file mode 100644 index 000000000000..47306e096c4e --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run.yaml @@ -0,0 +1,26 @@ +title: Gets a run. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_eRNwflE3ncDYak1np6MdMHJh + run_id: run_HsO8tYM4K5AAMAHgK0J3om8Q +responses: + "200": + body: + id: run_HsO8tYM4K5AAMAHgK0J3om8Q + object: thread.run + created_at: 1707303196 + assistant_id: asst_JtTwHk28cIocgFXZPCBxhOzl + thread_id: thread_eRNwflE3ncDYak1np6MdMHJh + status: completed + started_at: 1707303197 + expires_at: null + cancelled_at: null + failed_at: null + completed_at: 1707303201 + last_error: null + model: gpt-4-1106-preview + instructions: You are an AI model that empowers every person and every organization on the planet to achieve more. + tools: [] + file_ids: [] + metadata: {} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run_step.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run_step.json new file mode 100644 index 000000000000..34ec39a15235 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run_step.json @@ -0,0 +1,40 @@ +{ + "title": "Retrieves a run step.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_eRNwflE3ncDYak1np6MdMHJh", + "run_id": "run_HsO8tYM4K5AAMAHgK0J3om8Q", + "step_id": "step_abc123" + }, + "responses": { + "200": { + "body": { + "id": "step_abc123", + "object": "thread.run.step", + "created_at": 1699063291, + "run_id": "run_abc123", + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "type": "message_creation", + "status": "completed", + "cancelled_at": null, + "completed_at": 1699063291, + "expired_at": null, + "failed_at": null, + "last_error": null, + "step_details": { + "type": "message_creation", + "message_creation": { + "message_id": "msg_abc123" + } + }, + "usage": { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run_step.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run_step.yaml new file mode 100644 index 000000000000..e156a936a0ed --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/get_run_step.yaml @@ -0,0 +1,31 @@ +title: Retrieves a run step. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_eRNwflE3ncDYak1np6MdMHJh + run_id: run_HsO8tYM4K5AAMAHgK0J3om8Q + step_id: step_abc123 +responses: + "200": + body: + id: step_abc123 + object: thread.run.step + created_at: 1699063291 + run_id: run_abc123 + assistant_id: asst_abc123 + thread_id: thread_abc123 + type: message_creation + status: completed + cancelled_at: null + completed_at: 1699063291 + expired_at: null + failed_at: null + last_error: null + step_details: + type: message_creation + message_creation: + message_id: msg_abc123 + usage: + prompt_tokens: 123 + completion_tokens: 456 + total_tokens: 579 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/image_generation.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/image_generation.json new file mode 100644 index 000000000000..d3e4be3d9831 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/image_generation.json @@ -0,0 +1,71 @@ +{ + "title": "Creates images given a prompt.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "deployment-id": "", + "body": { + "prompt": "In the style of WordArt, Microsoft Clippy wearing a cowboy hat.", + "n": 1, + "style": "natural", + "quality": "standard" + } + }, + "responses": { + "200": { + "body": { + "created": 1698342300, + "data": [ + { + "revised_prompt": "A vivid, natural representation of Microsoft Clippy wearing a cowboy hat.", + "prompt_filter_results": { + "sexual": { + "severity": "safe", + "filtered": false + }, + "violence": { + "severity": "safe", + "filtered": false + }, + "hate": { + "severity": "safe", + "filtered": false + }, + "self_harm": { + "severity": "safe", + "filtered": false + }, + "profanity": { + "detected": false, + "filtered": false + }, + "custom_blocklists": { + "filtered": false, + "details": [] + } + }, + "url": "https://dalletipusw2.blob.core.windows.net/private/images/e5451cc6-b1ad-4747-bd46-b89a3a3b8bc3/generated_00.png?se=2023-10-27T17%3A45%3A09Z&...", + "content_filter_results": { + "sexual": { + "severity": "safe", + "filtered": false + }, + "violence": { + "severity": "safe", + "filtered": false + }, + "hate": { + "severity": "safe", + "filtered": false + }, + "self_harm": { + "severity": "safe", + "filtered": false + } + } + } + ] + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/image_generation.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/image_generation.yaml new file mode 100644 index 000000000000..4e069622e706 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/image_generation.yaml @@ -0,0 +1,49 @@ +title: "Creates images given a prompt." +parameters: + endpoint: "{endpoint}" + api-version: "2024-12-01-preview" + deployment-id: "" + body: + prompt: "In the style of WordArt, Microsoft Clippy wearing a cowboy hat." + n: 1 + style: "natural" + quality: "standard" +responses: + "200": + body: + created: 1698342300 + data: + - revised_prompt: "A vivid, natural representation of Microsoft Clippy wearing a cowboy hat." + prompt_filter_results: + sexual: + severity: "safe" + filtered: false + violence: + severity: "safe" + filtered: false + hate: + severity: "safe" + filtered: false + self_harm: + severity: "safe" + filtered: false + profanity: + detected: false + filtered: false + custom_blocklists: + filtered: false + details: [] + url: "https://dalletipusw2.blob.core.windows.net/private/images/e5451cc6-b1ad-4747-bd46-b89a3a3b8bc3/generated_00.png?se=2023-10-27T17%3A45%3A09Z&..." + content_filter_results: + sexual: + severity: "safe" + filtered: false + violence: + severity: "safe" + filtered: false + hate: + severity: "safe" + filtered: false + self_harm: + severity: "safe" + filtered: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistant_files.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistant_files.json new file mode 100644 index 000000000000..ba69201e35ac --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistant_files.json @@ -0,0 +1,26 @@ +{ + "title": "Returns a list of assistant files.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "assistant_id": "asst_diz3BOIsXHMnqNnoMCyO9jlA" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "assistant-Vau3gDQ1MfiBJk4flihOxwZX", + "object": "assistant.file", + "created_at": 1707324164, + "assistant_id": "asst_diz3BOIsXHMnqNnoMCyO9jlA" + } + ], + "first_id": "assistant-Vau3gDQ1MfiBJk4flihOxwZX", + "last_id": "assistant-Vau3gDQ1MfiBJk4flihOxwZX", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistant_files.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistant_files.yaml new file mode 100644 index 000000000000..ea1b7c548d68 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistant_files.yaml @@ -0,0 +1,17 @@ +title: Returns a list of assistant files. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + assistant_id: asst_diz3BOIsXHMnqNnoMCyO9jlA +responses: + "200": + body: + object: list + data: + - id: assistant-Vau3gDQ1MfiBJk4flihOxwZX + object: assistant.file + created_at: 1707324164 + assistant_id: asst_diz3BOIsXHMnqNnoMCyO9jlA + first_id: assistant-Vau3gDQ1MfiBJk4flihOxwZX + last_id: assistant-Vau3gDQ1MfiBJk4flihOxwZX + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistants.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistants.json new file mode 100644 index 000000000000..7d4abe681ac0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistants.json @@ -0,0 +1,70 @@ +{ + "title": "Returns a list of assistants.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "order": "desc", + "limit": 20 + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "asst_abc123", + "object": "assistant", + "created_at": 1707257477, + "name": "Stock Analyst", + "description": null, + "model": "gpt-4-1106-preview", + "instructions": "You are a financial analyst that analyzes stock market prices and other financial data present on user uploaded files or by calling external APIs.", + "tools": [ + { + "type": "code_interpreter" + } + ], + "tool_resources": {}, + "metadata": {}, + "top_p": 1.0, + "temperature": 1.0, + "response_format": "auto" + }, + { + "id": "asst_abc456", + "object": "assistant", + "created_at": 1698982718, + "name": "My Assistant", + "description": null, + "model": "gpt-4-turbo", + "instructions": "You are a helpful assistant designed to make me better at coding!", + "tools": [], + "tool_resources": {}, + "metadata": {}, + "top_p": 1.0, + "temperature": 1.0, + "response_format": "auto" + }, + { + "id": "asst_abc789", + "object": "assistant", + "created_at": 1698982643, + "name": null, + "description": null, + "model": "gpt-4-turbo", + "instructions": null, + "tools": [], + "tool_resources": {}, + "metadata": {}, + "top_p": 1.0, + "temperature": 1.0, + "response_format": "auto" + } + ], + "first_id": "asst_abc123", + "last_id": "asst_abc789", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistants.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistants.yaml new file mode 100644 index 000000000000..34f002fc2d55 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_assistants.yaml @@ -0,0 +1,54 @@ +title: Returns a list of assistants. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + order: desc + limit: 20 +responses: + "200": + body: + object: list + data: + - id: asst_abc123 + object: assistant + created_at: 1707257477 + name: Stock Analyst + description: null + model: gpt-4-1106-preview + instructions: You are a financial analyst that analyzes stock market prices and other financial data present on user uploaded files or by calling external APIs. + tools: + - type: code_interpreter + tool_resources: {} + metadata: {} + top_p: 1 + temperature: 1 + response_format: auto + - id: asst_abc456 + object: assistant + created_at: 1698982718 + name: My Assistant + description: null + model: gpt-4-turbo + instructions: You are a helpful assistant designed to make me better at coding! + tools: [] + tool_resources: {} + metadata: {} + top_p: 1 + temperature: 1 + response_format: auto + - id: asst_abc789 + object: assistant + created_at: 1698982643 + name: null + description: null + model: gpt-4-turbo + instructions: null + tools: [] + tool_resources: {} + metadata: {} + top_p: 1 + temperature: 1 + response_format: auto + first_id: asst_abc123 + last_id: asst_abc789 + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_message_files.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_message_files.json new file mode 100644 index 000000000000..38866c4f157b --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_message_files.json @@ -0,0 +1,33 @@ +{ + "title": "Returns a list of message files.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "message_id": "msg_abc123" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "file-abc123", + "object": "thread.message.file", + "created_at": 1699061776, + "message_id": "msg_abc123" + }, + { + "id": "file-abc123", + "object": "thread.message.file", + "created_at": 1699061776, + "message_id": "msg_abc123" + } + ], + "first_id": "file-abc123", + "last_id": "file-abc123", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_message_files.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_message_files.yaml new file mode 100644 index 000000000000..382a6253eac7 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_message_files.yaml @@ -0,0 +1,22 @@ +title: Returns a list of message files. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + message_id: msg_abc123 +responses: + "200": + body: + object: list + data: + - id: file-abc123 + object: thread.message.file + created_at: 1699061776 + message_id: msg_abc123 + - id: file-abc123 + object: thread.message.file + created_at: 1699061776 + message_id: msg_abc123 + first_id: file-abc123 + last_id: file-abc123 + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_messages.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_messages.json new file mode 100644 index 000000000000..8ff82d560c98 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_messages.json @@ -0,0 +1,60 @@ +{ + "title": "List Messages", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "msg_abc123", + "object": "thread.message", + "created_at": 1699016383, + "assistant_id": null, + "thread_id": "thread_abc123", + "run_id": null, + "role": "user", + "content": [ + { + "type": "text", + "text": { + "value": "How does AI work? Explain it in simple terms.", + "annotations": [] + } + } + ], + "attachments": [], + "metadata": {} + }, + { + "id": "msg_abc456", + "object": "thread.message", + "created_at": 1699016383, + "assistant_id": null, + "thread_id": "thread_abc123", + "run_id": null, + "role": "user", + "content": [ + { + "type": "text", + "text": { + "value": "Hello, what is AI?", + "annotations": [] + } + } + ], + "attachments": [], + "metadata": {} + } + ], + "first_id": "msg_abc123", + "last_id": "msg_abc456", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_messages.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_messages.yaml new file mode 100644 index 000000000000..8a28e2feaee3 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_messages.yaml @@ -0,0 +1,41 @@ +title: List Messages +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 +responses: + "200": + body: + object: list + data: + - id: msg_abc123 + object: thread.message + created_at: 1699016383 + assistant_id: null + thread_id: thread_abc123 + run_id: null + role: user + content: + - type: text + text: + value: How does AI work? Explain it in simple terms. + annotations: [] + attachments: [] + metadata: {} + - id: msg_abc456 + object: thread.message + created_at: 1699016383 + assistant_id: null + thread_id: thread_abc123 + run_id: null + role: user + content: + - type: text + text: + value: Hello, what is AI? + annotations: [] + attachments: [] + metadata: {} + first_id: msg_abc123 + last_id: msg_abc456 + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_run_steps.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_run_steps.json new file mode 100644 index 000000000000..9ff30947afd1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_run_steps.json @@ -0,0 +1,47 @@ +{ + "title": "Returns a list of run steps belonging to a run.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "run_id": "run_abc123" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "step_abc123", + "object": "thread.run.step", + "created_at": 1699063291, + "run_id": "run_abc123", + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "type": "message_creation", + "status": "completed", + "cancelled_at": null, + "completed_at": 1699063291, + "expired_at": null, + "failed_at": null, + "last_error": null, + "step_details": { + "type": "message_creation", + "message_creation": { + "message_id": "msg_abc123" + } + }, + "usage": { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579 + } + } + ], + "first_id": "step_abc123", + "last_id": "step_abc456", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_run_steps.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_run_steps.yaml new file mode 100644 index 000000000000..35b28411b4d1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_run_steps.yaml @@ -0,0 +1,35 @@ +title: Returns a list of run steps belonging to a run. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + run_id: run_abc123 +responses: + "200": + body: + object: list + data: + - id: step_abc123 + object: thread.run.step + created_at: 1699063291 + run_id: run_abc123 + assistant_id: asst_abc123 + thread_id: thread_abc123 + type: message_creation + status: completed + cancelled_at: null + completed_at: 1699063291 + expired_at: null + failed_at: null + last_error: null + step_details: + type: message_creation + message_creation: + message_id: msg_abc123 + usage: + prompt_tokens: 123 + completion_tokens: 456 + total_tokens: 579 + first_id: step_abc123 + last_id: step_abc456 + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_runs.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_runs.json new file mode 100644 index 000000000000..244056bf4d15 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_runs.json @@ -0,0 +1,112 @@ +{ + "title": "Returns a list of runs belonging to a thread.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "run_abc123", + "object": "thread.run", + "created_at": 1699075072, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "completed", + "started_at": 1699075072, + "expires_at": null, + "cancelled_at": null, + "failed_at": null, + "completed_at": 1699075073, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": null, + "incomplete_details": null, + "tools": [ + { + "type": "code_interpreter" + } + ], + "tool_resources": { + "code_interpreter": { + "file_ids": [ + "file-abc123", + "file-abc456" + ] + } + }, + "metadata": {}, + "usage": { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579 + }, + "temperature": 1.0, + "top_p": 1.0, + "max_prompt_tokens": 1000, + "max_completion_tokens": 1000, + "truncation_strategy": { + "type": "auto", + "last_messages": null + }, + "response_format": "auto", + "tool_choice": "auto" + }, + { + "id": "run_abc456", + "object": "thread.run", + "created_at": 1699063290, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "completed", + "started_at": 1699063290, + "expires_at": null, + "cancelled_at": null, + "failed_at": null, + "completed_at": 1699063291, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": null, + "incomplete_details": null, + "tools": [ + { + "type": "code_interpreter" + } + ], + "tool_resources": { + "code_interpreter": { + "file_ids": [ + "file-abc123", + "file-abc456" + ] + } + }, + "metadata": {}, + "usage": { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579 + }, + "temperature": 1.0, + "top_p": 1.0, + "max_prompt_tokens": 1000, + "max_completion_tokens": 1000, + "truncation_strategy": { + "type": "auto", + "last_messages": null + }, + "response_format": "auto", + "tool_choice": "auto" + } + ], + "first_id": "run_abc123", + "last_id": "run_abc456", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_runs.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_runs.yaml new file mode 100644 index 000000000000..10be1bfa1c16 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_runs.yaml @@ -0,0 +1,85 @@ +title: Returns a list of runs belonging to a thread. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 +responses: + "200": + body: + object: list + data: + - id: run_abc123 + object: thread.run + created_at: 1699075072 + assistant_id: asst_abc123 + thread_id: thread_abc123 + status: completed + started_at: 1699075072 + expires_at: null + cancelled_at: null + failed_at: null + completed_at: 1699075073 + last_error: null + model: gpt-4-turbo + instructions: null + incomplete_details: null + tools: + - type: code_interpreter + tool_resources: + code_interpreter: + file_ids: + - file-abc123 + - file-abc456 + metadata: {} + usage: + prompt_tokens: 123 + completion_tokens: 456 + total_tokens: 579 + temperature: 1 + top_p: 1 + max_prompt_tokens: 1000 + max_completion_tokens: 1000 + truncation_strategy: + type: auto + last_messages: null + response_format: auto + tool_choice: auto + - id: run_abc456 + object: thread.run + created_at: 1699063290 + assistant_id: asst_abc123 + thread_id: thread_abc123 + status: completed + started_at: 1699063290 + expires_at: null + cancelled_at: null + failed_at: null + completed_at: 1699063291 + last_error: null + model: gpt-4-turbo + instructions: null + incomplete_details: null + tools: + - type: code_interpreter + tool_resources: + code_interpreter: + file_ids: + - file-abc123 + - file-abc456 + metadata: {} + usage: + prompt_tokens: 123 + completion_tokens: 456 + total_tokens: 579 + temperature: 1 + top_p: 1 + max_prompt_tokens: 1000 + max_completion_tokens: 1000 + truncation_strategy: + type: auto + last_messages: null + response_format: auto + tool_choice: auto + first_id: run_abc123 + last_id: run_abc456 + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_file_batch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_file_batch.json new file mode 100644 index 000000000000..513d2fe40498 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_file_batch.json @@ -0,0 +1,33 @@ +{ + "title": "Returns a list of vector store files in a batch.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "batch_id": "vsfb_abc123" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "file-abc123", + "object": "vector_store.file", + "created_at": 1699061776, + "vector_store_id": "vs_abc123" + }, + { + "id": "file-abc456", + "object": "vector_store.file", + "created_at": 1699061776, + "vector_store_id": "vs_abc123" + } + ], + "first_id": "file-abc123", + "last_id": "file-abc456", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_file_batch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_file_batch.yaml new file mode 100644 index 000000000000..ff50bb2b3f9c --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_file_batch.yaml @@ -0,0 +1,22 @@ +title: Returns a list of vector store files in a batch. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + batch_id: vsfb_abc123 +responses: + "200": + body: + object: list + data: + - id: file-abc123 + object: vector_store.file + created_at: 1699061776 + vector_store_id: vs_abc123 + - id: file-abc456 + object: vector_store.file + created_at: 1699061776 + vector_store_id: vs_abc123 + first_id: file-abc123 + last_id: file-abc456 + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_files.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_files.json new file mode 100644 index 000000000000..d5fe698359a0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_files.json @@ -0,0 +1,32 @@ +{ + "title": "Returns a list of vector store files.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "file-abc123", + "object": "vector_store.file", + "created_at": 1699061776, + "vector_store_id": "vs_abc123" + }, + { + "id": "file-abc456", + "object": "vector_store.file", + "created_at": 1699061776, + "vector_store_id": "vs_abc123" + } + ], + "first_id": "file-abc123", + "last_id": "file-abc456", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_files.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_files.yaml new file mode 100644 index 000000000000..c7b40679f127 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_store_files.yaml @@ -0,0 +1,21 @@ +title: Returns a list of vector store files. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 +responses: + "200": + body: + object: list + data: + - id: file-abc123 + object: vector_store.file + created_at: 1699061776 + vector_store_id: vs_abc123 + - id: file-abc456 + object: vector_store.file + created_at: 1699061776 + vector_store_id: vs_abc123 + first_id: file-abc123 + last_id: file-abc456 + has_more: false diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_stores.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_stores.json new file mode 100644 index 000000000000..988d6b4335f2 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_stores.json @@ -0,0 +1,47 @@ +{ + "title": "Returns a list of vector stores.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview" + }, + "responses": { + "200": { + "body": { + "object": "list", + "data": [ + { + "id": "vs_abc123", + "object": "vector_store", + "created_at": 1699061776, + "name": "Support FAQ", + "bytes": 139920, + "file_counts": { + "in_progress": 0, + "completed": 3, + "failed": 0, + "cancelled": 0, + "total": 3 + } + }, + { + "id": "vs_abc456", + "object": "vector_store", + "created_at": 1699061776, + "name": "Support FAQ v2", + "bytes": 139920, + "file_counts": { + "in_progress": 0, + "completed": 3, + "failed": 0, + "cancelled": 0, + "total": 3 + } + } + ], + "first_id": "vs_abc123", + "last_id": "vs_abc456", + "has_more": false + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_stores.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_stores.yaml new file mode 100644 index 000000000000..918164bdb312 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/list_vector_stores.yaml @@ -0,0 +1,51 @@ +{ + "title": "Returns a list of vector stores.", + "parameters": + { "endpoint": "{endpoint}", "api-version": "2024-12-01-preview" }, + "responses": + { + "200": + { + "body": + { + "object": "list", + "data": + [ + { + "id": "vs_abc123", + "object": "vector_store", + "created_at": 1699061776, + "name": "Support FAQ", + "bytes": 139920, + "file_counts": + { + "in_progress": 0, + "completed": 3, + "failed": 0, + "cancelled": 0, + "total": 3, + }, + }, + { + "id": "vs_abc456", + "object": "vector_store", + "created_at": 1699061776, + "name": "Support FAQ v2", + "bytes": 139920, + "file_counts": + { + "in_progress": 0, + "completed": 3, + "failed": 0, + "cancelled": 0, + "total": 3, + }, + }, + ], + "first_id": "vs_abc123", + "last_id": "vs_abc456", + "has_more": false, + }, + }, + }, +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_assistant.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_assistant.json new file mode 100644 index 000000000000..502a99ad5f5d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_assistant.json @@ -0,0 +1,44 @@ +{ + "title": "Modifies an assistant.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "assistant_id": "asst_abc123", + "body": { + "instructions": "You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.", + "tools": [ + { + "type": "file_search" + } + ], + "model": "gpt-4-turbo" + } + }, + "responses": { + "200": { + "body": { + "id": "asst_123", + "object": "assistant", + "created_at": 1699009709, + "name": "HR Helper", + "description": null, + "model": "gpt-4-turbo", + "instructions": "You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files.", + "tools": [ + { + "type": "file_search" + } + ], + "tool_resources": { + "file_search": { + "vector_store_ids": [] + } + }, + "metadata": {}, + "top_p": 1.0, + "temperature": 1.0, + "response_format": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_assistant.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_assistant.yaml new file mode 100644 index 000000000000..9d431a661b4b --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_assistant.yaml @@ -0,0 +1,29 @@ +title: Modifies an assistant. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + assistant_id: asst_abc123 + body: + instructions: You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files. + tools: + - type: file_search + model: gpt-4-turbo +responses: + "200": + body: + id: asst_123 + object: assistant + created_at: 1699009709 + name: HR Helper + description: null + model: gpt-4-turbo + instructions: You are an HR bot, and you have access to files to answer employee questions about company policies. Always response with info from either of the files. + tools: + - type: file_search + tool_resources: + file_search: + vector_store_ids: [] + metadata: {} + top_p: 1 + temperature: 1 + response_format: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_message.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_message.json new file mode 100644 index 000000000000..d7f2511845c9 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_message.json @@ -0,0 +1,42 @@ +{ + "title": "Modify a message.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "message_id": "msg_abc123 ", + "body": { + "metadata": { + "modified": "true", + "user": "abc123" + } + } + }, + "responses": { + "200": { + "body": { + "id": "msg_abc123", + "object": "thread.message", + "created_at": 1699017614, + "assistant_id": null, + "thread_id": "thread_abc123", + "run_id": null, + "role": "user", + "content": [ + { + "type": "text", + "text": { + "value": "How does AI work? Explain it in simple terms.", + "annotations": [] + } + } + ], + "file_ids": [], + "metadata": { + "modified": "true", + "user": "abc123" + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_message.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_message.yaml new file mode 100644 index 000000000000..9023f1ce965f --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_message.yaml @@ -0,0 +1,29 @@ +title: Modify a message. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + message_id: "msg_abc123 " + body: + metadata: + modified: "true" + user: abc123 +responses: + "200": + body: + id: msg_abc123 + object: thread.message + created_at: 1699017614 + assistant_id: null + thread_id: thread_abc123 + run_id: null + role: user + content: + - type: text + text: + value: How does AI work? Explain it in simple terms. + annotations: [] + file_ids: [] + metadata: + modified: "true" + user: abc123 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_run.json new file mode 100644 index 000000000000..018f0f6259de --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_run.json @@ -0,0 +1,66 @@ +{ + "title": "Modifies a run.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "run_id": "run_abc123", + "body": { + "metadata": { + "user_id": "user_abc123" + } + } + }, + "responses": { + "200": { + "body": { + "id": "run_abc123", + "object": "thread.run", + "created_at": 1699075072, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "completed", + "started_at": 1699075072, + "expires_at": null, + "cancelled_at": null, + "failed_at": null, + "completed_at": 1699075073, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": null, + "incomplete_details": null, + "tools": [ + { + "type": "code_interpreter" + } + ], + "tool_resources": { + "code_interpreter": { + "file_ids": [ + "file-abc123", + "file-abc456" + ] + } + }, + "metadata": { + "user_id": "user_abc123" + }, + "usage": { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579 + }, + "temperature": 1.0, + "top_p": 1.0, + "max_prompt_tokens": 1000, + "max_completion_tokens": 1000, + "truncation_strategy": { + "type": "auto", + "last_messages": null + }, + "response_format": "auto", + "tool_choice": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_run.yaml new file mode 100644 index 000000000000..d9e48767c2ff --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_run.yaml @@ -0,0 +1,55 @@ +{ + "title": "Modifies a run.", + "parameters": + { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "run_id": "run_abc123", + "body": { "metadata": { "user_id": "user_abc123" } }, + }, + "responses": + { + "200": + { + "body": + { + "id": "run_abc123", + "object": "thread.run", + "created_at": 1699075072, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "completed", + "started_at": 1699075072, + "expires_at": null, + "cancelled_at": null, + "failed_at": null, + "completed_at": 1699075073, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": null, + "incomplete_details": null, + "tools": [{ "type": "code_interpreter" }], + "tool_resources": + { + "code_interpreter": + { "file_ids": ["file-abc123", "file-abc456"] }, + }, + "metadata": { "user_id": "user_abc123" }, + "usage": + { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579, + }, + "temperature": 1.0, + "top_p": 1.0, + "max_prompt_tokens": 1000, + "max_completion_tokens": 1000, + "truncation_strategy": { "type": "auto", "last_messages": null }, + "response_format": "auto", + "tool_choice": "auto", + }, + }, + }, +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_thread.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_thread.json new file mode 100644 index 000000000000..7af0b9930ce0 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_thread.json @@ -0,0 +1,28 @@ +{ + "title": "Modifies a thread.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "body": { + "metadata": { + "modified": "true", + "user": "abc123" + } + } + }, + "responses": { + "200": { + "body": { + "id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "object": "thread", + "created_at": 1707297136, + "metadata": { + "modified": "true", + "user": "abc123" + }, + "tool_resources": {} + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_thread.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_thread.yaml new file mode 100644 index 000000000000..597f57bcf3b4 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_thread.yaml @@ -0,0 +1,19 @@ +title: Modifies a thread. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_v7V4csrNOxtNmgcwGg496Smx + body: + metadata: + modified: "true" + user: abc123 +responses: + "200": + body: + id: thread_v7V4csrNOxtNmgcwGg496Smx + object: thread + created_at: 1707297136 + metadata: + modified: "true" + user: abc123 + tool_resources: {} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_vector_store.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_vector_store.json new file mode 100644 index 000000000000..e5a93e54a736 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_vector_store.json @@ -0,0 +1,29 @@ +{ + "title": "Modifies a vector store.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "body": { + "name": "Support FAQ" + } + }, + "responses": { + "200": { + "body": { + "id": "vs_abc123", + "object": "vector_store", + "created_at": 1699061776, + "name": "Support FAQ", + "bytes": 139920, + "file_counts": { + "in_progress": 0, + "completed": 3, + "failed": 0, + "cancelled": 0, + "total": 3 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_vector_store.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_vector_store.yaml new file mode 100644 index 000000000000..00ef0c379f7d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/modify_vector_store.yaml @@ -0,0 +1,21 @@ +title: Modifies a vector store. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + body: + name: Support FAQ +responses: + "200": + body: + id: vs_abc123 + object: vector_store + created_at: 1699061776 + name: Support FAQ + bytes: 139920 + file_counts: + in_progress: 0 + completed: 3 + failed: 0 + cancelled: 0 + total: 3 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_assistant.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_assistant.json new file mode 100644 index 000000000000..7ce017b9706d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_assistant.json @@ -0,0 +1,30 @@ +{ + "title": "Retrieves an assistant.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "assistant_id": "asst_abc123" + }, + "responses": { + "200": { + "body": { + "id": "asst_abc123", + "object": "assistant", + "created_at": 1699009709, + "name": "HR Helper", + "description": null, + "model": "gpt-4-turbo", + "instructions": "You are an HR bot, and you have access to files to answer employee questions about company policies.", + "tools": [ + { + "type": "file_search" + } + ], + "metadata": {}, + "top_p": 1.0, + "temperature": 1.0, + "response_format": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_assistant.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_assistant.yaml new file mode 100644 index 000000000000..34a809f5e508 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_assistant.yaml @@ -0,0 +1,21 @@ +title: Retrieves an assistant. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + assistant_id: asst_abc123 +responses: + "200": + body: + id: asst_abc123 + object: assistant + created_at: 1699009709 + name: HR Helper + description: null + model: gpt-4-turbo + instructions: You are an HR bot, and you have access to files to answer employee questions about company policies. + tools: + - type: file_search + metadata: {} + top_p: 1 + temperature: 1 + response_format: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_message.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_message.json new file mode 100644 index 000000000000..2a09844600dd --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_message.json @@ -0,0 +1,33 @@ +{ + "title": "Retrieves a message.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "message_id": "msg_abc123" + }, + "responses": { + "200": { + "body": { + "id": "msg_abc123", + "object": "thread.message", + "created_at": 1699017614, + "assistant_id": null, + "thread_id": "thread_abc123", + "run_id": null, + "role": "user", + "content": [ + { + "type": "text", + "text": { + "value": "How does AI work? Explain it in simple terms.", + "annotations": [] + } + } + ], + "attachments": [], + "metadata": {} + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_message.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_message.yaml new file mode 100644 index 000000000000..1b8d71f94cea --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_message.yaml @@ -0,0 +1,23 @@ +title: Retrieves a message. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + message_id: msg_abc123 +responses: + "200": + body: + id: msg_abc123 + object: thread.message + created_at: 1699017614 + assistant_id: null + thread_id: thread_abc123 + run_id: null + role: user + content: + - type: text + text: + value: How does AI work? Explain it in simple terms. + annotations: [] + attachments: [] + metadata: {} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run.json new file mode 100644 index 000000000000..c23afa761b47 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run.json @@ -0,0 +1,51 @@ +{ + "title": "Retrieves a run.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "run_id": "run_abc123" + }, + "responses": { + "200": { + "body": { + "id": "run_abc123", + "object": "thread.run", + "created_at": 1699075072, + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "status": "completed", + "started_at": 1699075072, + "expires_at": null, + "cancelled_at": null, + "failed_at": null, + "completed_at": 1699075073, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": null, + "incomplete_details": null, + "tools": [ + { + "type": "code_interpreter" + } + ], + "metadata": {}, + "usage": { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579 + }, + "temperature": 1.0, + "top_p": 1.0, + "max_prompt_tokens": 1000, + "max_completion_tokens": 1000, + "truncation_strategy": { + "type": "auto", + "last_messages": null + }, + "response_format": "auto", + "tool_choice": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run.yaml new file mode 100644 index 000000000000..21d68339d080 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run.yaml @@ -0,0 +1,40 @@ +title: Retrieves a run. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + run_id: run_abc123 +responses: + "200": + body: + id: run_abc123 + object: thread.run + created_at: 1699075072 + assistant_id: asst_abc123 + thread_id: thread_abc123 + status: completed + started_at: 1699075072 + expires_at: null + cancelled_at: null + failed_at: null + completed_at: 1699075073 + last_error: null + model: gpt-4-turbo + instructions: null + incomplete_details: null + tools: + - type: code_interpreter + metadata: {} + usage: + prompt_tokens: 123 + completion_tokens: 456 + total_tokens: 579 + temperature: 1 + top_p: 1 + max_prompt_tokens: 1000 + max_completion_tokens: 1000 + truncation_strategy: + type: auto + last_messages: null + response_format: auto + tool_choice: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run_step.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run_step.json new file mode 100644 index 000000000000..b81cfa123327 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run_step.json @@ -0,0 +1,40 @@ +{ + "title": "Retrieves a run step.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_abc123", + "run_id": "run_abc123", + "step_id": "step_abc123" + }, + "responses": { + "200": { + "body": { + "id": "step_abc123", + "object": "thread.run.step", + "created_at": 1699063291, + "run_id": "run_abc123", + "assistant_id": "asst_abc123", + "thread_id": "thread_abc123", + "type": "message_creation", + "status": "completed", + "cancelled_at": null, + "completed_at": 1699063291, + "expired_at": null, + "failed_at": null, + "last_error": null, + "step_details": { + "type": "message_creation", + "message_creation": { + "message_id": "msg_abc123" + } + }, + "usage": { + "prompt_tokens": 123, + "completion_tokens": 456, + "total_tokens": 579 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run_step.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run_step.yaml new file mode 100644 index 000000000000..240b8fdaaa49 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_run_step.yaml @@ -0,0 +1,31 @@ +title: Retrieves a run step. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_abc123 + run_id: run_abc123 + step_id: step_abc123 +responses: + "200": + body: + id: step_abc123 + object: thread.run.step + created_at: 1699063291 + run_id: run_abc123 + assistant_id: asst_abc123 + thread_id: thread_abc123 + type: message_creation + status: completed + cancelled_at: null + completed_at: 1699063291 + expired_at: null + failed_at: null + last_error: null + step_details: + type: message_creation + message_creation: + message_id: msg_abc123 + usage: + prompt_tokens: 123 + completion_tokens: 456 + total_tokens: 579 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_thread.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_thread.json new file mode 100644 index 000000000000..2e9e9d423576 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_thread.json @@ -0,0 +1,23 @@ +{ + "title": "Retrieves a thread.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_v7V4csrNOxtNmgcwGg496Smx" + }, + "responses": { + "200": { + "body": { + "id": "thread_v7V4csrNOxtNmgcwGg496Smx", + "object": "thread", + "created_at": 1707297136, + "metadata": {}, + "tool_resources": { + "code_interpreter": { + "file_ids": [] + } + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_thread.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_thread.yaml new file mode 100644 index 000000000000..015fc3268412 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_thread.yaml @@ -0,0 +1,15 @@ +title: Retrieves a thread. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_v7V4csrNOxtNmgcwGg496Smx +responses: + "200": + body: + id: thread_v7V4csrNOxtNmgcwGg496Smx + object: thread + created_at: 1707297136 + metadata: {} + tool_resources: + code_interpreter: + file_ids: [] diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store.json new file mode 100644 index 000000000000..088c4a801241 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store.json @@ -0,0 +1,17 @@ +{ + "title": "Retrieves a vector store.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123" + }, + "responses": { + "200": { + "body": { + "id": "vs_abc123", + "object": "vector_store", + "created_at": 1699061776 + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store.yaml new file mode 100644 index 000000000000..04a6a1da079b --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store.yaml @@ -0,0 +1,11 @@ +title: Retrieves a vector store. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 +responses: + "200": + body: + id: vs_abc123 + object: vector_store + created_at: 1699061776 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file.json new file mode 100644 index 000000000000..7ad62afb2bbe --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file.json @@ -0,0 +1,21 @@ +{ + "title": "Retrieves a vector store file.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "file_id": "file-abc123" + }, + "responses": { + "200": { + "body": { + "id": "file-abc123", + "object": "vector_store.file", + "created_at": 1699061776, + "vector_store_id": "vs_abcd", + "status": "completed", + "last_error": null + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file.yaml new file mode 100644 index 000000000000..6586a4bb76bd --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file.yaml @@ -0,0 +1,15 @@ +title: Retrieves a vector store file. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + file_id: file-abc123 +responses: + "200": + body: + id: file-abc123 + object: vector_store.file + created_at: 1699061776 + vector_store_id: vs_abcd + status: completed + last_error: null diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file_batch.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file_batch.json new file mode 100644 index 000000000000..846c6ee29f3b --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file_batch.json @@ -0,0 +1,27 @@ +{ + "title": "Retrieves a vector store file batch.", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "vector_store_id": "vs_abc123", + "batch_id": "vsfb_abc123" + }, + "responses": { + "200": { + "body": { + "id": "vsfb_abc123", + "object": "vector_store.file_batch", + "created_at": 1699061776, + "vector_store_id": "vs_abc123", + "status": "in_progress", + "file_counts": { + "in_progress": 1, + "completed": 1, + "failed": 0, + "cancelled": 0, + "total": 0 + } + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file_batch.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file_batch.yaml new file mode 100644 index 000000000000..599ef35e8bb1 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/retrieve_vector_store_file_batch.yaml @@ -0,0 +1,20 @@ +title: Retrieves a vector store file batch. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + vector_store_id: vs_abc123 + batch_id: vsfb_abc123 +responses: + "200": + body: + id: vsfb_abc123 + object: vector_store.file_batch + created_at: 1699061776 + vector_store_id: vs_abc123 + status: in_progress + file_counts: + in_progress: 1 + completed: 1 + failed: 0 + cancelled: 0 + total: 0 diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/submit_tool_outputs_to_run.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/submit_tool_outputs_to_run.json new file mode 100644 index 000000000000..de4110246f97 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/submit_tool_outputs_to_run.json @@ -0,0 +1,77 @@ +{ + "title": "When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.\n", + "parameters": { + "endpoint": "{endpoint}", + "api-version": "2024-12-01-preview", + "thread_id": "thread_123", + "run_id": "run_123", + "body": { + "tool_outputs": [ + { + "tool_call_id": "call_001", + "output": "70 degrees and sunny." + } + ] + } + }, + "responses": { + "200": { + "body": { + "id": "run_123", + "object": "thread.run", + "created_at": 1699075592, + "assistant_id": "asst_123", + "thread_id": "thread_123", + "status": "queued", + "started_at": 1699075592, + "expires_at": 1699076192, + "cancelled_at": null, + "failed_at": null, + "completed_at": null, + "last_error": null, + "model": "gpt-4-turbo", + "instructions": null, + "tools": [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA" + }, + "unit": { + "type": "string", + "enum": [ + "celsius", + "fahrenheit" + ] + } + }, + "required": [ + "location" + ] + } + } + } + ], + "metadata": {}, + "usage": null, + "temperature": 1.0, + "top_p": 1.0, + "max_prompt_tokens": 1000, + "max_completion_tokens": 1000, + "truncation_strategy": { + "type": "auto", + "last_messages": null + }, + "response_format": "auto", + "tool_choice": "auto" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/submit_tool_outputs_to_run.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/submit_tool_outputs_to_run.yaml new file mode 100644 index 000000000000..65486ee32363 --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/examples/submit_tool_outputs_to_run.yaml @@ -0,0 +1,57 @@ +title: | + When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. +parameters: + endpoint: "{endpoint}" + api-version: 2024-12-01-preview + thread_id: thread_123 + run_id: run_123 + body: + tool_outputs: + - tool_call_id: call_001 + output: 70 degrees and sunny. +responses: + "200": + body: + id: run_123 + object: thread.run + created_at: 1699075592 + assistant_id: asst_123 + thread_id: thread_123 + status: queued + started_at: 1699075592 + expires_at: 1699076192 + cancelled_at: null + failed_at: null + completed_at: null + last_error: null + model: gpt-4-turbo + instructions: null + tools: + - type: function + function: + name: get_current_weather + description: Get the current weather in a given location + parameters: + type: object + properties: + location: + type: string + description: The city and state, e.g. San Francisco, CA + unit: + type: string + enum: + - celsius + - fahrenheit + required: + - location + metadata: {} + usage: null + temperature: 1 + top_p: 1 + max_prompt_tokens: 1000 + max_completion_tokens: 1000 + truncation_strategy: + type: auto + last_messages: null + response_format: auto + tool_choice: auto diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/inference.json b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/inference.json new file mode 100644 index 000000000000..ac66d046534d --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/inference.json @@ -0,0 +1,12335 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Azure OpenAI Service API", + "description": "Azure OpenAI APIs for completions and search", + "version": "2024-12-01-preview" + }, + "servers": [ + { + "url": "https://{endpoint}/openai", + "variables": { + "endpoint": { + "default": "your-resource-name.openai.azure.com" + } + } + } + ], + "security": [ + { + "bearer": [ + "api.read" + ] + }, + { + "apiKey": [] + } + ], + "paths": { + "/deployments/{deployment-id}/completions": { + "post": { + "summary": "Creates a completion for the provided prompt, parameters and chosen model.", + "operationId": "Completions_Create", + "parameters": [ + { + "in": "path", + "name": "deployment-id", + "required": true, + "schema": { + "type": "string", + "example": "davinci", + "description": "Deployment id of the model which was deployed." + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createCompletionRequest" + }, + "example": { + "prompt": "Negate the following sentence.The price for bubblegum increased on thursday.\n\n Negated Sentence:", + "max_tokens": 50 + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createCompletionResponse" + }, + "example": { + "model": "davinci", + "object": "text_completion", + "id": "cmpl-4509KAos68kxOqpE2uYGw81j6m7uo", + "created": 1637097562, + "choices": [ + { + "index": 0, + "text": "The price for bubblegum decreased on thursday.", + "logprobs": null, + "finish_reason": "stop" + } + ] + } + } + }, + "headers": { + "apim-request-id": { + "description": "Request ID for troubleshooting purposes", + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorResponse" + } + } + }, + "headers": { + "apim-request-id": { + "description": "Request ID for troubleshooting purposes", + "schema": { + "type": "string" + } + } + } + } + }, + "x-ms-examples": { + "Create a completion.": { + "$ref": "./examples/completions.json" + } + } + } + }, + "/deployments/{deployment-id}/embeddings": { + "post": { + "summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.", + "operationId": "embeddings_create", + "parameters": [ + { + "in": "path", + "name": "deployment-id", + "required": true, + "schema": { + "type": "string", + "example": "ada-search-index-v1" + }, + "description": "The deployment id of the model which was deployed." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": true, + "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 `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less.", + "oneOf": [ + { + "type": "string", + "default": "", + "example": "This is a test.", + "nullable": true + }, + { + "type": "array", + "minItems": 1, + "maxItems": 2048, + "items": { + "type": "string", + "minLength": 1, + "example": "This is a test.", + "nullable": false + } + } + ] + }, + "user": { + "description": "A unique identifier representing your end-user, which can help monitoring and detecting abuse.", + "type": "string", + "nullable": false + }, + "input_type": { + "description": "input type of embedding search to use", + "type": "string", + "example": "query" + }, + "encoding_format": { + "description": "The format to return the embeddings in. Can be either `float` or `base64`. Defaults to `float`.", + "type": "string", + "example": "float", + "nullable": true + }, + "dimensions": { + "description": "The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.", + "type": "integer", + "example": 1, + "nullable": true + } + }, + "required": [ + "input" + ] + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "object": { + "type": "string" + }, + "model": { + "type": "string" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "index": { + "type": "integer" + }, + "object": { + "type": "string" + }, + "embedding": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "index", + "object", + "embedding" + ] + } + }, + "usage": { + "type": "object", + "properties": { + "prompt_tokens": { + "type": "integer" + }, + "total_tokens": { + "type": "integer" + } + }, + "required": [ + "prompt_tokens", + "total_tokens" + ] + } + }, + "required": [ + "object", + "model", + "data", + "usage" + ] + } + } + } + } + }, + "x-ms-examples": { + "Create a embeddings.": { + "$ref": "./examples/embeddings.json" + } + } + } + }, + "/deployments/{deployment-id}/chat/completions": { + "post": { + "summary": "Creates a completion for the chat message", + "operationId": "ChatCompletions_Create", + "parameters": [ + { + "in": "path", + "name": "deployment-id", + "required": true, + "schema": { + "type": "string", + "description": "Deployment id of the model which was deployed." + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createChatCompletionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/createChatCompletionResponse" + }, + { + "$ref": "#/components/schemas/createChatCompletionStreamResponse" + } + ] + } + } + }, + "headers": { + "apim-request-id": { + "description": "Request ID for troubleshooting purposes", + "schema": { + "type": "string" + } + } + } + }, + "default": { + "description": "Service unavailable", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/errorResponse" + } + } + }, + "headers": { + "apim-request-id": { + "description": "Request ID for troubleshooting purposes", + "schema": { + "type": "string" + } + } + } + } + }, + "x-ms-examples": { + "Create a chat completion.": { + "$ref": "./examples/chat_completions.json" + }, + "Creates a completion based on Azure Search data and system-assigned managed identity.": { + "$ref": "./examples/chat_completions_azure_search_minimum.json" + }, + "Creates a completion based on Azure Search image vector data.": { + "$ref": "./examples/chat_completions_azure_search_image_vector.json" + }, + "Creates a completion based on Azure Search vector data, previous assistant message and user-assigned managed identity.": { + "$ref": "./examples/chat_completions_azure_search_advanced.json" + }, + "Creates a completion for the provided Azure Cosmos DB.": { + "$ref": "./examples/chat_completions_cosmos_db.json" + }, + "Creates a completion for the provided Mongo DB.": { + "$ref": "./examples/chat_completions_mongo_db.json" + }, + "Creates a completion for the provided Elasticsearch.": { + "$ref": "./examples/chat_completions_elasticsearch.json" + }, + "Creates a completion for the provided Pinecone resource.": { + "$ref": "./examples/chat_completions_pinecone.json" + } + } + } + }, + "/deployments/{deployment-id}/audio/transcriptions": { + "post": { + "summary": "Transcribes audio into the input language.", + "operationId": "Transcriptions_Create", + "parameters": [ + { + "in": "path", + "name": "deployment-id", + "required": true, + "schema": { + "type": "string", + "example": "whisper", + "description": "Deployment id of the whisper model." + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/createTranscriptionRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/audioResponse" + }, + { + "$ref": "#/components/schemas/audioVerboseResponse" + } + ] + } + }, + "text/plain": { + "schema": { + "type": "string", + "description": "Transcribed text in the output format (when response_format was one of text, vtt or srt)." + } + } + } + } + }, + "x-ms-examples": { + "Create an audio transcription with json response format.": { + "$ref": "./examples/audio_transcription_object.json" + }, + "Create an audio transcription with text response format.": { + "$ref": "./examples/audio_transcription_text.json" + } + } + } + }, + "/deployments/{deployment-id}/audio/translations": { + "post": { + "summary": "Transcribes and translates input audio into English text.", + "operationId": "Translations_Create", + "parameters": [ + { + "in": "path", + "name": "deployment-id", + "required": true, + "schema": { + "type": "string", + "example": "whisper", + "description": "Deployment id of the whisper model which was deployed." + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/createTranslationRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/audioResponse" + }, + { + "$ref": "#/components/schemas/audioVerboseResponse" + } + ] + } + }, + "text/plain": { + "schema": { + "type": "string", + "description": "Transcribed text in the output format (when response_format was one of text, vtt or srt)." + } + } + } + } + }, + "x-ms-examples": { + "Create an audio translation with json response format.": { + "$ref": "./examples/audio_translation_object.json" + }, + "Create an audio translation with text response format.": { + "$ref": "./examples/audio_translation_text.json" + } + } + } + }, + "/deployments/{deployment-id}/audio/speech": { + "post": { + "summary": "Generates audio from the input text.", + "operationId": "Speech_Create", + "parameters": [ + { + "in": "path", + "name": "deployment-id", + "required": true, + "schema": { + "type": "string", + "example": "tts-1", + "description": "Deployment id of the tts model which was deployed." + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/createSpeechRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/octet-stream": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + } + }, + "x-ms-examples": { + "Create an audio from text with response format mp3.": { + "$ref": "./examples/audio_speech.json" + } + } + } + }, + "/deployments/{deployment-id}/images/generations": { + "post": { + "summary": "Generates a batch of images from a text caption on a given DALLE model deployment", + "operationId": "ImageGenerations_Create", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/imageGenerationsRequest" + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "deployment-id", + "required": true, + "schema": { + "type": "string", + "example": "dalle-deployment", + "description": "Deployment id of the dalle model which was deployed." + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "Ok", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/generateImagesResponse" + } + } + } + }, + "default": { + "description": "An error occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/dalleErrorResponse" + } + } + } + } + }, + "x-ms-examples": { + "Create an image.": { + "$ref": "./examples/image_generation.json" + } + } + } + }, + "/assistants": { + "get": { + "operationId": "List_Assistants", + "tags": [ + "Assistants" + ], + "summary": "Returns a list of assistants.", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "ListAssistantsOrder", + "modelAsString": true, + "values": [ + { + "value": "asc", + "description": "Order results in ascending order" + }, + { + "value": "desc", + "description": "Order results in descending order" + } + ] + } + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listAssistantsResponse" + } + } + } + } + }, + "x-ms-examples": { + "List all assistants.": { + "$ref": "./examples/list_assistants.json" + } + } + }, + "post": { + "operationId": "Create_Assistant", + "tags": [ + "Assistants" + ], + "summary": "Create an assistant with a model and instructions.", + "parameters": [ + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createAssistantRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/assistantObject" + } + } + } + } + }, + "x-ms-examples": { + "Create an assistant.": { + "$ref": "./examples/create_assistant.json" + } + } + } + }, + "/assistants/{assistant_id}": { + "get": { + "operationId": "Get_Assistant", + "tags": [ + "Assistants" + ], + "summary": "Retrieves an assistant.", + "parameters": [ + { + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the assistant to retrieve." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/assistantObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieves an assistant.": { + "$ref": "./examples/retrieve_assistant.json" + } + } + }, + "post": { + "operationId": "Modify_Assistant", + "tags": [ + "Assistant" + ], + "summary": "Modifies an assistant.", + "parameters": [ + { + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the assistant to modify." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyAssistantRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/assistantObject" + } + } + } + } + }, + "x-ms-examples": { + "Modifies an assistant.": { + "$ref": "./examples/modify_assistant.json" + } + } + }, + "delete": { + "operationId": "Delete_Assistant", + "tags": [ + "Assistants" + ], + "summary": "Delete an assistant.", + "parameters": [ + { + "in": "path", + "name": "assistant_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the assistant to delete." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleteAssistantResponse" + } + } + } + } + }, + "x-ms-examples": { + "Delete an assistant.": { + "$ref": "./examples/delete_assistant.json" + } + } + } + }, + "/threads": { + "post": { + "operationId": "Create_Thread", + "tags": [ + "Assistants" + ], + "summary": "Create a thread.", + "parameters": [ + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createThreadRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/threadObject" + } + } + } + } + }, + "x-ms-examples": { + "Create a thread.": { + "$ref": "./examples/create_thread.json" + } + } + } + }, + "/threads/{thread_id}": { + "get": { + "operationId": "Get_Thread", + "tags": [ + "Assistants" + ], + "summary": "Retrieves a thread.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread to retrieve." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/threadObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieve a thread.": { + "$ref": "./examples/retrieve_thread.json" + } + } + }, + "post": { + "operationId": "Modify_Thread", + "tags": [ + "Assistants" + ], + "summary": "Modifies a thread.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread to modify. Only the `metadata` can be modified." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyThreadRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/threadObject" + } + } + } + } + }, + "x-ms-examples": { + "Modify a thread.": { + "$ref": "./examples/modify_thread.json" + } + } + }, + "delete": { + "operationId": "Delete_Thread", + "tags": [ + "Assistants" + ], + "summary": "Delete a thread.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread to delete." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleteThreadResponse" + } + } + } + } + }, + "x-ms-examples": { + "Delete a thread.": { + "$ref": "./examples/delete_thread.json" + } + } + } + }, + "/threads/{thread_id}/messages": { + "get": { + "operationId": "List_Messages", + "tags": [ + "Assistants" + ], + "summary": "Returns a list of messages for a given thread.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the [thread](/docs/api-reference/threads) the messages belong to." + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "ListMessagesOrder", + "modelAsString": true, + "values": [ + { + "value": "asc", + "description": "Order results in ascending order" + }, + { + "value": "desc", + "description": "Order results in descending order" + } + ] + } + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "run_id", + "in": "query", + "description": "Filter messages by the run ID that generated them.\n", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listMessagesResponse" + } + } + } + } + }, + "x-ms-examples": { + "List all messages.": { + "$ref": "./examples/list_messages.json" + } + } + }, + "post": { + "operationId": "Create_Message", + "tags": [ + "Assistants" + ], + "summary": "Create a message.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the [thread](/docs/api-reference/threads) to create a message for." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createMessageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/messageObject" + } + } + } + } + }, + "x-ms-examples": { + "Create a message.": { + "$ref": "./examples/create_message.json" + } + } + } + }, + "/threads/{thread_id}/messages/{message_id}": { + "get": { + "operationId": "Get_Message", + "tags": [ + "Assistants" + ], + "summary": "Retrieve a message.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the [thread](/docs/api-reference/threads) to which this message belongs." + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the message to retrieve." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/messageObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieve a message.": { + "$ref": "./examples/get_message.json" + } + } + }, + "post": { + "operationId": "Modify_Message", + "tags": [ + "Assistants" + ], + "summary": "Modifies a message.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread to which this message belongs." + }, + { + "in": "path", + "name": "message_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the message to modify." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyMessageRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/messageObject" + } + } + } + } + }, + "x-ms-examples": { + "Modify a message.": { + "$ref": "./examples/modify_message.json" + } + } + } + }, + "/threads/runs": { + "post": { + "operationId": "Create_Thread_And_Run", + "tags": [ + "Assistants" + ], + "summary": "Create a thread and run it in one request.", + "parameters": [ + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createThreadAndRunRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/runObject" + } + } + } + } + }, + "x-ms-examples": { + "Create a thread and run it.": { + "$ref": "./examples/create_thread_and_run.json" + } + } + } + }, + "/threads/{thread_id}/runs": { + "get": { + "operationId": "List_Runs", + "tags": [ + "Assistants" + ], + "summary": "Returns a list of runs belonging to a thread.", + "parameters": [ + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread the run belongs to." + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "ListRunsOrder", + "modelAsString": true, + "values": [ + { + "value": "asc", + "description": "Order results in ascending order" + }, + { + "value": "desc", + "description": "Order results in descending order" + } + ] + } + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listRunsResponse" + } + } + } + } + }, + "x-ms-examples": { + "List all runs.": { + "$ref": "./examples/list_runs.json" + } + } + }, + "post": { + "operationId": "Create_Run", + "tags": [ + "Assistants" + ], + "summary": "Create a run.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread to run." + }, + { + "name": "include[]", + "in": "query", + "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.", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "step_details.tool_calls[*].file_search.results[*].content" + ], + "x-ms-enum": { + "name": "Include", + "modelAsString": true, + "values": [ + { + "value": "step_details.tool_calls[*].file_search.results[*].content" + } + ] + } + } + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createRunRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/runObject" + } + } + } + } + }, + "x-ms-examples": { + "Create a run.": { + "$ref": "./examples/create_run.json" + } + } + } + }, + "/threads/{thread_id}/runs/{run_id}": { + "get": { + "operationId": "Get_Run", + "tags": [ + "Assistants" + ], + "summary": "Retrieves a run.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the [thread](/docs/api-reference/threads) that was run." + }, + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to retrieve." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/runObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieve a run.": { + "$ref": "./examples/get_run.json" + } + } + }, + "post": { + "operationId": "Modify_Run", + "tags": [ + "Assistants" + ], + "summary": "Modifies a run.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the [thread](/docs/api-reference/threads) that was run." + }, + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to modify." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/modifyRunRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/runObject" + } + } + } + } + }, + "x-ms-examples": { + "Modify a run.": { + "$ref": "./examples/modify_run.json" + } + } + } + }, + "/threads/{thread_id}/runs/{run_id}/submit_tool_outputs": { + "post": { + "operationId": "Submit_Tool_Outputs_To_Run", + "tags": [ + "Assistants" + ], + "summary": "When a run has the `status: \"requires_action\"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.\n", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the [thread](/docs/api-reference/threads) to which this run belongs." + }, + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run that requires the tool output submission." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/submitToolOutputsRunRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/runObject" + } + } + } + } + }, + "x-ms-examples": { + "Submit tool outputs to a run.": { + "$ref": "./examples/submit_tool_outputs_to_run.json" + } + } + } + }, + "/threads/{thread_id}/runs/{run_id}/cancel": { + "post": { + "operationId": "Cancel_Run", + "tags": [ + "Assistants" + ], + "summary": "Cancels a run that is `in_progress`.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread to which this run belongs." + }, + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to cancel." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/runObject" + } + } + } + } + }, + "x-ms-examples": { + "Cancel a run.": { + "$ref": "./examples/cancel_run.json" + } + } + } + }, + "/threads/{thread_id}/runs/{run_id}/steps": { + "get": { + "operationId": "List_Run_Steps", + "tags": [ + "Assistants" + ], + "summary": "Returns a list of run steps belonging to a run.", + "parameters": [ + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread the run and run steps belong to." + }, + { + "name": "run_id", + "in": "path", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run the run steps belong to." + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "ListRunStepsOrder", + "modelAsString": true, + "values": [ + { + "value": "asc", + "description": "Order results in ascending order" + }, + { + "value": "desc", + "description": "Order results in descending order" + } + ] + } + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + }, + { + "name": "include[]", + "in": "query", + "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.\n", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "step_details.tool_calls[*].file_search.results[*].content" + ], + "x-ms-enum": { + "name": "Include", + "modelAsString": true, + "values": [ + { + "value": "step_details.tool_calls[*].file_search.results[*].content" + } + ] + } + } + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listRunStepsResponse" + } + } + } + } + }, + "x-ms-examples": { + "List all run steps.": { + "$ref": "./examples/list_run_steps.json" + } + } + } + }, + "/threads/{thread_id}/runs/{run_id}/steps/{step_id}": { + "get": { + "operationId": "Get_Run_Step", + "tags": [ + "Assistants" + ], + "summary": "Retrieves a run step.", + "parameters": [ + { + "in": "path", + "name": "thread_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the thread to which the run and run step belongs." + }, + { + "in": "path", + "name": "run_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run to which the run step belongs." + }, + { + "in": "path", + "name": "step_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the run step to retrieve." + }, + { + "name": "include[]", + "in": "query", + "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.\n", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "step_details.tool_calls[*].file_search.results[*].content" + ], + "x-ms-enum": { + "name": "Include", + "modelAsString": true, + "values": [ + { + "value": "step_details.tool_calls[*].file_search.results[*].content" + } + ] + } + } + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview", + "description": "api version" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/runStepObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieve a run step.": { + "$ref": "./examples/get_run_step.json" + } + } + } + }, + "/vector_stores": { + "get": { + "operationId": "List_Vector_Stores", + "tags": [ + "Vector Stores" + ], + "summary": "Returns a list of vector stores.", + "parameters": [ + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "ListVectorStoresOrder", + "modelAsString": true, + "values": [ + { + "value": "asc" + }, + { + "value": "desc" + } + ] + } + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listVectorStoresResponse" + } + } + } + } + }, + "x-ms-examples": { + "List all vector stores.": { + "$ref": "./examples/list_vector_stores.json" + } + } + }, + "post": { + "operationId": "Create_Vector_Store", + "tags": [ + "Vector Stores" + ], + "summary": "Create a vector store.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createVectorStoreRequest" + } + } + } + }, + "parameters": [ + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreObject" + } + } + } + } + }, + "x-ms-examples": { + "Create a vector store.": { + "$ref": "./examples/create_vector_store.json" + } + } + } + }, + "/vector_stores/{vector_store_id}": { + "get": { + "operationId": "Get_Vector_Store", + "tags": [ + "Vector Stores" + ], + "summary": "Retrieves a vector store.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the vector store to retrieve." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieve a vector store.": { + "$ref": "./examples/retrieve_vector_store.json" + } + } + }, + "post": { + "operationId": "Modify_Vector_Store", + "tags": [ + "Vector Stores" + ], + "summary": "Modifies a vector store.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the vector store to modify." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/updateVectorStoreRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreObject" + } + } + } + } + }, + "x-ms-examples": { + "Modify a vector store.": { + "$ref": "./examples/modify_vector_store.json" + } + } + }, + "delete": { + "operationId": "Delete_Vector_Store", + "tags": [ + "Vector Stores" + ], + "summary": "Delete a vector store.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the vector store to delete." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleteVectorStoreResponse" + } + } + } + } + }, + "x-ms-examples": { + "Delete a vector store.": { + "$ref": "./examples/delete_vector_store.json" + } + } + } + }, + "/vector_stores/{vector_store_id}/files": { + "get": { + "operationId": "List_Vector_Store_Files", + "tags": [ + "Vector Stores" + ], + "summary": "Returns a list of vector store files.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store that the files belong to.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "ListVectorStoreFilesOrder", + "modelAsString": true, + "values": [ + { + "value": "asc" + }, + { + "value": "desc" + } + ] + } + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "schema": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "failed", + "cancelled" + ], + "x-ms-enum": { + "name": "ListVectorStoreFilesFilter", + "modelAsString": true, + "values": [ + { + "value": "in_progress" + }, + { + "value": "completed" + }, + { + "value": "failed" + }, + { + "value": "cancelled" + } + ] + } + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listVectorStoreFilesResponse" + } + } + } + } + }, + "x-ms-examples": { + "List all vector store files.": { + "$ref": "./examples/list_vector_store_files.json" + } + } + }, + "post": { + "operationId": "Create_Vector_Store_File", + "tags": [ + "Vector Stores" + ], + "summary": "Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object).", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string", + "example": "vs_abc123" + }, + "description": "The ID of the vector store for which to create a File.\n" + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createVectorStoreFileRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreFileObject" + } + } + } + } + }, + "x-ms-examples": { + "Create a vector store file.": { + "$ref": "./examples/create_vector_store_file.json" + } + } + } + }, + "/vector_stores/{vector_store_id}/files/{file_id}": { + "get": { + "operationId": "Get_Vector_Store_File", + "tags": [ + "Vector Stores" + ], + "summary": "Retrieves a vector store file.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string", + "example": "vs_abc123" + }, + "description": "The ID of the vector store that the file belongs to." + }, + { + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string", + "example": "file-abc123" + }, + "description": "The ID of the file being retrieved." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreFileObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieve a vector store file.": { + "$ref": "./examples/retrieve_vector_store_file.json" + } + } + }, + "delete": { + "operationId": "Delete_Vector_Store_File", + "tags": [ + "Vector Stores" + ], + "summary": "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](/docs/api-reference/files/delete) endpoint.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the vector store that the file belongs to." + }, + { + "in": "path", + "name": "file_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the file to delete." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/deleteVectorStoreFileResponse" + } + } + } + } + }, + "x-ms-examples": { + "Delete a vector store file.": { + "$ref": "./examples/delete_vector_store_file.json" + } + } + } + }, + "/vector_stores/{vector_store_id}/file_batches": { + "post": { + "operationId": "Create_Vector_Store_File_Batch", + "tags": [ + "Vector Stores" + ], + "summary": "Create a vector store file batch.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string", + "example": "vs_abc123" + }, + "description": "The ID of the vector store for which to create a File Batch.\n" + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/createVectorStoreFileBatchRequest" + } + } + } + }, + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreFileBatchObject" + } + } + } + } + }, + "x-ms-examples": { + "Create a vector store file batch.": { + "$ref": "./examples/create_vector_store_file_batch.json" + } + } + } + }, + "/vector_stores/{vector_store_id}/file_batches/{batch_id}": { + "get": { + "operationId": "Get_Vector_Store_File_Batch", + "tags": [ + "Vector Stores" + ], + "summary": "Retrieves a vector store file batch.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string", + "example": "vs_abc123" + }, + "description": "The ID of the vector store that the file batch belongs to." + }, + { + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "type": "string", + "example": "vs_b_abc123" + }, + "description": "The ID of the file batch being retrieved." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreFileBatchObject" + } + } + } + } + }, + "x-ms-examples": { + "Retrieve a vector store file batch.": { + "$ref": "./examples/retrieve_vector_store_file_batch.json" + } + } + } + }, + "/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel": { + "post": { + "operationId": "Cancel_Vector_Store_File_Batch", + "tags": [ + "Vector Stores" + ], + "summary": "Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible.", + "parameters": [ + { + "in": "path", + "name": "vector_store_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the vector store that the file batch belongs to." + }, + { + "in": "path", + "name": "batch_id", + "required": true, + "schema": { + "type": "string" + }, + "description": "The ID of the file batch to cancel." + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/vectorStoreFileBatchObject" + } + } + } + } + }, + "x-ms-examples": { + "Cancel a vector store file batch.": { + "$ref": "./examples/cancel_vector_store_file_batch.json" + } + } + } + }, + "/vector_stores/{vector_store_id}/file_batches/{batch_id}/files": { + "get": { + "operationId": "List_Vector_Store_File_Batch_Files", + "tags": [ + "Vector Stores" + ], + "summary": "Returns a list of vector store files in a batch.", + "parameters": [ + { + "name": "vector_store_id", + "in": "path", + "description": "The ID of the vector store that the files belong to.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "batch_id", + "in": "path", + "description": "The ID of the file batch that the files belong to.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "in": "query", + "description": "A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.\n", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "order", + "in": "query", + "description": "Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.\n", + "schema": { + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "ListVectorStoreFilesOrder", + "modelAsString": true, + "values": [ + { + "value": "asc" + }, + { + "value": "desc" + } + ] + } + } + }, + { + "name": "after", + "in": "query", + "description": "A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "before", + "in": "query", + "description": "A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.\n", + "schema": { + "type": "string" + } + }, + { + "name": "filter", + "in": "query", + "description": "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`.", + "schema": { + "type": "string", + "enum": [ + "in_progress", + "completed", + "failed", + "cancelled" + ], + "x-ms-enum": { + "name": "ListVectorStoreFilesFilter", + "modelAsString": true, + "values": [ + { + "value": "in_progress" + }, + { + "value": "completed" + }, + { + "value": "failed" + }, + { + "value": "cancelled" + } + ] + } + } + }, + { + "in": "query", + "name": "api-version", + "required": true, + "schema": { + "type": "string", + "example": "2024-12-01-preview" + }, + "description": "api version" + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/listVectorStoreFilesResponse" + } + } + } + } + }, + "x-ms-examples": { + "List all vector store files in a batch.": { + "$ref": "./examples/list_vector_store_files.json" + } + } + } + } + }, + "components": { + "schemas": { + "errorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/error" + } + } + }, + "errorBase": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "error": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/errorBase" + } + ], + "properties": { + "param": { + "type": "string" + }, + "type": { + "type": "string" + }, + "inner_error": { + "$ref": "#/components/schemas/innerError" + } + } + }, + "innerError": { + "description": "Inner error with additional details.", + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/innerErrorCode" + }, + "content_filter_results": { + "$ref": "#/components/schemas/contentFilterPromptResults" + } + } + }, + "innerErrorCode": { + "description": "Error codes for the inner error object.", + "enum": [ + "ResponsibleAIPolicyViolation" + ], + "type": "string", + "x-ms-enum": { + "name": "InnerErrorCode", + "modelAsString": true, + "values": [ + { + "value": "ResponsibleAIPolicyViolation", + "description": "The prompt violated one of more content filter rules." + } + ] + } + }, + "dalleErrorResponse": { + "type": "object", + "properties": { + "error": { + "$ref": "#/components/schemas/dalleError" + } + } + }, + "dalleError": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/errorBase" + } + ], + "properties": { + "param": { + "type": "string" + }, + "type": { + "type": "string" + }, + "inner_error": { + "$ref": "#/components/schemas/dalleInnerError" + } + } + }, + "dalleInnerError": { + "description": "Inner error with additional details.", + "type": "object", + "properties": { + "code": { + "$ref": "#/components/schemas/innerErrorCode" + }, + "content_filter_results": { + "$ref": "#/components/schemas/dalleFilterResults" + }, + "revised_prompt": { + "type": "string", + "description": "The prompt that was used to generate the image, if there was any revision to the prompt." + } + } + }, + "contentFilterCompletionTextSpan": { + "type": "object", + "description": "Describes a span within generated completion text. Offset 0 is the first UTF32 code point of the completion text.", + "properties": { + "completion_start_offset": { + "description": "Offset of the UTF32 code point which begins the span.", + "type": "integer" + }, + "completion_end_offset": { + "description": "Offset of the first UTF32 code point which is excluded from the span. This field is always equal to completion_start_offset for empty spans. This field is always larger than completion_start_offset for non-empty spans.", + "type": "integer" + } + }, + "required": [ + "completion_start_offset", + "completion_end_offset" + ] + }, + "contentFilterResultBase": { + "type": "object", + "properties": { + "filtered": { + "type": "boolean" + } + }, + "required": [ + "filtered" + ] + }, + "contentFilterSeverityResult": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterResultBase" + }, + { + "properties": { + "severity": { + "type": "string", + "enum": [ + "safe", + "low", + "medium", + "high" + ], + "x-ms-enum": { + "name": "ContentFilterSeverity", + "modelAsString": true, + "values": [ + { + "value": "safe", + "description": "General content or related content in generic or non-harmful contexts." + }, + { + "value": "low", + "description": "Harmful content at a low intensity and risk level." + }, + { + "value": "medium", + "description": "Harmful content at a medium intensity and risk level." + }, + { + "value": "high", + "description": "Harmful content at a high intensity and risk level." + } + ] + } + } + } + } + ], + "required": [ + "severity", + "filtered" + ] + }, + "contentFilterDetectedResult": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterResultBase" + }, + { + "properties": { + "detected": { + "type": "boolean" + } + } + } + ], + "required": [ + "detected", + "filtered" + ] + }, + "contentFilterDetectedWithCitationResult": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterDetectedResult" + }, + { + "properties": { + "citation": { + "type": "object", + "properties": { + "URL": { + "type": "string" + }, + "license": { + "type": "string" + } + } + } + } + } + ], + "required": [ + "detected", + "filtered" + ] + }, + "contentFilterDetectedWithCompletionTextSpansResult": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterDetectedResult" + }, + { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/contentFilterCompletionTextSpan" + } + } + } + } + ], + "required": [ + "detected", + "filtered", + "details" + ] + }, + "contentFilterIdResult": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterResultBase" + }, + { + "properties": { + "id": { + "type": "string" + } + } + } + ], + "required": [ + "id", + "filtered" + ] + }, + "contentFilterResultsBase": { + "type": "object", + "description": "Information about the content filtering results.", + "properties": { + "sexual": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + }, + "violence": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + }, + "hate": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + }, + "self_harm": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + }, + "profanity": { + "$ref": "#/components/schemas/contentFilterDetectedResult" + }, + "custom_blocklists": { + "$ref": "#/components/schemas/contentFilterDetailedResults" + }, + "error": { + "$ref": "#/components/schemas/errorBase" + } + } + }, + "contentFilterPromptResults": { + "type": "object", + "description": "Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about jailbreak content and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id.", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterResultsBase" + }, + { + "properties": { + "jailbreak": { + "$ref": "#/components/schemas/contentFilterDetectedResult" + }, + "indirect_attack": { + "$ref": "#/components/schemas/contentFilterDetectedResult" + } + } + } + ] + }, + "contentFilterChoiceResults": { + "type": "object", + "description": "Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about third party text and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id.", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterResultsBase" + }, + { + "properties": { + "protected_material_text": { + "$ref": "#/components/schemas/contentFilterDetectedResult" + } + } + }, + { + "properties": { + "protected_material_code": { + "$ref": "#/components/schemas/contentFilterDetectedWithCitationResult" + } + } + }, + { + "properties": { + "ungrounded_material": { + "$ref": "#/components/schemas/contentFilterDetectedWithCompletionTextSpansResult" + } + } + } + ] + }, + "contentFilterDetailedResults": { + "type": "object", + "description": "Content filtering results with a detail of content filter ids for the filtered segments.", + "allOf": [ + { + "$ref": "#/components/schemas/contentFilterResultBase" + }, + { + "properties": { + "details": { + "items": { + "$ref": "#/components/schemas/contentFilterIdResult" + }, + "type": "array" + } + } + } + ], + "required": [ + "filtered", + "details" + ] + }, + "promptFilterResult": { + "type": "object", + "description": "Content filtering results for a single prompt in the request.", + "properties": { + "prompt_index": { + "type": "integer" + }, + "content_filter_results": { + "$ref": "#/components/schemas/contentFilterPromptResults" + } + } + }, + "promptFilterResults": { + "type": "array", + "description": "Content filtering results for zero or more prompts in the request. In a streaming request, results for different prompts may arrive at different times or in different orders.", + "items": { + "$ref": "#/components/schemas/promptFilterResult" + } + }, + "dalleContentFilterResults": { + "type": "object", + "description": "Information about the content filtering results.", + "properties": { + "sexual": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + }, + "violence": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + }, + "hate": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + }, + "self_harm": { + "$ref": "#/components/schemas/contentFilterSeverityResult" + } + } + }, + "dalleFilterResults": { + "type": "object", + "description": "Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about jailbreak content and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id.", + "allOf": [ + { + "$ref": "#/components/schemas/dalleContentFilterResults" + }, + { + "properties": { + "profanity": { + "$ref": "#/components/schemas/contentFilterDetectedResult" + }, + "jailbreak": { + "$ref": "#/components/schemas/contentFilterDetectedResult" + }, + "custom_blocklists": { + "$ref": "#/components/schemas/contentFilterDetailedResults" + } + } + } + ] + }, + "chatCompletionsRequestCommon": { + "type": "object", + "properties": { + "temperature": { + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\nWe generally recommend altering this or `top_p` but not both.", + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true + }, + "top_p": { + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\nWe generally recommend altering this or `temperature` but not both.", + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true + }, + "stream": { + "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message.", + "type": "boolean", + "nullable": true, + "default": false + }, + "stop": { + "description": "Up to 4 sequences where the API will stop generating further tokens.", + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "array", + "items": { + "type": "string", + "nullable": false + }, + "minItems": 1, + "maxItems": 4, + "description": "Array minimum size of 1 and maximum of 4" + } + ], + "default": null + }, + "max_tokens": { + "description": "The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens). This is not compatible with o1 series models.", + "type": "integer", + "default": 4096 + }, + "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. This is only supported in o1 series models. Will expand the support to other models in future API release.", + "type": "integer", + "nullable": true + }, + "presence_penalty": { + "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.", + "type": "number", + "default": 0, + "minimum": -2, + "maximum": 2 + }, + "frequency_penalty": { + "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.", + "type": "number", + "default": 0, + "minimum": -2, + "maximum": 2 + }, + "logit_bias": { + "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 tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.", + "type": "object", + "nullable": true + }, + "store": { + "description": "Whether or not to store the output of this chat completion request for use in our model distillation or evaluation products.", + "type": "boolean", + "nullable": true + }, + "metadata": { + "description": "Developer-defined tags and values used for filtering completions in the stored completions dashboard.", + "type": "object", + "nullable": true, + "additionalProperties": { + "type": "string" + } + }, + "user": { + "description": "A unique identifier representing your end-user, which can help Azure OpenAI to monitor and detect abuse.", + "type": "string", + "example": "user-1234", + "nullable": false + } + } + }, + "createCompletionRequest": { + "type": "object", + "properties": { + "prompt": { + "description": "The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.\n\nNote that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.\n", + "default": "<|endoftext|>", + "nullable": true, + "oneOf": [ + { + "type": "string", + "default": "", + "example": "This is a test." + }, + { + "type": "array", + "items": { + "type": "string", + "default": "", + "example": "This is a test." + } + } + ] + }, + "best_of": { + "type": "integer", + "default": 1, + "minimum": 0, + "maximum": 20, + "nullable": true, + "description": "Generates `best_of` completions server-side and returns the \"best\" (the one with the highest log probability per token). Results cannot be streamed.\n\nWhen used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n" + }, + "echo": { + "type": "boolean", + "default": false, + "nullable": true, + "description": "Echo back the prompt in addition to the completion\n" + }, + "frequency_penalty": { + "type": "number", + "default": 0, + "minimum": -2, + "maximum": 2, + "nullable": true, + "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.\n" + }, + "logit_bias": { + "type": "object", + "x-oaiTypeLabel": "map", + "default": null, + "nullable": true, + "additionalProperties": { + "type": "integer" + }, + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts 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.\n\nAs an example, you can pass `{\"50256\": -100}` to prevent the <|endoftext|> token from being generated.\n" + }, + "logprobs": { + "type": "integer", + "minimum": 0, + "maximum": 5, + "default": null, + "nullable": true, + "description": "Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response.\n\nThe maximum value for `logprobs` is 5.\n" + }, + "max_tokens": { + "type": "integer", + "minimum": 0, + "default": 16, + "example": 16, + "nullable": true, + "description": "The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the completion.\n\nThe 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" + }, + "n": { + "type": "integer", + "minimum": 1, + "maximum": 128, + "default": 1, + "example": 1, + "nullable": true, + "description": "How many completions to generate for each prompt.\n\n**Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`.\n" + }, + "presence_penalty": { + "type": "number", + "default": 0, + "minimum": -2, + "maximum": 2, + "nullable": true, + "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.\n" + }, + "seed": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807, + "nullable": true, + "description": "If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\n\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n" + }, + "stop": { + "description": "Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.\n", + "default": null, + "nullable": true, + "oneOf": [ + { + "type": "string", + "default": "<|endoftext|>", + "example": "\n", + "nullable": true + }, + { + "type": "array", + "minItems": 1, + "maxItems": 4, + "items": { + "type": "string", + "example": "[\"\\n\"]" + } + } + ] + }, + "stream": { + "description": "Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n", + "type": "boolean", + "nullable": true, + "default": false + }, + "suffix": { + "description": "The suffix that comes after a completion of inserted text.\n\nThis parameter is only supported for `gpt-3.5-turbo-instruct`.\n", + "default": null, + "nullable": true, + "type": "string", + "example": "test." + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n" + }, + "top_p": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.\n" + }, + "user": { + "type": "string", + "example": "user-1234", + "description": "A unique identifier representing your end-user, which can help to monitor and detect abuse.\n" + } + }, + "required": [ + "prompt" + ] + }, + "createCompletionResponse": { + "type": "object", + "description": "Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).\n", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the completion." + }, + "choices": { + "type": "array", + "description": "The list of completion choices the model generated for the input prompt.", + "items": { + "type": "object", + "required": [ + "finish_reason", + "index", + "logprobs", + "text" + ], + "properties": { + "finish_reason": { + "type": "string", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\nor `content_filter` if content was omitted due to a flag from our content filters.\n", + "enum": [ + "stop", + "length", + "content_filter" + ] + }, + "index": { + "type": "integer" + }, + "logprobs": { + "type": "object", + "nullable": true, + "properties": { + "text_offset": { + "type": "array", + "items": { + "type": "integer" + } + }, + "token_logprobs": { + "type": "array", + "items": { + "type": "number" + } + }, + "tokens": { + "type": "array", + "items": { + "type": "string" + } + }, + "top_logprobs": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "type": "number" + } + } + } + } + }, + "text": { + "type": "string" + }, + "content_filter_results": { + "$ref": "#/components/schemas/contentFilterChoiceResults" + } + } + } + }, + "created": { + "type": "integer", + "description": "The Unix timestamp (in seconds) of when the completion was created." + }, + "model": { + "type": "string", + "description": "The model used for completion." + }, + "prompt_filter_results": { + "$ref": "#/components/schemas/promptFilterResults" + }, + "system_fingerprint": { + "type": "string", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n" + }, + "object": { + "type": "string", + "description": "The object type, which is always \"text_completion\"", + "enum": [ + "text_completion" + ] + }, + "usage": { + "$ref": "#/components/schemas/completionUsage" + } + }, + "required": [ + "id", + "object", + "created", + "model", + "choices" + ] + }, + "createChatCompletionRequest": { + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/chatCompletionsRequestCommon" + }, + { + "properties": { + "messages": { + "description": "A list of messages comprising the conversation so far. [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).", + "type": "array", + "minItems": 1, + "items": { + "$ref": "#/components/schemas/chatCompletionRequestMessage" + } + }, + "data_sources": { + "type": "array", + "description": " The configuration entries for Azure OpenAI chat extensions that use them.\n This additional specification is only compatible with Azure OpenAI.", + "items": { + "$ref": "#/components/schemas/azureChatExtensionConfiguration" + } + }, + "reasoning_effort": { + "type": "string", + "description": "**o1 models only** \n\n Constrains effort on reasoning for \n[reasoning models](https://platform.openai.com/docs/guides/reasoning).\n\nCurrently supported values are `low`, `medium`, and `high`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.", + "enum": [ + "low", + "medium", + "high" + ], + "default": "medium" + }, + "frequency_penalty": { + "type": "number", + "default": 0, + "minimum": -2, + "maximum": 2, + "nullable": true, + "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.\n" + }, + "logit_bias": { + "type": "object", + "default": null, + "nullable": true, + "additionalProperties": { + "type": "integer" + }, + "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.\n" + }, + "logprobs": { + "description": "Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.", + "type": "boolean", + "default": false, + "nullable": true + }, + "top_logprobs": { + "description": "An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.", + "type": "integer", + "minimum": 0, + "maximum": 20, + "nullable": true + }, + "max_tokens": { + "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion.\n\nThe total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n", + "type": "integer", + "nullable": true + }, + "n": { + "type": "integer", + "minimum": 1, + "maximum": 128, + "default": 1, + "example": 1, + "nullable": true, + "description": "How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs." + }, + "presence_penalty": { + "type": "number", + "default": 0, + "minimum": -2, + "maximum": 2, + "nullable": true, + "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.\n" + }, + "parallel_tool_calls": { + "$ref": "#/components/schemas/ParallelToolCalls", + "nullable": true + }, + "response_format": { + "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models), [GPT-4o mini](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models), [GPT-4 Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models) and all [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-35) Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which guarantees the model will match your supplied JSON schema.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.\n", + "oneOf": [ + { + "$ref": "#/components/schemas/ResponseFormatText" + }, + { + "$ref": "#/components/schemas/ResponseFormatJsonObject" + }, + { + "$ref": "#/components/schemas/ResponseFormatJsonSchema" + } + ], + "x-oaiExpandable": true + }, + "seed": { + "type": "integer", + "minimum": -9223372036854775808, + "maximum": 9223372036854775807, + "nullable": true, + "description": "This feature is in Beta.\nIf specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n" + }, + "stop": { + "description": "Up to 4 sequences where the API will stop generating further tokens.\n", + "default": null, + "oneOf": [ + { + "type": "string", + "nullable": true + }, + { + "type": "array", + "minItems": 1, + "maxItems": 4, + "items": { + "type": "string" + } + } + ] + }, + "stream": { + "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n", + "type": "boolean", + "nullable": true, + "default": false + }, + "stream_options": { + "$ref": "#/components/schemas/chatCompletionStreamOptions", + "nullable": true + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n\nWe generally recommend altering this or `top_p` but not both.\n" + }, + "top_p": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or `temperature` but not both.\n" + }, + "tools": { + "type": "array", + "description": "A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.\n", + "items": { + "$ref": "#/components/schemas/chatCompletionTool" + } + }, + "tool_choice": { + "$ref": "#/components/schemas/chatCompletionToolChoiceOption" + }, + "function_call": { + "deprecated": true, + "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.\n", + "oneOf": [ + { + "type": "string", + "description": "`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n", + "enum": [ + "none", + "auto" + ] + }, + { + "$ref": "#/components/schemas/chatCompletionFunctionCallOption" + } + ], + "x-oaiExpandable": true + }, + "functions": { + "deprecated": true, + "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n", + "type": "array", + "minItems": 1, + "maxItems": 128, + "items": { + "$ref": "#/components/schemas/chatCompletionFunctions" + } + }, + "user": { + "type": "string", + "example": "user-1234", + "description": "A unique identifier representing your end-user, which can help to monitor and detect abuse.\n" + }, + "user_security_context": { + "$ref": "#/components/schemas/userSecurityContext" + } + }, + "required": [ + "messages" + ] + } + ] + }, + "userSecurityContext": { + "type": "object", + "description": "User security context contains several parameters that describe the AI application itself, and the end user that interacts with the AI application. These fields assist your security operations teams to investigate and mitigate security incidents by providing a comprehensive approach to protecting your AI applications. [Learn more](https://aka.ms/TP4AI/Documentation/EndUserContext) about protecting AI applications using Microsoft Defender for Cloud.", + "properties": { + "application_name": { + "type": "string", + "description": "The name of the application. Sensitive personal information should not be included in this field." + }, + "end_user_id": { + "type": "string", + "format": "uuid", + "description": "This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application. Sensitive personal information should not be included in this field." + }, + "end_user_tenant_id": { + "type": "string", + "format": "uuid", + "description": "The Microsoft 365 tenant ID the end user belongs to. It's required when the generative AI application is multi tenant." + }, + "source_ip": { + "type": "string", + "description": "Captures the original client's IP address, accepting both IPv4 and IPv6 formats." + } + } + }, + "chatCompletionFunctions": { + "type": "object", + "deprecated": true, + "properties": { + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "name": { + "type": "string", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." + }, + "parameters": { + "$ref": "#/components/schemas/FunctionParameters" + } + }, + "required": [ + "name" + ] + }, + "chatCompletionFunctionCallOption": { + "type": "object", + "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "name" + ] + }, + "chatCompletionFunctionParameters": { + "type": "object", + "description": "The parameters the functions accepts, described as a JSON Schema object. See the [guide/](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.", + "additionalProperties": true + }, + "chatCompletionRequestMessage": { + "oneOf": [ + { + "$ref": "#/components/schemas/ChatCompletionRequestDeveloperMessage" + }, + { + "$ref": "#/components/schemas/chatCompletionRequestSystemMessage" + }, + { + "$ref": "#/components/schemas/chatCompletionRequestUserMessage" + }, + { + "$ref": "#/components/schemas/chatCompletionRequestAssistantMessage" + }, + { + "$ref": "#/components/schemas/chatCompletionRequestToolMessage" + }, + { + "$ref": "#/components/schemas/chatCompletionRequestFunctionMessage" + } + ] + }, + "ChatCompletionRequestDeveloperMessage": { + "type": "object", + "title": "Developer message", + "description": "Developer-provided instructions that the model should follow, regardless of messages sent by the user.\nWith o1 models and newer, `developer` messages replace the previous `system` messages.", + "properties": { + "content": { + "description": "The contents of the developer message.", + "oneOf": [ + { + "type": "string", + "description": "The contents of the developer message.", + "title": "Text content" + }, + { + "type": "array", + "description": "An array of content parts with a defined type. For developer messages, only type `text` is supported.", + "title": "Array of content parts", + "items": { + "$ref": "#/components/schemas/chatCompletionRequestDeveloperMessageContentPart" + }, + "minItems": 1 + } + ] + }, + "role": { + "type": "string", + "enum": [ + "developer" + ], + "description": "The role of the messages author, in this case `developer`." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + } + }, + "required": [ + "content", + "role" + ] + }, + "chatCompletionRequestSystemMessage": { + "type": "object", + "title": "System message", + "properties": { + "content": { + "description": "The contents of the system message.", + "oneOf": [ + { + "type": "string", + "description": "The contents of the system message.", + "title": "Text content" + }, + { + "type": "array", + "description": "An array of content parts with a defined type. For system messages, only type `text` is supported.", + "title": "Array of content parts", + "items": { + "$ref": "#/components/schemas/chatCompletionRequestSystemMessageContentPart" + }, + "minItems": 1 + } + ] + }, + "role": { + "type": "string", + "enum": [ + "system" + ], + "description": "The role of the messages author, in this case `system`." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + } + }, + "required": [ + "content", + "role" + ] + }, + "chatCompletionRequestUserMessage": { + "type": "object", + "title": "User message", + "properties": { + "content": { + "description": "The contents of the user message.\n", + "oneOf": [ + { + "type": "string", + "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 `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4o` model.", + "title": "Array of content parts", + "items": { + "$ref": "#/components/schemas/chatCompletionRequestUserMessageContentPart" + }, + "minItems": 1 + } + ], + "x-oaiExpandable": true + }, + "role": { + "type": "string", + "enum": [ + "user" + ], + "description": "The role of the messages author, in this case `user`." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + } + }, + "required": [ + "content", + "role" + ] + }, + "chatCompletionRequestAssistantMessage": { + "type": "object", + "title": "Assistant message", + "properties": { + "content": { + "nullable": true, + "oneOf": [ + { + "type": "string", + "description": "The contents of the assistant message.", + "title": "Text content" + }, + { + "type": "array", + "description": "An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.", + "title": "Array of content parts", + "items": { + "$ref": "#/components/schemas/chatCompletionRequestAssistantMessageContentPart" + }, + "minItems": 1 + } + ], + "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n" + }, + "refusal": { + "nullable": true, + "type": "string", + "description": "The refusal message by the assistant." + }, + "role": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The role of the messages author, in this case `assistant`." + }, + "name": { + "type": "string", + "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role." + }, + "tool_calls": { + "$ref": "#/components/schemas/chatCompletionMessageToolCalls" + }, + "function_call": { + "type": "object", + "deprecated": true, + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "nullable": true, + "properties": { + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + }, + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "arguments", + "name" + ] + } + }, + "required": [ + "role" + ] + }, + "chatCompletionRequestToolMessage": { + "type": "object", + "title": "Tool message", + "properties": { + "role": { + "type": "string", + "enum": [ + "tool" + ], + "description": "The role of the messages author, in this case `tool`." + }, + "content": { + "oneOf": [ + { + "type": "string", + "description": "The contents of the tool message.", + "title": "Text content" + }, + { + "type": "array", + "description": "An array of content parts with a defined type. For tool messages, only type `text` is supported.", + "title": "Array of content parts", + "items": { + "$ref": "#/components/schemas/chatCompletionRequestToolMessageContentPart" + }, + "minItems": 1 + } + ], + "description": "The contents of the tool message." + }, + "tool_call_id": { + "type": "string", + "description": "Tool call that this message is responding to." + } + }, + "required": [ + "role", + "content", + "tool_call_id" + ] + }, + "chatCompletionRequestFunctionMessage": { + "type": "object", + "title": "Function message", + "deprecated": true, + "properties": { + "role": { + "type": "string", + "enum": [ + "function" + ], + "description": "The role of the messages author, in this case `function`." + }, + "content": { + "nullable": true, + "type": "string", + "description": "The contents of the function message." + }, + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "role", + "content", + "name" + ] + }, + "chatCompletionRequestDeveloperMessageContentPart": { + "oneOf": [ + { + "$ref": "#/components/schemas/chatCompletionRequestMessageContentPartText" + } + ] + }, + "chatCompletionRequestSystemMessageContentPart": { + "oneOf": [ + { + "$ref": "#/components/schemas/chatCompletionRequestMessageContentPartText" + } + ] + }, + "chatCompletionRequestUserMessageContentPart": { + "oneOf": [ + { + "$ref": "#/components/schemas/chatCompletionRequestMessageContentPartText" + }, + { + "$ref": "#/components/schemas/chatCompletionRequestMessageContentPartImage" + } + ] + }, + "chatCompletionRequestAssistantMessageContentPart": { + "oneOf": [ + { + "$ref": "#/components/schemas/chatCompletionRequestMessageContentPartText" + }, + { + "$ref": "#/components/schemas/chatCompletionRequestMessageContentPartRefusal" + } + ] + }, + "chatCompletionRequestToolMessageContentPart": { + "oneOf": [ + { + "$ref": "#/components/schemas/chatCompletionRequestMessageContentPartText" + } + ] + }, + "chatCompletionRequestMessageContentPartText": { + "type": "object", + "title": "Text content part", + "properties": { + "type": { + "type": "string", + "enum": [ + "text" + ], + "description": "The type of the content part." + }, + "text": { + "type": "string", + "description": "The text content." + } + }, + "required": [ + "type", + "text" + ] + }, + "chatCompletionRequestMessageContentPartImage": { + "type": "object", + "title": "Image content part", + "properties": { + "type": { + "type": "string", + "enum": [ + "image_url" + ], + "description": "The type of the content part." + }, + "image_url": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "Either a URL of the image or the base64 encoded image data.", + "format": "uri" + }, + "detail": { + "type": "string", + "description": "Specifies the detail level of the image. Learn more in the [Vision guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision?tabs=rest%2Csystem-assigned%2Cresource#detail-parameter-settings-in-image-processing-low-high-auto).", + "enum": [ + "auto", + "low", + "high" + ], + "default": "auto" + } + }, + "required": [ + "url" + ] + } + }, + "required": [ + "type", + "image_url" + ] + }, + "chatCompletionRequestMessageContentPartRefusal": { + "type": "object", + "title": "Refusal content part", + "properties": { + "type": { + "type": "string", + "enum": [ + "refusal" + ], + "description": "The type of the content part." + }, + "refusal": { + "type": "string", + "description": "The refusal message generated by the model." + } + }, + "required": [ + "type", + "refusal" + ] + }, + "azureChatExtensionConfiguration": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/azureChatExtensionType" + } + }, + "description": " A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat\n completions request that should use Azure OpenAI chat extensions to augment the response behavior.\n The use of this configuration is compatible only with Azure OpenAI.", + "discriminator": { + "propertyName": "type", + "mapping": { + "azure_search": "#/components/schemas/azureSearchChatExtensionConfiguration", + "azure_cosmos_db": "#/components/schemas/azureCosmosDBChatExtensionConfiguration", + "elasticsearch": "#/components/schemas/elasticsearchChatExtensionConfiguration", + "mongo_db": "#/components/schemas/mongoDBChatExtensionConfiguration", + "pinecone": "#/components/schemas/pineconeChatExtensionConfiguration" + } + } + }, + "azureChatExtensionType": { + "type": "string", + "description": " A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat\n completions request that should use Azure OpenAI chat extensions to augment the response behavior.\n The use of this configuration is compatible only with Azure OpenAI.", + "enum": [ + "azure_search", + "azure_cosmos_db", + "elasticsearch", + "mongo_db", + "pinecone" + ], + "x-ms-enum": { + "name": "AzureChatExtensionType", + "modelAsString": true, + "values": [ + { + "name": "azureSearch", + "value": "azure_search", + "description": "Represents the use of Azure Search as an Azure OpenAI chat extension." + }, + { + "name": "azureCosmosDB", + "value": "azure_cosmos_db", + "description": "Represents the use of Azure Cosmos DB as an Azure OpenAI chat extension." + }, + { + "name": "elasticsearch", + "value": "elasticsearch", + "description": "Represents the use of Elasticsearch® index as an Azure OpenAI chat extension." + }, + { + "name": "mongoDB", + "value": "mongo_db", + "description": "Represents the use of Mongo DB as an Azure OpenAI chat extension." + }, + { + "name": "pinecone", + "value": "pinecone", + "description": "Represents the use of Pinecone index as an Azure OpenAI chat extension." + } + ] + } + }, + "azureSearchChatExtensionConfiguration": { + "required": [ + "parameters" + ], + "description": "A specific representation of configurable options for Azure Search when using it as an Azure OpenAI chat\nextension.", + "allOf": [ + { + "$ref": "#/components/schemas/azureChatExtensionConfiguration" + }, + { + "properties": { + "parameters": { + "$ref": "#/components/schemas/azureSearchChatExtensionParameters" + } + } + } + ], + "x-ms-discriminator-value": "azure_search" + }, + "azureSearchChatExtensionParameters": { + "required": [ + "authentication", + "endpoint", + "index_name" + ], + "type": "object", + "properties": { + "authentication": { + "oneOf": [ + { + "$ref": "#/components/schemas/onYourDataApiKeyAuthenticationOptions" + }, + { + "$ref": "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions" + }, + { + "$ref": "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions" + }, + { + "$ref": "#/components/schemas/onYourDataAccessTokenAuthenticationOptions" + } + ] + }, + "top_n_documents": { + "type": "integer", + "description": "The configured top number of documents to feature for the configured query.", + "format": "int32" + }, + "max_search_queries": { + "type": "integer", + "description": "The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.", + "format": "int32" + }, + "allow_partial_result": { + "type": "boolean", + "default": false, + "description": "If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails." + }, + "in_scope": { + "type": "boolean", + "description": "Whether queries should be restricted to use of indexed data." + }, + "strictness": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "description": "The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.", + "format": "int32" + }, + "endpoint": { + "type": "string", + "description": "The absolute endpoint path for the Azure Search resource to use.", + "format": "uri" + }, + "index_name": { + "type": "string", + "description": "The name of the index to use as available in the referenced Azure Search resource." + }, + "fields_mapping": { + "$ref": "#/components/schemas/azureSearchIndexFieldMappingOptions" + }, + "query_type": { + "$ref": "#/components/schemas/azureSearchQueryType" + }, + "semantic_configuration": { + "type": "string", + "description": "The additional semantic configuration for the query." + }, + "filter": { + "type": "string", + "description": "Search filter." + }, + "embedding_dependency": { + "oneOf": [ + { + "$ref": "#/components/schemas/onYourDataEndpointVectorizationSource" + }, + { + "$ref": "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + }, + { + "$ref": "#/components/schemas/onYourDataIntegratedVectorizationSource" + } + ] + }, + "include_contexts": { + "type": "array", + "description": "The included properties of the output context. If not specified, the default value is `citations` and `intent`.", + "items": { + "$ref": "#/components/schemas/onYourDataContextProperty" + } + } + }, + "description": "Parameters for Azure Search when used as an Azure OpenAI chat extension." + }, + "azureSearchIndexFieldMappingOptions": { + "type": "object", + "properties": { + "title_field": { + "type": "string", + "description": "The name of the index field to use as a title." + }, + "url_field": { + "type": "string", + "description": "The name of the index field to use as a URL." + }, + "filepath_field": { + "type": "string", + "description": "The name of the index field to use as a filepath." + }, + "content_fields": { + "type": "array", + "description": "The names of index fields that should be treated as content.", + "items": { + "type": "string" + } + }, + "content_fields_separator": { + "type": "string", + "description": "The separator pattern that content fields should use." + }, + "vector_fields": { + "type": "array", + "description": "The names of fields that represent vector data.", + "items": { + "type": "string" + } + }, + "image_vector_fields": { + "type": "array", + "description": "The names of fields that represent image vector data.", + "items": { + "type": "string" + } + } + }, + "description": "Optional settings to control how fields are processed when using a configured Azure Search resource." + }, + "azureSearchQueryType": { + "type": "string", + "description": "The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension.", + "enum": [ + "simple", + "semantic", + "vector", + "vector_simple_hybrid", + "vector_semantic_hybrid" + ], + "x-ms-enum": { + "name": "AzureSearchQueryType", + "modelAsString": true, + "values": [ + { + "name": "simple", + "value": "simple", + "description": "Represents the default, simple query parser." + }, + { + "name": "semantic", + "value": "semantic", + "description": "Represents the semantic query parser for advanced semantic modeling." + }, + { + "name": "vector", + "value": "vector", + "description": "Represents vector search over computed data." + }, + { + "name": "vectorSimpleHybrid", + "value": "vector_simple_hybrid", + "description": "Represents a combination of the simple query strategy with vector data." + }, + { + "name": "vectorSemanticHybrid", + "value": "vector_semantic_hybrid", + "description": "Represents a combination of semantic search and vector data querying." + } + ] + } + }, + "azureCosmosDBChatExtensionConfiguration": { + "required": [ + "parameters" + ], + "description": "A specific representation of configurable options for Azure Cosmos DB when using it as an Azure OpenAI chat\nextension.", + "allOf": [ + { + "$ref": "#/components/schemas/azureChatExtensionConfiguration" + }, + { + "properties": { + "parameters": { + "$ref": "#/components/schemas/azureCosmosDBChatExtensionParameters" + } + } + } + ], + "x-ms-discriminator-value": "azure_cosmos_db" + }, + "azureCosmosDBChatExtensionParameters": { + "required": [ + "authentication", + "container_name", + "database_name", + "embedding_dependency", + "fields_mapping", + "index_name" + ], + "type": "object", + "properties": { + "authentication": { + "$ref": "#/components/schemas/onYourDataConnectionStringAuthenticationOptions" + }, + "top_n_documents": { + "type": "integer", + "description": "The configured top number of documents to feature for the configured query.", + "format": "int32" + }, + "max_search_queries": { + "type": "integer", + "description": "The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.", + "format": "int32" + }, + "allow_partial_result": { + "type": "boolean", + "default": false, + "description": "If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails." + }, + "in_scope": { + "type": "boolean", + "description": "Whether queries should be restricted to use of indexed data." + }, + "strictness": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "description": "The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.", + "format": "int32" + }, + "database_name": { + "type": "string", + "description": "The MongoDB vCore database name to use with Azure Cosmos DB." + }, + "container_name": { + "type": "string", + "description": "The name of the Azure Cosmos DB resource container." + }, + "index_name": { + "type": "string", + "description": "The MongoDB vCore index name to use with Azure Cosmos DB." + }, + "fields_mapping": { + "$ref": "#/components/schemas/azureCosmosDBFieldMappingOptions" + }, + "embedding_dependency": { + "oneOf": [ + { + "$ref": "#/components/schemas/onYourDataEndpointVectorizationSource" + }, + { + "$ref": "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + } + ] + }, + "include_contexts": { + "type": "array", + "description": "The included properties of the output context. If not specified, the default value is `citations` and `intent`.", + "items": { + "$ref": "#/components/schemas/onYourDataContextProperty" + } + } + }, + "description": "Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Azure Cosmos DB for\nMongoDB vCore." + }, + "azureCosmosDBFieldMappingOptions": { + "required": [ + "content_fields", + "vector_fields" + ], + "type": "object", + "properties": { + "title_field": { + "type": "string", + "description": "The name of the index field to use as a title." + }, + "url_field": { + "type": "string", + "description": "The name of the index field to use as a URL." + }, + "filepath_field": { + "type": "string", + "description": "The name of the index field to use as a filepath." + }, + "content_fields": { + "type": "array", + "description": "The names of index fields that should be treated as content.", + "items": { + "type": "string" + } + }, + "content_fields_separator": { + "type": "string", + "description": "The separator pattern that content fields should use." + }, + "vector_fields": { + "type": "array", + "description": "The names of fields that represent vector data.", + "items": { + "type": "string" + } + } + }, + "description": "Optional settings to control how fields are processed when using a configured Azure Cosmos DB resource." + }, + "elasticsearchChatExtensionConfiguration": { + "required": [ + "parameters" + ], + "description": "A specific representation of configurable options for Elasticsearch when using it as an Azure OpenAI chat\nextension.", + "allOf": [ + { + "$ref": "#/components/schemas/azureChatExtensionConfiguration" + }, + { + "properties": { + "parameters": { + "$ref": "#/components/schemas/elasticsearchChatExtensionParameters" + } + } + } + ], + "x-ms-discriminator-value": "elasticsearch" + }, + "elasticsearchChatExtensionParameters": { + "required": [ + "authentication", + "endpoint", + "index_name" + ], + "type": "object", + "properties": { + "authentication": { + "oneOf": [ + { + "$ref": "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions" + }, + { + "$ref": "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions" + } + ] + }, + "top_n_documents": { + "type": "integer", + "description": "The configured top number of documents to feature for the configured query.", + "format": "int32" + }, + "max_search_queries": { + "type": "integer", + "description": "The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.", + "format": "int32" + }, + "allow_partial_result": { + "type": "boolean", + "default": false, + "description": "If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails." + }, + "in_scope": { + "type": "boolean", + "description": "Whether queries should be restricted to use of indexed data." + }, + "strictness": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "description": "The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.", + "format": "int32" + }, + "endpoint": { + "type": "string", + "description": "The endpoint of Elasticsearch®.", + "format": "uri" + }, + "index_name": { + "type": "string", + "description": "The index name of Elasticsearch®." + }, + "fields_mapping": { + "$ref": "#/components/schemas/elasticsearchIndexFieldMappingOptions" + }, + "query_type": { + "$ref": "#/components/schemas/elasticsearchQueryType" + }, + "embedding_dependency": { + "oneOf": [ + { + "$ref": "#/components/schemas/onYourDataEndpointVectorizationSource" + }, + { + "$ref": "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + }, + { + "$ref": "#/components/schemas/onYourDataModelIdVectorizationSource" + } + ] + }, + "include_contexts": { + "type": "array", + "description": "The included properties of the output context. If not specified, the default value is `citations` and `intent`.", + "items": { + "$ref": "#/components/schemas/onYourDataContextProperty" + } + } + }, + "description": "Parameters to use when configuring Elasticsearch® as an Azure OpenAI chat extension. " + }, + "elasticsearchIndexFieldMappingOptions": { + "type": "object", + "properties": { + "title_field": { + "type": "string", + "description": "The name of the index field to use as a title." + }, + "url_field": { + "type": "string", + "description": "The name of the index field to use as a URL." + }, + "filepath_field": { + "type": "string", + "description": "The name of the index field to use as a filepath." + }, + "content_fields": { + "type": "array", + "description": "The names of index fields that should be treated as content.", + "items": { + "type": "string" + } + }, + "content_fields_separator": { + "type": "string", + "description": "The separator pattern that content fields should use." + }, + "vector_fields": { + "type": "array", + "description": "The names of fields that represent vector data.", + "items": { + "type": "string" + } + } + }, + "description": "Optional settings to control how fields are processed when using a configured Elasticsearch® resource." + }, + "elasticsearchQueryType": { + "type": "string", + "description": "The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension.", + "enum": [ + "simple", + "vector" + ], + "x-ms-enum": { + "name": "ElasticsearchQueryType", + "modelAsString": true, + "values": [ + { + "name": "simple", + "value": "simple", + "description": "Represents the default, simple query parser." + }, + { + "name": "vector", + "value": "vector", + "description": "Represents vector search over computed data." + } + ] + } + }, + "mongoDBChatExtensionConfiguration": { + "required": [ + "parameters" + ], + "description": "A specific representation of configurable options for Mongo DB when using it as an Azure OpenAI chat\nextension.", + "allOf": [ + { + "$ref": "#/components/schemas/azureChatExtensionConfiguration" + }, + { + "properties": { + "parameters": { + "$ref": "#/components/schemas/mongoDBChatExtensionParameters" + } + } + } + ], + "x-ms-discriminator-value": "mongo_db" + }, + "mongoDBChatExtensionParameters": { + "required": [ + "authentication", + "app_name", + "collection_name", + "database_name", + "endpoint", + "embedding_dependency", + "fields_mapping", + "index_name" + ], + "type": "object", + "properties": { + "authentication": { + "$ref": "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions" + }, + "top_n_documents": { + "type": "integer", + "description": "The configured top number of documents to feature for the configured query.", + "format": "int32" + }, + "max_search_queries": { + "type": "integer", + "description": "The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.", + "format": "int32" + }, + "allow_partial_result": { + "type": "boolean", + "default": false, + "description": "If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails." + }, + "in_scope": { + "type": "boolean", + "description": "Whether queries should be restricted to use of indexed data." + }, + "strictness": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "description": "The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.", + "format": "int32" + }, + "endpoint": { + "type": "string", + "description": "The name of the Mongo DB cluster endpoint." + }, + "database_name": { + "type": "string", + "description": "The name of the Mongo DB database." + }, + "collection_name": { + "type": "string", + "description": "The name of the Mongo DB Collection." + }, + "app_name": { + "type": "string", + "description": "The name of the Mongo DB Application." + }, + "index_name": { + "type": "string", + "description": "The The name of the Mongo DB index." + }, + "fields_mapping": { + "$ref": "#/components/schemas/mongoDBFieldMappingOptions" + }, + "embedding_dependency": { + "oneOf": [ + { + "$ref": "#/components/schemas/onYourDataEndpointVectorizationSource" + }, + { + "$ref": "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + } + ] + }, + "include_contexts": { + "type": "array", + "description": "The included properties of the output context. If not specified, the default value is `citations` and `intent`.", + "items": { + "$ref": "#/components/schemas/onYourDataContextProperty" + } + } + }, + "description": "Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Mongo DB." + }, + "mongoDBFieldMappingOptions": { + "required": [ + "content_fields", + "vector_fields" + ], + "type": "object", + "properties": { + "title_field": { + "type": "string", + "description": "The name of the index field to use as a title." + }, + "url_field": { + "type": "string", + "description": "The name of the index field to use as a URL." + }, + "filepath_field": { + "type": "string", + "description": "The name of the index field to use as a filepath." + }, + "content_fields": { + "type": "array", + "description": "The names of index fields that should be treated as content.", + "items": { + "type": "string" + } + }, + "content_fields_separator": { + "type": "string", + "description": "The separator pattern that content fields should use." + }, + "vector_fields": { + "type": "array", + "description": "The names of fields that represent vector data.", + "items": { + "type": "string" + } + } + }, + "description": "Optional settings to control how fields are processed when using a configured Mongo DB resource." + }, + "pineconeChatExtensionConfiguration": { + "required": [ + "parameters" + ], + "description": "A specific representation of configurable options for Pinecone when using it as an Azure OpenAI chat\nextension.", + "allOf": [ + { + "$ref": "#/components/schemas/azureChatExtensionConfiguration" + }, + { + "properties": { + "parameters": { + "$ref": "#/components/schemas/pineconeChatExtensionParameters" + } + } + } + ], + "x-ms-discriminator-value": "pinecone" + }, + "pineconeChatExtensionParameters": { + "required": [ + "authentication", + "embedding_dependency", + "environment", + "fields_mapping", + "index_name" + ], + "type": "object", + "properties": { + "authentication": { + "$ref": "#/components/schemas/onYourDataApiKeyAuthenticationOptions" + }, + "top_n_documents": { + "type": "integer", + "description": "The configured top number of documents to feature for the configured query.", + "format": "int32" + }, + "max_search_queries": { + "type": "integer", + "description": "The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.", + "format": "int32" + }, + "allow_partial_result": { + "type": "boolean", + "default": false, + "description": "If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails." + }, + "in_scope": { + "type": "boolean", + "description": "Whether queries should be restricted to use of indexed data." + }, + "strictness": { + "maximum": 5, + "minimum": 1, + "type": "integer", + "description": "The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.", + "format": "int32" + }, + "environment": { + "type": "string", + "description": "The environment name of Pinecone." + }, + "index_name": { + "type": "string", + "description": "The name of the Pinecone database index." + }, + "fields_mapping": { + "$ref": "#/components/schemas/pineconeFieldMappingOptions" + }, + "embedding_dependency": { + "$ref": "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + }, + "include_contexts": { + "type": "array", + "description": "The included properties of the output context. If not specified, the default value is `citations` and `intent`.", + "items": { + "$ref": "#/components/schemas/onYourDataContextProperty" + } + } + }, + "description": "Parameters for configuring Azure OpenAI Pinecone chat extensions." + }, + "pineconeFieldMappingOptions": { + "required": [ + "content_fields" + ], + "type": "object", + "properties": { + "title_field": { + "type": "string", + "description": "The name of the index field to use as a title." + }, + "url_field": { + "type": "string", + "description": "The name of the index field to use as a URL." + }, + "filepath_field": { + "type": "string", + "description": "The name of the index field to use as a filepath." + }, + "content_fields": { + "type": "array", + "description": "The names of index fields that should be treated as content.", + "items": { + "type": "string" + } + }, + "content_fields_separator": { + "type": "string", + "description": "The separator pattern that content fields should use." + } + }, + "description": "Optional settings to control how fields are processed when using a configured Pinecone resource." + }, + "onYourDataAuthenticationOptions": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/onYourDataAuthenticationType" + } + }, + "description": "The authentication options for Azure OpenAI On Your Data.", + "discriminator": { + "propertyName": "type", + "mapping": { + "api_key": "#/components/schemas/onYourDataApiKeyAuthenticationOptions", + "connection_string": "#/components/schemas/onYourDataConnectionStringAuthenticationOptions", + "key_and_key_id": "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions", + "encoded_api_key": "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions", + "access_token": "#/components/schemas/onYourDataAccessTokenAuthenticationOptions", + "system_assigned_managed_identity": "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions", + "user_assigned_managed_identity": "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions", + "username_and_password": "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions" + } + } + }, + "onYourDataContextProperty": { + "type": "string", + "description": "The context property.", + "enum": [ + "citations", + "intent", + "all_retrieved_documents" + ], + "x-ms-enum": { + "name": "OnYourDataContextProperty", + "modelAsString": true, + "values": [ + { + "name": "citations", + "value": "citations", + "description": "The `citations` property." + }, + { + "name": "intent", + "value": "intent", + "description": "The `intent` property." + }, + { + "name": "allRetrievedDocuments", + "value": "all_retrieved_documents", + "description": "The `all_retrieved_documents` property." + } + ] + } + }, + "onYourDataAuthenticationType": { + "type": "string", + "description": "The authentication types supported with Azure OpenAI On Your Data.", + "enum": [ + "api_key", + "connection_string", + "key_and_key_id", + "encoded_api_key", + "access_token", + "system_assigned_managed_identity", + "user_assigned_managed_identity", + "username_and_password" + ], + "x-ms-enum": { + "name": "OnYourDataAuthenticationType", + "modelAsString": true, + "values": [ + { + "name": "apiKey", + "value": "api_key", + "description": "Authentication via API key." + }, + { + "name": "connectionString", + "value": "connection_string", + "description": "Authentication via connection string." + }, + { + "name": "keyAndKeyId", + "value": "key_and_key_id", + "description": "Authentication via key and key ID pair." + }, + { + "name": "encodedApiKey", + "value": "encoded_api_key", + "description": "Authentication via encoded API key." + }, + { + "name": "accessToken", + "value": "access_token", + "description": "Authentication via access token." + }, + { + "name": "systemAssignedManagedIdentity", + "value": "system_assigned_managed_identity", + "description": "Authentication via system-assigned managed identity." + }, + { + "name": "userAssignedManagedIdentity", + "value": "user_assigned_managed_identity", + "description": "Authentication via user-assigned managed identity." + }, + { + "name": "usernameAndPassword", + "value": "username_and_password", + "description": "Authentication via username and password." + } + ] + } + }, + "onYourDataApiKeyAuthenticationOptions": { + "required": [ + "key" + ], + "description": "The authentication options for Azure OpenAI On Your Data when using an API key.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + }, + { + "properties": { + "key": { + "type": "string", + "description": "The API key to use for authentication." + } + } + } + ], + "x-ms-discriminator-value": "api_key" + }, + "onYourDataConnectionStringAuthenticationOptions": { + "required": [ + "connection_string" + ], + "description": "The authentication options for Azure OpenAI On Your Data when using a connection string.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + }, + { + "properties": { + "connection_string": { + "type": "string", + "description": "The connection string to use for authentication." + } + } + } + ], + "x-ms-discriminator-value": "connection_string" + }, + "onYourDataKeyAndKeyIdAuthenticationOptions": { + "required": [ + "key", + "key_id" + ], + "description": "The authentication options for Azure OpenAI On Your Data when using an Elasticsearch key and key ID pair.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + }, + { + "properties": { + "key": { + "type": "string", + "description": "The Elasticsearch key to use for authentication." + }, + "key_id": { + "type": "string", + "description": "The Elasticsearch key ID to use for authentication." + } + } + } + ], + "x-ms-discriminator-value": "key_and_key_id" + }, + "onYourDataEncodedApiKeyAuthenticationOptions": { + "required": [ + "encoded_api_key" + ], + "description": "The authentication options for Azure OpenAI On Your Data when using an Elasticsearch encoded API key.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + }, + { + "properties": { + "encoded_api_key": { + "type": "string", + "description": "The Elasticsearch encoded API key to use for authentication." + } + } + } + ], + "x-ms-discriminator-value": "encoded_api_key" + }, + "onYourDataAccessTokenAuthenticationOptions": { + "required": [ + "access_token" + ], + "description": "The authentication options for Azure OpenAI On Your Data when using access token.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + }, + { + "properties": { + "access_token": { + "type": "string", + "description": "The access token to use for authentication." + } + } + } + ], + "x-ms-discriminator-value": "access_token" + }, + "onYourDataSystemAssignedManagedIdentityAuthenticationOptions": { + "description": "The authentication options for Azure OpenAI On Your Data when using a system-assigned managed identity.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + } + ], + "x-ms-discriminator-value": "system_assigned_managed_identity" + }, + "onYourDataUserAssignedManagedIdentityAuthenticationOptions": { + "required": [ + "managed_identity_resource_id" + ], + "description": "The authentication options for Azure OpenAI On Your Data when using a user-assigned managed identity.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + }, + { + "properties": { + "managed_identity_resource_id": { + "type": "string", + "description": "The resource ID of the user-assigned managed identity to use for authentication." + } + } + } + ], + "x-ms-discriminator-value": "user_assigned_managed_identity" + }, + "onYourDataUsernameAndPasswordAuthenticationOptions": { + "required": [ + "username", + "password" + ], + "description": "The authentication options for Azure OpenAI On Your Data when using a username and a password.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataAuthenticationOptions" + }, + { + "properties": { + "username": { + "type": "string", + "description": "The username to use for authentication." + }, + "password": { + "type": "string", + "description": "The password. to use for authentication." + } + } + } + ], + "x-ms-discriminator-value": "username_and_password" + }, + "onYourDataVectorizationSource": { + "required": [ + "type" + ], + "type": "object", + "properties": { + "type": { + "$ref": "#/components/schemas/onYourDataVectorizationSourceType" + } + }, + "description": "An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search.", + "discriminator": { + "propertyName": "type", + "mapping": { + "endpoint": "#/components/schemas/onYourDataEndpointVectorizationSource", + "deployment_name": "#/components/schemas/onYourDataDeploymentNameVectorizationSource", + "integrated": "#/components/schemas/onYourDataIntegratedVectorizationSource", + "model_id": "#/components/schemas/onYourDataModelIdVectorizationSource" + } + } + }, + "onYourDataVectorizationSourceType": { + "type": "string", + "description": "Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with\nvector search.", + "enum": [ + "endpoint", + "deployment_name", + "integrated", + "model_id" + ], + "x-ms-enum": { + "name": "OnYourDataVectorizationSourceType", + "modelAsString": true, + "values": [ + { + "name": "endpoint", + "value": "endpoint", + "description": "Represents vectorization performed by public service calls to an Azure OpenAI embedding model." + }, + { + "name": "deploymentName", + "value": "deployment_name", + "description": "Represents an Ada model deployment name to use. This model deployment must be in the same Azure OpenAI resource, but\nOn Your Data will use this model deployment via an internal call rather than a public one, which enables vector\nsearch even in private networks." + }, + { + "name": "integrated", + "value": "integrated", + "description": "Represents the integrated vectorizer defined within the search resource." + }, + { + "name": "modelId", + "value": "model_id", + "description": "Represents a specific embedding model ID as defined in the search service.\nCurrently only supported by Elasticsearch®." + } + ] + } + }, + "onYourDataEndpointVectorizationSource": { + "required": [ + "authentication", + "endpoint" + ], + "description": "The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based\non a public Azure OpenAI endpoint call for embeddings.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataVectorizationSource" + }, + { + "properties": { + "endpoint": { + "type": "string", + "description": "Specifies the resource endpoint URL from which embeddings should be retrieved. It should be in the format of https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/embeddings. The api-version query parameter is not allowed.", + "format": "uri" + }, + "authentication": { + "oneOf": [ + { + "$ref": "#/components/schemas/onYourDataApiKeyAuthenticationOptions" + }, + { + "$ref": "#/components/schemas/onYourDataAccessTokenAuthenticationOptions" + } + ] + }, + "dimensions": { + "type": "integer", + "description": "The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models.", + "format": "int32" + } + } + } + ], + "x-ms-discriminator-value": "endpoint" + }, + "onYourDataDeploymentNameVectorizationSource": { + "required": [ + "deployment_name" + ], + "description": "The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based\non an internal embeddings model deployment name in the same Azure OpenAI resource.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataVectorizationSource" + }, + { + "properties": { + "deployment_name": { + "type": "string", + "description": "Specifies the name of the model deployment to use for vectorization. This model deployment must be in the same Azure OpenAI resource, but On Your Data will use this model deployment via an internal call rather than a public one, which enables vector search even in private networks." + }, + "dimensions": { + "type": "integer", + "description": "The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models.", + "format": "int32" + } + } + } + ], + "x-ms-discriminator-value": "deployment_name" + }, + "onYourDataIntegratedVectorizationSource": { + "description": "Represents the integrated vectorizer defined within the search resource.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataVectorizationSource" + } + ], + "x-ms-discriminator-value": "integrated" + }, + "onYourDataModelIdVectorizationSource": { + "required": [ + "model_id" + ], + "description": "The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based\non a search service model ID. Currently only supported by Elasticsearch®.", + "allOf": [ + { + "$ref": "#/components/schemas/onYourDataVectorizationSource" + }, + { + "properties": { + "model_id": { + "type": "string", + "description": "Specifies the model ID to use for vectorization. This model ID must be defined in the search service." + } + } + } + ], + "x-ms-discriminator-value": "model_id" + }, + "azureChatExtensionsMessageContext": { + "type": "object", + "properties": { + "citations": { + "type": "array", + "description": "The data source retrieval result, used to generate the assistant message in the response.", + "items": { + "$ref": "#/components/schemas/citation" + }, + "x-ms-identifiers": [] + }, + "intent": { + "type": "string", + "description": "The detected intent from the chat history, used to pass to the next turn to carry over the context." + }, + "all_retrieved_documents": { + "type": "array", + "description": "All the retrieved documents.", + "items": { + "$ref": "#/components/schemas/retrievedDocument" + } + } + }, + "description": " A representation of the additional context information available when Azure OpenAI chat extensions are involved\n in the generation of a corresponding chat completions response. This context information is only populated when\n using an Azure OpenAI request configured to use a matching extension." + }, + "citation": { + "required": [ + "content" + ], + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "The content of the citation." + }, + "title": { + "type": "string", + "description": "The title of the citation." + }, + "url": { + "type": "string", + "description": "The URL of the citation." + }, + "filepath": { + "type": "string", + "description": "The file path of the citation." + }, + "chunk_id": { + "type": "string", + "description": "The chunk ID of the citation." + }, + "rerank_score": { + "type": "number", + "description": "The rerank score of the retrieved document.", + "format": "double" + } + }, + "description": "citation information for a chat completions response message." + }, + "retrievedDocument": { + "type": "object", + "description": "The retrieved document.", + "required": [ + "search_queries", + "data_source_index", + "original_search_score" + ], + "allOf": [ + { + "$ref": "#/components/schemas/citation" + }, + { + "properties": { + "search_queries": { + "type": "array", + "description": "The search queries used to retrieve the document.", + "items": { + "type": "string" + } + }, + "data_source_index": { + "type": "integer", + "description": "The index of the data source.", + "format": "int32" + }, + "original_search_score": { + "type": "number", + "description": "The original search score of the retrieved document.", + "format": "double" + }, + "filter_reason": { + "$ref": "#/components/schemas/filterReason", + "description": "Represents the rationale for filtering the document. If the document does not undergo filtering, this field will remain unset." + } + } + } + ] + }, + "filterReason": { + "type": "string", + "description": "The filtering reason of the retrieved document.", + "enum": [ + "score", + "rerank" + ], + "x-ms-enum": { + "name": "FilterReason", + "modelAsString": true, + "values": [ + { + "name": "score", + "value": "score", + "description": "The document is filtered by original search score threshold defined by `strictness` configure." + }, + { + "name": "rerank", + "value": "rerank", + "description": "The document is not filtered by original search score threshold, but is filtered by rerank score and `top_n_documents` configure." + } + ] + } + }, + "chatCompletionMessageToolCall": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "$ref": "#/components/schemas/toolCallType" + }, + "function": { + "type": "object", + "description": "The function that the model called.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + }, + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + } + }, + "required": [ + "name", + "arguments" + ] + } + }, + "required": [ + "id", + "type", + "function" + ] + }, + "toolCallType": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool call, in this case `function`.", + "x-ms-enum": { + "name": "ToolCallType", + "modelAsString": true, + "values": [ + { + "value": "function", + "description": "The tool call type is function." + } + ] + } + }, + "chatCompletionRequestMessageTool": { + "allOf": [ + { + "$ref": "#/components/schemas/chatCompletionRequestMessage" + }, + { + "type": "object", + "nullable": true, + "properties": { + "tool_call_id": { + "type": "string", + "description": "Tool call that this message is responding to." + }, + "content": { + "type": "string", + "description": "The contents of the message.", + "nullable": true + } + } + } + ], + "required": [ + "tool_call_id", + "content" + ] + }, + "chatCompletionRequestMessageFunction": { + "allOf": [ + { + "$ref": "#/components/schemas/chatCompletionRequestMessage" + }, + { + "type": "object", + "description": "Deprecated. Message that represents a function.", + "nullable": true, + "properties": { + "role": { + "type": "string", + "enum": [ + "function" + ], + "description": "The role of the messages author, in this case `function`." + }, + "name": { + "type": "string", + "description": "The contents of the message." + }, + "content": { + "type": "string", + "description": "The contents of the message.", + "nullable": true + } + } + } + ], + "required": [ + "function_call_id", + "content" + ] + }, + "createChatCompletionResponse": { + "type": "object", + "description": "Represents a chat completion response returned by model, based on the provided input.", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the chat completion." + }, + "prompt_filter_results": { + "$ref": "#/components/schemas/promptFilterResults" + }, + "choices": { + "type": "array", + "description": "A list of chat completion choices. Can be more than one if `n` is greater than 1.", + "items": { + "type": "object", + "required": [ + "finish_reason", + "index", + "message", + "logprobs" + ], + "properties": { + "finish_reason": { + "type": "string", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n", + "enum": [ + "stop", + "length", + "tool_calls", + "content_filter", + "function_call" + ] + }, + "index": { + "type": "integer", + "description": "The index of the choice in the list of choices." + }, + "message": { + "$ref": "#/components/schemas/chatCompletionResponseMessage" + }, + "content_filter_results": { + "$ref": "#/components/schemas/contentFilterChoiceResults" + }, + "logprobs": { + "description": "Log probability information for the choice.", + "type": "object", + "nullable": true, + "properties": { + "content": { + "description": "A list of message content tokens with log probability information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/chatCompletionTokenLogprob" + }, + "nullable": true + }, + "refusal": { + "description": "A list of message refusal tokens with log probability information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/chatCompletionTokenLogprob" + }, + "nullable": true + } + }, + "required": [ + "content", + "refusal" + ] + } + } + } + }, + "created": { + "type": "integer", + "description": "The Unix timestamp (in seconds) of when the chat completion was created." + }, + "model": { + "type": "string", + "description": "The model used for the chat completion." + }, + "system_fingerprint": { + "type": "string", + "description": "This fingerprint represents the backend configuration that the model runs with.\n\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n" + }, + "object": { + "type": "string", + "description": "The object type, which is always `chat.completion`.", + "enum": [ + "chat.completion" + ] + }, + "usage": { + "$ref": "#/components/schemas/completionUsage" + } + }, + "required": [ + "choices", + "created", + "id", + "model", + "object" + ] + }, + "createChatCompletionStreamResponse": { + "type": "object", + "description": "Represents a streamed chunk of a chat completion response returned by model, based on the provided input.", + "properties": { + "id": { + "type": "string", + "description": "A unique identifier for the chat completion. Each chunk has the same ID." + }, + "choices": { + "type": "array", + "description": "A list of chat completion choices. Can contain more than one elements if `n` is greater than 1.\n", + "items": { + "type": "object", + "required": [ + "delta", + "finish_reason", + "index" + ], + "properties": { + "delta": { + "$ref": "#/components/schemas/chatCompletionStreamResponseDelta" + }, + "logprobs": { + "description": "Log probability information for the choice.", + "type": "object", + "nullable": true, + "properties": { + "content": { + "description": "A list of message content tokens with log probability information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/chatCompletionTokenLogprob" + }, + "nullable": true + }, + "refusal": { + "description": "A list of message refusal tokens with log probability information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/chatCompletionTokenLogprob" + }, + "nullable": true + } + }, + "required": [ + "content", + "refusal" + ] + }, + "finish_reason": { + "type": "string", + "description": "The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,\n`length` if the maximum number of tokens specified in the request was reached,\n`content_filter` if content was omitted due to a flag from our content filters,\n`tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.\n", + "enum": [ + "stop", + "length", + "tool_calls", + "content_filter", + "function_call" + ], + "nullable": true + }, + "index": { + "type": "integer", + "description": "The index of the choice in the list of choices." + } + } + } + }, + "created": { + "type": "integer", + "description": "The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp." + }, + "model": { + "type": "string", + "description": "The model to generate the completion." + }, + "system_fingerprint": { + "type": "string", + "description": "This fingerprint represents the backend configuration that the model runs with.\nCan be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.\n" + }, + "object": { + "type": "string", + "description": "The object type, which is always `chat.completion.chunk`.", + "enum": [ + "chat.completion.chunk" + ], + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ] + } + }, + "required": [ + "choices", + "created", + "id", + "model", + "object" + ] + }, + "chatCompletionStreamResponseDelta": { + "type": "object", + "description": "A chat completion delta generated by streamed model responses.", + "properties": { + "content": { + "type": "string", + "description": "The contents of the chunk message.", + "nullable": true + }, + "function_call": { + "deprecated": true, + "type": "object", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "properties": { + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + }, + "name": { + "type": "string", + "description": "The name of the function to call." + } + } + }, + "tool_calls": { + "type": "array", + "items": { + "$ref": "#/components/schemas/chatCompletionMessageToolCallChunk" + } + }, + "role": { + "type": "string", + "enum": [ + "system", + "user", + "assistant", + "tool" + ], + "description": "The role of the author of this message." + }, + "refusal": { + "type": "string", + "description": "The refusal message generated by the model.", + "nullable": true + } + } + }, + "chatCompletionMessageToolCallChunk": { + "type": "object", + "properties": { + "index": { + "type": "integer" + }, + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only `function` is supported." + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + }, + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + } + } + } + }, + "required": [ + "index" + ] + }, + "chatCompletionStreamOptions": { + "description": "Options for streaming response. Only set this when you set `stream: true`.\n", + "type": "object", + "nullable": true, + "default": null, + "properties": { + "include_usage": { + "type": "boolean", + "description": "If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.\n" + } + } + }, + "chatCompletionChoiceLogProbs": { + "description": "Log probability information for the choice.", + "type": "object", + "nullable": true, + "properties": { + "content": { + "description": "A list of message content tokens with log probability information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/chatCompletionTokenLogprob" + }, + "nullable": true + }, + "refusal": { + "description": "A list of message refusal tokens with log probability information.", + "type": "array", + "items": { + "$ref": "#/components/schemas/chatCompletionTokenLogprob" + }, + "nullable": true + } + }, + "required": [ + "content" + ] + }, + "chatCompletionTokenLogprob": { + "type": "object", + "properties": { + "token": { + "description": "The token.", + "type": "string" + }, + "logprob": { + "description": "The log probability of this token.", + "type": "number" + }, + "bytes": { + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": "array", + "items": { + "type": "integer" + }, + "nullable": true + }, + "top_logprobs": { + "description": "List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.", + "type": "array", + "items": { + "type": "object", + "properties": { + "token": { + "description": "The token.", + "type": "string" + }, + "logprob": { + "description": "The log probability of this token.", + "type": "number" + }, + "bytes": { + "description": "A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.", + "type": "array", + "items": { + "type": "integer" + }, + "nullable": true + } + }, + "required": [ + "token", + "logprob", + "bytes" + ] + } + } + }, + "required": [ + "token", + "logprob", + "bytes", + "top_logprobs" + ] + }, + "chatCompletionResponseMessage": { + "type": "object", + "description": "A chat completion message generated by the model.", + "properties": { + "role": { + "$ref": "#/components/schemas/chatCompletionResponseMessageRole" + }, + "refusal": { + "type": "string", + "description": "The refusal message generated by the model.", + "nullable": true + }, + "content": { + "type": "string", + "description": "The contents of the message.", + "nullable": true + }, + "tool_calls": { + "type": "array", + "description": "The tool calls generated by the model, such as function calls.", + "items": { + "$ref": "#/components/schemas/chatCompletionMessageToolCall" + } + }, + "function_call": { + "$ref": "#/components/schemas/chatCompletionFunctionCall" + }, + "context": { + "$ref": "#/components/schemas/azureChatExtensionsMessageContext" + } + }, + "required": [ + "role", + "content", + "refusal" + ] + }, + "chatCompletionResponseMessageRole": { + "type": "string", + "enum": [ + "assistant" + ], + "description": "The role of the author of the response message." + }, + "chatCompletionToolChoiceOption": { + "description": "Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `required` means the model must call one or more tools. Specifying a particular tool via `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool. `none` is the default when no tools are present. `auto` is the default if tools are present.", + "oneOf": [ + { + "type": "string", + "description": "`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.", + "enum": [ + "none", + "auto", + "required" + ] + }, + { + "$ref": "#/components/schemas/chatCompletionNamedToolChoice" + } + ] + }, + "chatCompletionNamedToolChoice": { + "type": "object", + "description": "Specifies a tool the model should use. Use to force the model to call a specific function.", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only `function` is supported." + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "type", + "function" + ] + }, + "ParallelToolCalls": { + "type": "boolean", + "description": "Whether to enable parallel function calling during tool use.", + "default": true + }, + "chatCompletionMessageToolCalls": { + "type": "array", + "description": "The tool calls generated by the model, such as function calls.", + "items": { + "$ref": "#/components/schemas/chatCompletionMessageToolCall" + } + }, + "chatCompletionFunctionCall": { + "type": "object", + "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + }, + "arguments": { + "type": "string", + "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function." + } + }, + "required": [ + "name", + "arguments" + ] + }, + "completionUsage": { + "type": "object", + "description": "Usage statistics for the completion request.", + "properties": { + "prompt_tokens": { + "type": "integer", + "description": "Number of tokens in the prompt." + }, + "completion_tokens": { + "type": "integer", + "description": "Number of tokens in the generated completion." + }, + "total_tokens": { + "type": "integer", + "description": "Total number of tokens used in the request (prompt + completion)." + }, + "prompt_tokens_details": { + "type": "object", + "description": "Details of the prompt tokens.", + "properties": { + "cached_tokens": { + "type": "integer", + "description": "The number of cached prompt tokens." + } + } + }, + "completion_tokens_details": { + "type": "object", + "description": "Breakdown of tokens used in a completion.", + "properties": { + "reasoning_tokens": { + "type": "integer", + "description": "Tokens generated by the model for reasoning." + } + } + } + }, + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ] + }, + "chatCompletionTool": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "function" + ], + "description": "The type of the tool. Currently, only `function` is supported." + }, + "function": { + "$ref": "#/components/schemas/FunctionObject" + } + }, + "required": [ + "type", + "function" + ] + }, + "FunctionParameters": { + "type": "object", + "description": "The parameters the functions accepts, described as a JSON Schema object. See the guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/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.", + "additionalProperties": true + }, + "FunctionObject": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "name": { + "type": "string", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." + }, + "parameters": { + "$ref": "#/components/schemas/FunctionParameters" + }, + "strict": { + "type": "boolean", + "nullable": true, + "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](docs/guides/function-calling)." + } + }, + "required": [ + "name" + ] + }, + "ResponseFormatText": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of response format being defined: `text`", + "enum": [ + "text" + ] + } + }, + "required": [ + "type" + ] + }, + "ResponseFormatJsonObject": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of response format being defined: `json_object`", + "enum": [ + "json_object" + ] + } + }, + "required": [ + "type" + ] + }, + "ResponseFormatJsonSchemaSchema": { + "type": "object", + "description": "The schema for the response format, described as a JSON Schema object.", + "additionalProperties": true + }, + "ResponseFormatJsonSchema": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of response format being defined: `json_schema`", + "enum": [ + "json_schema" + ] + }, + "json_schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "A description of what the response format is for, used by the model to determine how to respond in the format." + }, + "name": { + "type": "string", + "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." + }, + "schema": { + "$ref": "#/components/schemas/ResponseFormatJsonSchemaSchema" + }, + "strict": { + "type": "boolean", + "nullable": true, + "default": false, + "description": "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`." + } + }, + "required": [ + "schema", + "name" + ] + } + }, + "required": [ + "type", + "json_schema" + ] + }, + "chatCompletionChoiceCommon": { + "type": "object", + "properties": { + "index": { + "type": "integer" + }, + "finish_reason": { + "type": "string" + } + } + }, + "createTranslationRequest": { + "type": "object", + "description": "Translation request.", + "properties": { + "file": { + "type": "string", + "description": "The audio file to translate.", + "format": "binary" + }, + "prompt": { + "type": "string", + "description": "An optional text to guide the model's style or continue a previous audio segment. The prompt should be in English." + }, + "response_format": { + "$ref": "#/components/schemas/audioResponseFormat" + }, + "temperature": { + "type": "number", + "default": 0, + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit." + } + }, + "required": [ + "file" + ] + }, + "audioResponse": { + "description": "Translation or transcription response when response_format was json", + "type": "object", + "properties": { + "text": { + "type": "string", + "description": "Translated or transcribed text." + } + }, + "required": [ + "text" + ] + }, + "audioVerboseResponse": { + "description": "Translation or transcription response when response_format was verbose_json", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/audioResponse" + }, + { + "properties": { + "task": { + "type": "string", + "description": "Type of audio task.", + "enum": [ + "transcribe", + "translate" + ], + "x-ms-enum": { + "modelAsString": true + } + }, + "language": { + "type": "string", + "description": "Language." + }, + "duration": { + "type": "number", + "description": "Duration." + }, + "segments": { + "type": "array", + "items": { + "$ref": "#/components/schemas/audioSegment" + } + }, + "words": { + "type": "array", + "items": { + "$ref": "#/components/schemas/audioWord" + } + } + } + } + ], + "required": [ + "text" + ] + }, + "audioResponseFormat": { + "title": "AudioResponseFormat", + "description": "Defines the format of the output.", + "enum": [ + "json", + "text", + "srt", + "verbose_json", + "vtt" + ], + "type": "string", + "x-ms-enum": { + "modelAsString": true + } + }, + "createTranscriptionRequest": { + "type": "object", + "description": "Transcription request.", + "properties": { + "file": { + "type": "string", + "description": "The audio file object to transcribe.", + "format": "binary" + }, + "prompt": { + "type": "string", + "description": "An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language." + }, + "response_format": { + "$ref": "#/components/schemas/audioResponseFormat" + }, + "temperature": { + "type": "number", + "default": 0, + "description": "The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit." + }, + "language": { + "type": "string", + "description": "The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency." + }, + "timestamp_granularities[]": { + "type": "array", + "description": "The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency.", + "items": { + "type": "string", + "enum": [ + "word", + "segment" + ] + }, + "default": [ + "segment" + ] + } + }, + "required": [ + "file" + ] + }, + "audioSegment": { + "type": "object", + "description": "Transcription or translation segment.", + "properties": { + "id": { + "type": "integer", + "description": "Segment identifier." + }, + "seek": { + "type": "number", + "description": "Offset of the segment." + }, + "start": { + "type": "number", + "description": "Segment start offset." + }, + "end": { + "type": "number", + "description": "Segment end offset." + }, + "text": { + "type": "string", + "description": "Segment text." + }, + "tokens": { + "type": "array", + "items": { + "type": "number", + "nullable": false + }, + "description": "Tokens of the text." + }, + "temperature": { + "type": "number", + "description": "Temperature." + }, + "avg_logprob": { + "type": "number", + "description": "Average log probability." + }, + "compression_ratio": { + "type": "number", + "description": "Compression ratio." + }, + "no_speech_prob": { + "type": "number", + "description": "Probability of 'no speech'." + } + } + }, + "audioWord": { + "type": "object", + "description": "Transcription or translation word.", + "properties": { + "word": { + "type": "string", + "description": "Word" + }, + "start": { + "type": "number", + "description": "Word start offset." + }, + "end": { + "type": "number", + "description": "Word end offset." + } + } + }, + "createSpeechRequest": { + "type": "object", + "description": "Speech request.", + "properties": { + "input": { + "type": "string", + "description": "The text to synthesize audio for. The maximum length is 4096 characters.", + "maxLength": 4096 + }, + "voice": { + "type": "string", + "description": "The voice to use for speech synthesis.", + "enum": [ + "alloy", + "echo", + "fable", + "onyx", + "nova", + "shimmer" + ] + }, + "response_format": { + "type": "string", + "description": "The format to synthesize the audio in.", + "enum": [ + "mp3", + "opus", + "aac", + "flac", + "wav", + "pcm" + ] + }, + "speed": { + "description": "The speed of the synthesize audio. Select a value from `0.25` to `4.0`. `1.0` is the default.", + "type": "number", + "default": 1.0, + "minimum": 0.25, + "maximum": 4.0 + } + }, + "required": [ + "input", + "voice" + ] + }, + "imageQuality": { + "description": "The quality of the image that will be generated.", + "type": "string", + "enum": [ + "standard", + "hd" + ], + "default": "standard", + "x-ms-enum": { + "name": "Quality", + "modelAsString": true, + "values": [ + { + "value": "standard", + "description": "Standard quality creates images with standard quality.", + "name": "Standard" + }, + { + "value": "hd", + "description": "HD quality creates images with finer details and greater consistency across the image.", + "name": "HD" + } + ] + } + }, + "imagesResponseFormat": { + "description": "The format in which the generated images are returned.", + "type": "string", + "enum": [ + "url", + "b64_json" + ], + "default": "url", + "x-ms-enum": { + "name": "ImagesResponseFormat", + "modelAsString": true, + "values": [ + { + "value": "url", + "description": "The URL that provides temporary access to download the generated images.", + "name": "Url" + }, + { + "value": "b64_json", + "description": "The generated images are returned as base64 encoded string.", + "name": "Base64Json" + } + ] + } + }, + "imageSize": { + "description": "The size of the generated images.", + "type": "string", + "enum": [ + "256x256", + "512x512", + "1792x1024", + "1024x1792", + "1024x1024" + ], + "default": "1024x1024", + "x-ms-enum": { + "name": "Size", + "modelAsString": true, + "values": [ + { + "value": "256x256", + "description": "The desired size of the generated image is 256x256 pixels. Only supported for dall-e-2.", + "name": "Size256x256" + }, + { + "value": "512x512", + "description": "The desired size of the generated image is 512x512 pixels. Only supported for dall-e-2.", + "name": "Size512x512" + }, + { + "value": "1792x1024", + "description": "The desired size of the generated image is 1792x1024 pixels. Only supported for dall-e-3.", + "name": "Size1792x1024" + }, + { + "value": "1024x1792", + "description": "The desired size of the generated image is 1024x1792 pixels. Only supported for dall-e-3.", + "name": "Size1024x1792" + }, + { + "value": "1024x1024", + "description": "The desired size of the generated image is 1024x1024 pixels.", + "name": "Size1024x1024" + } + ] + } + }, + "imageStyle": { + "description": "The style of the generated images.", + "type": "string", + "enum": [ + "vivid", + "natural" + ], + "default": "vivid", + "x-ms-enum": { + "name": "Style", + "modelAsString": true, + "values": [ + { + "value": "vivid", + "description": "Vivid creates images that are hyper-realistic and dramatic.", + "name": "Vivid" + }, + { + "value": "natural", + "description": "Natural creates images that are more natural and less hyper-realistic.", + "name": "Natural" + } + ] + } + }, + "imageGenerationsRequest": { + "type": "object", + "properties": { + "prompt": { + "description": "A text description of the desired image(s). The maximum length is 4000 characters.", + "type": "string", + "format": "string", + "example": "a corgi in a field", + "minLength": 1 + }, + "n": { + "description": "The number of images to generate.", + "type": "integer", + "minimum": 1, + "maximum": 1, + "default": 1 + }, + "size": { + "$ref": "#/components/schemas/imageSize" + }, + "response_format": { + "$ref": "#/components/schemas/imagesResponseFormat" + }, + "user": { + "description": "A unique identifier representing your end-user, which can help to monitor and detect abuse.", + "type": "string", + "format": "string", + "example": "user123456" + }, + "quality": { + "$ref": "#/components/schemas/imageQuality" + }, + "style": { + "$ref": "#/components/schemas/imageStyle" + } + }, + "required": [ + "prompt" + ] + }, + "generateImagesResponse": { + "type": "object", + "properties": { + "created": { + "type": "integer", + "format": "unixtime", + "description": "The unix timestamp when the operation was created.", + "example": "1676540381" + }, + "data": { + "type": "array", + "description": "The result data of the operation, if successful", + "items": { + "$ref": "#/components/schemas/imageResult" + } + } + }, + "required": [ + "created", + "data" + ] + }, + "imageResult": { + "type": "object", + "description": "The image url or encoded image if successful, and an error otherwise.", + "properties": { + "url": { + "type": "string", + "description": "The image url.", + "example": "https://www.contoso.com" + }, + "b64_json": { + "type": "string", + "description": "The base64 encoded image" + }, + "content_filter_results": { + "$ref": "#/components/schemas/dalleContentFilterResults" + }, + "revised_prompt": { + "type": "string", + "description": "The prompt that was used to generate the image, if there was any revision to the prompt." + }, + "prompt_filter_results": { + "$ref": "#/components/schemas/dalleFilterResults" + } + } + }, + "line": { + "type": "object", + "description": "A content line object consisting of an adjacent sequence of content elements, such as words and selection marks.", + "properties": { + "text": { + "type": "string" + }, + "spans": { + "type": "array", + "description": "An array of spans that represent detected objects and its bounding box information.", + "items": { + "$ref": "#/components/schemas/span" + } + } + }, + "required": [ + "text", + "spans" + ] + }, + "span": { + "type": "object", + "description": "A span object that represents a detected object and its bounding box information.", + "properties": { + "text": { + "type": "string", + "description": "The text content of the span that represents the detected object." + }, + "offset": { + "type": "integer", + "description": "The character offset within the text where the span begins. This offset is defined as the position of the first character of the span, counting from the start of the text as Unicode codepoints." + }, + "length": { + "type": "integer", + "description": "The length of the span in characters, measured in Unicode codepoints." + }, + "polygon": { + "type": "array", + "description": "An array of objects representing points in the polygon that encloses the detected object.", + "items": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "The x-coordinate of the point." + }, + "y": { + "type": "number", + "description": "The y-coordinate of the point." + } + } + } + } + }, + "required": [ + "text", + "offset", + "length", + "polygon" + ] + }, + "runCompletionUsage": { + "type": "object", + "description": "Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).", + "properties": { + "completion_tokens": { + "type": "integer", + "description": "Number of completion tokens used over the course of the run." + }, + "prompt_tokens": { + "type": "integer", + "description": "Number of prompt tokens used over the course of the run." + }, + "total_tokens": { + "type": "integer", + "description": "Total number of tokens used (prompt + completion)." + } + }, + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ], + "nullable": true + }, + "runStepCompletionUsage": { + "type": "object", + "description": "Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.", + "properties": { + "completion_tokens": { + "type": "integer", + "description": "Number of completion tokens used over the course of the run step." + }, + "prompt_tokens": { + "type": "integer", + "description": "Number of prompt tokens used over the course of the run step." + }, + "total_tokens": { + "type": "integer", + "description": "Total number of tokens used (prompt + completion)." + } + }, + "required": [ + "prompt_tokens", + "completion_tokens", + "total_tokens" + ], + "nullable": true + }, + "assistantsApiResponseFormatOption": { + "description": "Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which ensures the model will match your supplied JSON schema. Learn more in the Structured Outputs guide.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which ensures the message the model generates is valid JSON.\n\n**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly \"stuck\" request. Also note that the message content may be partially cut off if `finish_reason=\"length\"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.", + "oneOf": [ + { + "type": "string", + "description": "`auto` is the default value\n", + "enum": [ + "auto" + ], + "x-ms-enum": { + "name": "AssistantsApiResponseFormatOption", + "modelAsString": true, + "values": [ + { + "value": "auto" + } + ] + } + }, + { + "$ref": "#/components/schemas/ResponseFormatText" + }, + { + "$ref": "#/components/schemas/ResponseFormatJsonObject" + }, + { + "$ref": "#/components/schemas/ResponseFormatJsonSchema" + } + ] + }, + "assistantsApiResponseFormat": { + "type": "object", + "description": "An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. If `text` the model can return text or any value needed.\n", + "properties": { + "type": { + "type": "string", + "enum": [ + "text", + "json_object" + ], + "x-ms-enum": { + "name": "AssistantsApiResponseFormat", + "modelAsString": true, + "values": [ + { + "value": "text" + }, + { + "value": "json_object" + } + ] + }, + "example": "json_object", + "default": "text", + "description": "Must be one of `text` or `json_object`." + } + } + }, + "assistantObject": { + "type": "object", + "title": "Assistant", + "description": "Represents an `assistant` that can call the model and use tools.", + "properties": { + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `assistant`.", + "type": "string", + "enum": [ + "assistant" + ], + "x-ms-enum": { + "name": "AssistantObjectType", + "modelAsString": true, + "values": [ + { + "value": "assistant", + "description": "The object type, which is always assistant" + } + ] + } + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the assistant was created.", + "type": "integer" + }, + "name": { + "description": "The name of the assistant. The maximum length is 256 characters.\n", + "type": "string", + "maxLength": 256, + "nullable": true + }, + "description": { + "description": "The description of the assistant. The maximum length is 512 characters.\n", + "type": "string", + "maxLength": 512, + "nullable": true + }, + "model": { + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n", + "type": "string" + }, + "instructions": { + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.\n", + "type": "string", + "maxLength": 256000, + "nullable": true + }, + "tools": { + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`.\n", + "default": [], + "type": "array", + "maxItems": 128, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearch" + }, + { + "$ref": "#/components/schemas/assistantToolsFunction" + } + ] + } + }, + "tool_resources": { + "type": "object", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n", + "properties": { + "code_interpreter": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of file IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool.\n", + "default": [], + "maxItems": 20, + "items": { + "type": "string" + } + } + } + }, + "file_search": { + "type": "object", + "properties": { + "vector_store_ids": { + "type": "array", + "description": "The ID of the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n", + "maxItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + }, + "temperature": { + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n", + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true + }, + "top_p": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n" + }, + "response_format": { + "$ref": "#/components/schemas/assistantsApiResponseFormatOption", + "nullable": true + } + }, + "required": [ + "id", + "object", + "created_at", + "name", + "description", + "model", + "instructions", + "tools", + "metadata" + ] + }, + "createAssistantRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "model": { + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n", + "anyOf": [ + { + "type": "string" + } + ] + }, + "name": { + "description": "The name of the assistant. The maximum length is 256 characters.\n", + "type": "string", + "nullable": true, + "maxLength": 256 + }, + "description": { + "description": "The description of the assistant. The maximum length is 512 characters.\n", + "type": "string", + "nullable": true, + "maxLength": 512 + }, + "instructions": { + "description": "The system instructions that the assistant uses. The maximum length is 256,000 characters.\n", + "type": "string", + "nullable": true, + "maxLength": 256000 + }, + "tools": { + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n", + "default": [], + "type": "array", + "maxItems": 128, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearch" + }, + { + "$ref": "#/components/schemas/assistantToolsFunction" + } + ] + } + }, + "tool_resources": { + "type": "object", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n", + "properties": { + "code_interpreter": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n", + "default": [], + "maxItems": 20, + "items": { + "type": "string" + } + } + } + }, + "file_search": { + "type": "object", + "properties": { + "vector_store_ids": { + "type": "array", + "description": "The vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n", + "maxItems": 1, + "items": { + "type": "string" + } + }, + "vector_stores": { + "type": "array", + "description": "A helper to create a vector store with file_ids and attach it to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.\n", + "maxItems": 10000, + "items": { + "type": "string" + } + }, + "chunking_strategy": { + "type": "object", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.", + "oneOf": [ + { + "type": "object", + "title": "Auto Chunking Strategy", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `auto`.", + "enum": [ + "auto" + ], + "x-ms-enum": { + "name": "AutoChunkingStrategyType", + "modelAsString": true, + "values": [ + { + "value": "auto" + } + ] + } + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "title": "Static Chunking Strategy", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `static`.", + "enum": [ + "static" + ], + "x-ms-enum": { + "name": "StaticChunkingStrategyType", + "modelAsString": true, + "values": [ + { + "value": "static" + } + ] + } + }, + "static": { + "type": "object", + "additionalProperties": false, + "properties": { + "max_chunk_size_tokens": { + "type": "integer", + "minimum": 100, + "maximum": 4096, + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`." + }, + "chunk_overlap_tokens": { + "type": "integer", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.\n" + } + }, + "required": [ + "max_chunk_size_tokens", + "chunk_overlap_tokens" + ] + } + }, + "required": [ + "type", + "static" + ] + } + ] + }, + "metadata": { + "type": "object", + "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "x-oaiTypeLabel": "map" + } + } + } + } + }, + "oneOf": [ + { + "required": [ + "vector_store_ids" + ] + }, + { + "required": [ + "vector_stores" + ] + } + ] + } + }, + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + }, + "temperature": { + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n", + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true + }, + "top_p": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n" + }, + "response_format": { + "$ref": "#/components/schemas/assistantsApiResponseFormatOption", + "nullable": true + } + }, + "required": [ + "model" + ] + }, + "modifyAssistantRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "model": { + "description": "ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them.\n", + "anyOf": [ + { + "type": "string" + } + ] + }, + "name": { + "description": "The name of the assistant. The maximum length is 256 characters.\n", + "type": "string", + "nullable": true, + "maxLength": 256 + }, + "description": { + "description": "The description of the assistant. The maximum length is 512 characters.\n", + "type": "string", + "nullable": true, + "maxLength": 512 + }, + "instructions": { + "description": "The system instructions that the assistant uses. The maximum length is 32768 characters.\n", + "type": "string", + "nullable": true, + "maxLength": 32768 + }, + "tools": { + "description": "A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`.\n", + "default": [], + "type": "array", + "maxItems": 128, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearch" + }, + { + "$ref": "#/components/schemas/assistantToolsFunction" + } + ] + } + }, + "tool_resources": { + "type": "object", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n", + "properties": { + "code_interpreter": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n", + "default": [], + "maxItems": 20, + "items": { + "type": "string" + } + } + } + }, + "file_search": { + "type": "object", + "properties": { + "vector_store_ids": { + "type": "array", + "description": "Overrides the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n", + "maxItems": 1, + "items": { + "type": "string" + } + } + } + } + } + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + }, + "temperature": { + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n", + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true + }, + "top_p": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n" + }, + "response_format": { + "$ref": "#/components/schemas/assistantsApiResponseFormatOption", + "nullable": true + } + } + }, + "deleteAssistantResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "object": { + "type": "string", + "enum": [ + "assistant.deleted" + ], + "x-ms-enum": { + "name": "DeleteAssistantResponseState", + "modelAsString": true, + "values": [ + { + "value": "assistant.deleted" + } + ] + } + } + }, + "required": [ + "id", + "object", + "deleted" + ] + }, + "listAssistantsResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "example": "list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/assistantObject" + } + }, + "first_id": { + "type": "string" + }, + "last_id": { + "type": "string" + }, + "has_more": { + "type": "boolean", + "example": false + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "assistantToolsCode": { + "type": "object", + "title": "Code interpreter tool", + "properties": { + "type": { + "type": "string", + "description": "The type of tool being defined: `code_interpreter`", + "enum": [ + "code_interpreter" + ], + "x-ms-enum": { + "name": "assistantToolsCodeType", + "modelAsString": true, + "values": [ + { + "value": "code_interpreter" + } + ] + } + } + }, + "required": [ + "type" + ] + }, + "assistantToolsFileSearch": { + "type": "object", + "title": "FileSearch tool", + "properties": { + "type": { + "type": "string", + "description": "The type of tool being defined: `file_search`", + "enum": [ + "file_search" + ], + "x-ms-enum": { + "name": "assistantToolsFileSearchType", + "modelAsString": true, + "values": [ + { + "value": "file_search" + } + ] + } + }, + "file_search": { + "type": "object", + "description": "Overrides for the file search tool.", + "properties": { + "max_num_results": { + "type": "integer", + "minimum": 1, + "maximum": 50, + "description": "The maximum number of results the file search tool should output. The default is 20 for gpt-4* models and 5 for gpt-3.5-turbo. This number should be between 1 and 50 inclusive.\n\nNote that the file search tool may output fewer than `max_num_results` results. \n" + } + } + } + }, + "required": [ + "type" + ] + }, + "assistantToolsFileSearchTypeOnly": { + "type": "object", + "title": "FileSearch tool", + "properties": { + "type": { + "type": "string", + "description": "The type of tool being defined: `file_search`", + "enum": [ + "file_search" + ], + "x-ms-enum": { + "name": "assistantToolsFileSearchType", + "modelAsString": true, + "values": [ + { + "value": "file_search" + } + ] + } + } + }, + "required": [ + "type" + ] + }, + "assistantToolsFunction": { + "type": "object", + "title": "Function tool", + "properties": { + "type": { + "type": "string", + "description": "The type of tool being defined: `function`", + "enum": [ + "function" + ], + "x-ms-enum": { + "name": "assistantToolsFunction", + "modelAsString": true, + "values": [ + { + "value": "function" + } + ] + } + }, + "function": { + "type": "object", + "description": "The function definition.", + "properties": { + "description": { + "type": "string", + "description": "A description of what the function does, used by the model to choose when and how to call the function." + }, + "name": { + "type": "string", + "description": "The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64." + }, + "parameters": { + "$ref": "#/components/schemas/chatCompletionFunctionParameters" + } + }, + "required": [ + "name", + "parameters", + "description" + ] + } + }, + "required": [ + "type", + "function" + ] + }, + "truncationObject": { + "type": "object", + "title": "Thread Truncation Controls", + "description": "Controls for how a thread will be truncated prior to the run. Use this to control the initial context window of the run.", + "properties": { + "type": { + "type": "string", + "description": "The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`.", + "enum": [ + "auto", + "last_messages" + ], + "x-ms-enum": { + "name": "TruncationType", + "modelAsString": true, + "values": [ + { + "value": "auto" + }, + { + "value": "last_messages" + } + ] + } + }, + "last_messages": { + "type": "integer", + "description": "The number of most recent messages from the thread when constructing the context for the run.", + "minimum": 1, + "nullable": true + } + }, + "required": [ + "type" + ] + }, + "assistantsApiToolChoiceOption": { + "description": "Controls which (if any) tool is called by the model.\n`none` means the model will not call any tools and instead generates a message.\n`auto` is the default value and means the model can pick between generating a message or calling a tool.\nSpecifying a particular tool like `{\"type\": \"file_search\"}` or `{\"type\": \"function\", \"function\": {\"name\": \"my_function\"}}` forces the model to call that tool.\n", + "oneOf": [ + { + "type": "string", + "description": "`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n", + "enum": [ + "none", + "auto" + ], + "x-ms-enum": { + "name": "AssistantsApiToolChoiceOption", + "modelAsString": true, + "values": [ + { + "value": "none" + }, + { + "value": "auto" + } + ] + } + }, + { + "$ref": "#/components/schemas/assistantsNamedToolChoice" + } + ] + }, + "assistantsNamedToolChoice": { + "type": "object", + "description": "Specifies a tool the model should use. Use to force the model to call a specific tool.", + "properties": { + "type": { + "type": "string", + "enum": [ + "function", + "code_interpreter", + "file_search" + ], + "description": "The type of the tool. If type is `function`, the function name must be set", + "x-ms-enum": { + "name": "AssistantsNamedToolChoiceType", + "modelAsString": true, + "values": [ + { + "value": "function" + }, + { + "value": "code_interpreter" + }, + { + "value": "file_search" + } + ] + } + }, + "function": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the function to call." + } + }, + "required": [ + "name" + ] + } + }, + "required": [ + "type" + ] + }, + "runObject": { + "type": "object", + "title": "A run on a thread", + "description": "Represents an execution run on a [thread](/docs/api-reference/threads).", + "properties": { + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `thread.run`.", + "type": "string", + "enum": [ + "thread.run" + ], + "x-ms-enum": { + "name": "runObjectType", + "modelAsString": true, + "values": [ + { + "value": "thread.run", + "description": "The run object type which is always thread.run" + } + ] + } + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the run was created.", + "type": "integer" + }, + "thread_id": { + "description": "The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.", + "type": "string" + }, + "assistant_id": { + "description": "The ID of the assistant used for execution of this run.", + "type": "string" + }, + "status": { + "description": "The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.", + "type": "string", + "enum": [ + "queued", + "in_progress", + "requires_action", + "cancelling", + "cancelled", + "failed", + "completed", + "expired" + ], + "x-ms-enum": { + "name": "RunObjectStatus", + "modelAsString": true, + "values": [ + { + "value": "queued", + "description": "The queued state" + }, + { + "value": "in_progress", + "description": "The in_progress state" + }, + { + "value": "requires_action", + "description": "The required_action state" + }, + { + "value": "cancelling", + "description": "The cancelling state" + }, + { + "value": "cancelled", + "description": "The cancelled state" + }, + { + "value": "failed", + "description": "The failed state" + }, + { + "value": "completed", + "description": "The completed state" + }, + { + "value": "expired", + "description": "The expired state" + } + ] + } + }, + "required_action": { + "type": "object", + "description": "Details on the action required to continue the run. Will be `null` if no action is required.", + "nullable": true, + "properties": { + "type": { + "description": "For now, this is always `submit_tool_outputs`.", + "type": "string", + "enum": [ + "submit_tool_outputs" + ] + }, + "submit_tool_outputs": { + "type": "object", + "description": "Details on the tool outputs needed for this run to continue.", + "properties": { + "tool_calls": { + "type": "array", + "description": "A list of the relevant tool calls.", + "items": { + "$ref": "#/components/schemas/runToolCallObject" + } + } + }, + "required": [ + "tool_calls" + ] + } + }, + "required": [ + "type", + "submit_tool_outputs" + ] + }, + "last_error": { + "type": "object", + "description": "The last error associated with this run. Will be `null` if there are no errors.", + "nullable": true, + "properties": { + "code": { + "type": "string", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "enum": [ + "server_error", + "rate_limit_exceeded" + ], + "x-ms-enum": { + "name": "LastErrorCode", + "modelAsString": true, + "values": [ + { + "value": "server_error", + "description": "The server failed to respond to request due to server error" + }, + { + "value": "rate_limit_exceeded", + "description": "The server failed to respond to request due to rate limit exceeded" + } + ] + } + }, + "message": { + "type": "string", + "description": "A human-readable description of the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "expires_at": { + "description": "The Unix timestamp (in seconds) for when the run will expire.", + "type": "integer" + }, + "started_at": { + "description": "The Unix timestamp (in seconds) for when the run was started.", + "type": "integer", + "nullable": true + }, + "cancelled_at": { + "description": "The Unix timestamp (in seconds) for when the run was cancelled.", + "type": "integer", + "nullable": true + }, + "failed_at": { + "description": "The Unix timestamp (in seconds) for when the run failed.", + "type": "integer", + "nullable": true + }, + "completed_at": { + "description": "The Unix timestamp (in seconds) for when the run was completed.", + "type": "integer", + "nullable": true + }, + "incomplete_details": { + "description": "Details on why the run is incomplete. Will be `null` if the run is not incomplete.", + "type": "object", + "nullable": true, + "properties": { + "reason": { + "description": "The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.", + "type": "string", + "enum": [ + "max_completion_tokens", + "max_prompt_tokens" + ], + "x-ms-enum": { + "name": "IncompleteDetailsReason", + "modelAsString": true, + "values": [ + { + "value": "max_completion_tokens" + }, + { + "value": "max_prompt_tokens" + } + ] + } + } + } + }, + "model": { + "description": "The model that the assistant used for this run.", + "type": "string" + }, + "instructions": { + "description": "The instructions that the assistant used for this run.", + "type": "string" + }, + "tools": { + "description": "The list of tools that the assistant used for this run.", + "default": [], + "type": "array", + "maxItems": 20, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearch" + }, + { + "$ref": "#/components/schemas/assistantToolsFunction" + } + ] + } + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + }, + "usage": { + "$ref": "#/components/schemas/runCompletionUsage" + }, + "temperature": { + "description": "The sampling temperature used for this run. If not set, defaults to 1.", + "type": "number", + "nullable": true + }, + "top_p": { + "description": "The nucleus sampling value used for this run. If not set, defaults to 1.", + "type": "number", + "nullable": true + }, + "max_prompt_tokens": { + "type": "integer", + "nullable": true, + "description": "The maximum number of prompt tokens specified to have been used over the course of the run.\n", + "minimum": 256 + }, + "max_completion_tokens": { + "type": "integer", + "nullable": true, + "description": "The maximum number of completion tokens specified to have been used over the course of the run.\n", + "minimum": 256 + }, + "truncation_strategy": { + "$ref": "#/components/schemas/truncationObject", + "nullable": true + }, + "tool_choice": { + "$ref": "#/components/schemas/assistantsApiToolChoiceOption", + "nullable": true + }, + "parallel_tool_calls": { + "$ref": "#/components/schemas/ParallelToolCalls", + "nullable": true + }, + "response_format": { + "$ref": "#/components/schemas/assistantsApiResponseFormatOption", + "nullable": true + } + }, + "required": [ + "id", + "object", + "created_at", + "thread_id", + "assistant_id", + "status", + "required_action", + "last_error", + "expires_at", + "started_at", + "cancelled_at", + "failed_at", + "completed_at", + "model", + "instructions", + "tools", + "metadata", + "usage", + "incomplete_details", + "max_prompt_tokens", + "max_completion_tokens", + "truncation_strategy", + "tool_choice", + "response_format" + ] + }, + "createRunRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "assistant_id": { + "description": "The ID of the assistant to use to execute this run.", + "type": "string" + }, + "model": { + "description": "The ID of the Model 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.", + "type": "string", + "nullable": true + }, + "instructions": { + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": "string", + "nullable": true + }, + "additional_instructions": { + "description": "Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions.", + "type": "string", + "nullable": true + }, + "additional_messages": { + "description": "Adds additional messages to the thread before creating the run.", + "type": "array", + "items": { + "$ref": "#/components/schemas/createMessageRequest" + }, + "nullable": true + }, + "tools": { + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "nullable": true, + "type": "array", + "maxItems": 20, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearch" + }, + { + "$ref": "#/components/schemas/assistantToolsFunction" + } + ] + } + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n" + }, + "top_p": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n" + }, + "stream": { + "type": "boolean", + "nullable": true, + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n" + }, + "max_prompt_tokens": { + "type": "integer", + "nullable": true, + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n", + "minimum": 256 + }, + "max_completion_tokens": { + "type": "integer", + "nullable": true, + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n", + "minimum": 256 + }, + "truncation_strategy": { + "$ref": "#/components/schemas/truncationObject", + "nullable": true + }, + "tool_choice": { + "$ref": "#/components/schemas/assistantsApiToolChoiceOption", + "nullable": true + }, + "parallel_tool_calls": { + "$ref": "#/components/schemas/ParallelToolCalls" + }, + "response_format": { + "$ref": "#/components/schemas/assistantsApiResponseFormatOption", + "nullable": true + } + }, + "required": [ + "thread_id", + "assistant_id" + ] + }, + "listRunsResponse": { + "type": "object", + "properties": { + "object": { + "type": "string", + "example": "list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/runObject" + } + }, + "first_id": { + "type": "string" + }, + "last_id": { + "type": "string" + }, + "has_more": { + "type": "boolean", + "example": false + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "modifyRunRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + } + }, + "submitToolOutputsRunRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "tool_outputs": { + "description": "A list of tools for which the outputs are being submitted.", + "type": "array", + "items": { + "type": "object", + "properties": { + "tool_call_id": { + "type": "string", + "description": "The ID of the tool call in the `required_action` object within the run object the output is being submitted for." + }, + "output": { + "type": "string", + "description": "The output of the tool call to be submitted to continue the run." + } + } + } + }, + "stream": { + "type": "boolean", + "nullable": true, + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n" + } + }, + "required": [ + "tool_outputs" + ] + }, + "runToolCallObject": { + "type": "object", + "description": "Tool call objects", + "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](/docs/api-reference/runs/submitToolOutputs) endpoint." + }, + "type": { + "type": "string", + "description": "The type of tool call the output is required for. For now, this is always `function`.", + "enum": [ + "function" + ], + "x-ms-enum": { + "name": "RunToolCallObjectType", + "modelAsString": true, + "values": [ + { + "value": "function" + } + ] + } + }, + "function": { + "type": "object", + "description": "The function definition.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function." + }, + "arguments": { + "type": "string", + "description": "The arguments that the model expects you to pass to the function." + } + }, + "required": [ + "name", + "arguments" + ] + } + }, + "required": [ + "id", + "type", + "function" + ] + }, + "createThreadAndRunRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "assistant_id": { + "description": "The ID of the assistant to use to execute this run.", + "type": "string" + }, + "thread": { + "$ref": "#/components/schemas/createThreadRequest", + "description": "If no thread is provided, an empty thread will be created." + }, + "model": { + "description": "The ID of the [Model](/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.", + "type": "string", + "nullable": true + }, + "instructions": { + "description": "Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.", + "type": "string", + "nullable": true + }, + "tools": { + "description": "Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.", + "nullable": true, + "type": "array", + "maxItems": 20, + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearch" + }, + { + "$ref": "#/components/schemas/assistantToolsFunction" + } + ] + } + }, + "tool_resources": { + "type": "object", + "description": "A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n", + "properties": { + "code_interpreter": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n", + "default": [], + "maxItems": 20, + "items": { + "type": "string" + } + } + } + }, + "file_search": { + "type": "object", + "properties": { + "vector_store_ids": { + "type": "array", + "description": "The ID of the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant.\n", + "maxItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + }, + "temperature": { + "type": "number", + "minimum": 0, + "maximum": 2, + "default": 1, + "example": 1, + "nullable": true, + "description": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n" + }, + "top_p": { + "type": "number", + "minimum": 0, + "maximum": 1, + "default": 1, + "example": 1, + "nullable": true, + "description": "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n\nWe generally recommend altering this or temperature but not both.\n" + }, + "stream": { + "type": "boolean", + "nullable": true, + "description": "If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message.\n" + }, + "stream_options": { + "$ref": "#/components/schemas/chatCompletionStreamOptions", + "nullable": true + }, + "max_prompt_tokens": { + "type": "integer", + "nullable": true, + "description": "The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n", + "minimum": 256 + }, + "max_completion_tokens": { + "type": "integer", + "nullable": true, + "description": "The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info.\n", + "minimum": 256 + }, + "truncation_strategy": { + "$ref": "#/components/schemas/truncationObject", + "nullable": true + }, + "tool_choice": { + "$ref": "#/components/schemas/assistantsApiToolChoiceOption", + "nullable": true + }, + "parallel_tool_calls": { + "$ref": "#/components/schemas/ParallelToolCalls" + }, + "response_format": { + "$ref": "#/components/schemas/assistantsApiResponseFormatOption", + "nullable": true + } + }, + "required": [ + "thread_id", + "assistant_id" + ] + }, + "threadObject": { + "type": "object", + "title": "Thread", + "description": "Represents a thread that contains [messages](/docs/api-reference/messages).", + "properties": { + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `thread`.", + "type": "string", + "enum": [ + "thread" + ], + "x-ms-enum": { + "name": "ThreadObjectType", + "modelAsString": true, + "values": [ + { + "value": "thread", + "description": "The type of thread object which is always `thread`" + } + ] + } + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the thread was created.", + "type": "integer" + }, + "tool_resources": { + "type": "object", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n", + "properties": { + "code_interpreter": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n", + "default": [], + "maxItems": 20, + "items": { + "type": "string" + } + } + } + }, + "file_search": { + "type": "object", + "properties": { + "vector_store_ids": { + "type": "array", + "description": "The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n", + "maxItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + }, + "required": [ + "id", + "object", + "created_at", + "tool_resources", + "metadata" + ] + }, + "createThreadRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "messages": { + "description": "A list of [messages](/docs/api-reference/messages) to start the thread with.", + "type": "array", + "items": { + "$ref": "#/components/schemas/createMessageRequest" + } + }, + "tool_resources": { + "type": "object", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n", + "properties": { + "code_interpreter": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n", + "default": [], + "maxItems": 20, + "items": { + "type": "string" + } + } + } + }, + "file_search": { + "type": "object", + "properties": { + "vector_store_ids": { + "type": "array", + "description": "The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n", + "maxItems": 1, + "items": { + "type": "string" + } + }, + "vector_stores": { + "type": "array", + "description": "A helper to create a vector store with file_ids and attach it to this thread. There can be a maximum of 1 vector store attached to the thread.\n", + "maxItems": 1, + "items": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store.\n", + "maxItems": 10000, + "items": { + "type": "string" + } + }, + "chunking_strategy": { + "type": "object", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.", + "oneOf": [ + { + "type": "object", + "title": "Auto Chunking Strategy", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `auto`.", + "enum": [ + "auto" + ], + "x-ms-enum": { + "name": "AutoChunkingStrategyType", + "modelAsString": true, + "values": [ + { + "value": "auto" + } + ] + } + } + }, + "required": [ + "type" + ] + }, + { + "type": "object", + "title": "Static Chunking Strategy", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `static`.", + "enum": [ + "static" + ], + "x-ms-enum": { + "name": "StaticChunkingStrategyType", + "modelAsString": true, + "values": [ + { + "value": "static" + } + ] + } + }, + "static": { + "type": "object", + "additionalProperties": false, + "properties": { + "max_chunk_size_tokens": { + "type": "integer", + "minimum": 100, + "maximum": 4096, + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`." + }, + "chunk_overlap_tokens": { + "type": "integer", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.\n" + } + }, + "required": [ + "max_chunk_size_tokens", + "chunk_overlap_tokens" + ] + } + }, + "required": [ + "type", + "static" + ] + } + ] + }, + "metadata": { + "type": "object", + "description": "Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n" + } + } + } + } + }, + "oneOf": [ + { + "required": [ + "vector_store_ids" + ] + }, + { + "required": [ + "vector_stores" + ] + } + ] + } + }, + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + } + }, + "modifyThreadRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "tool_resources": { + "type": "object", + "description": "A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs.\n", + "properties": { + "code_interpreter": { + "type": "object", + "properties": { + "file_ids": { + "type": "array", + "description": "A list of File IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool.\n", + "default": [], + "maxItems": 20, + "items": { + "type": "string" + } + } + } + }, + "file_search": { + "type": "object", + "properties": { + "vector_store_ids": { + "type": "array", + "description": "The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread.\n", + "maxItems": 1, + "items": { + "type": "string" + } + } + } + } + }, + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + } + }, + "deleteThreadResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "object": { + "type": "string", + "enum": [ + "thread.deleted" + ], + "x-ms-enum": { + "name": "DeleteThreadResponseObjectState", + "modelAsString": true, + "values": [ + { + "value": "thread.deleted", + "description": "The delete thread response object state which is `thread.deleted`" + } + ] + } + } + }, + "required": [ + "id", + "object", + "deleted" + ] + }, + "listThreadsResponse": { + "properties": { + "object": { + "type": "string", + "example": "list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/threadObject" + } + }, + "first_id": { + "type": "string" + }, + "last_id": { + "type": "string" + }, + "has_more": { + "type": "boolean", + "example": false + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "messageObject": { + "type": "object", + "title": "The message object", + "description": "Represents a message within a [thread](/docs/api-reference/threads).", + "properties": { + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `thread.message`.", + "type": "string", + "enum": [ + "thread.message" + ], + "x-ms-enum": { + "name": "MessageObjectType", + "modelAsString": true, + "values": [ + { + "value": "thread.message", + "description": "The message object type which is `thread.message`" + } + ] + } + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the message was created.", + "type": "integer" + }, + "thread_id": { + "description": "The [thread](/docs/api-reference/threads) ID that this message belongs to.", + "type": "string" + }, + "status": { + "description": "The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.", + "type": "string", + "enum": [ + "in_progress", + "incomplete", + "completed" + ], + "x-ms-enum": { + "name": "MessageObjectStatus", + "modelAsString": true, + "values": [ + { + "value": "in_progress" + }, + { + "value": "incomplete" + }, + { + "value": "completed" + } + ] + } + }, + "incomplete_details": { + "description": "On an incomplete message, details about why the message is incomplete.", + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason the message is incomplete.", + "enum": [ + "content_filter", + "max_tokens", + "run_cancelled", + "run_expired", + "run_failed" + ], + "x-ms-enum": { + "name": "MessageObjectIncompleteReason", + "modelAsString": true, + "values": [ + { + "value": "content_filter" + }, + { + "value": "max_tokens" + }, + { + "value": "run_cancelled" + }, + { + "value": "run_expired" + }, + { + "value": "run_failed" + } + ] + } + } + }, + "nullable": true, + "required": [ + "reason" + ] + }, + "completed_at": { + "description": "The Unix timestamp (in seconds) for when the message was completed.", + "type": "integer", + "nullable": true + }, + "incomplete_at": { + "description": "The Unix timestamp (in seconds) for when the message was marked as incomplete.", + "type": "integer", + "nullable": true + }, + "role": { + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": "string", + "enum": [ + "user", + "assistant" + ], + "x-ms-enum": { + "name": "MessageObjectRole", + "modelAsString": true, + "values": [ + { + "value": "user" + }, + { + "value": "assistant" + } + ] + } + }, + "content": { + "description": "The content of the message in array of text and/or images.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/messageContentImageFileObject" + }, + { + "$ref": "#/components/schemas/messageContentTextObject" + } + ] + } + }, + "assistant_id": { + "description": "If applicable, the ID of the assistant that authored this message.", + "type": "string", + "nullable": true + }, + "run_id": { + "description": "If applicable, the ID of the [run](/docs/api-reference/runs) associated with the authoring of this message.", + "type": "string", + "nullable": true + }, + "attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "file_id": { + "type": "string", + "description": "The ID of the file to attach to the message." + }, + "tools": { + "description": "The tools to add this file to.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearchTypeOnly" + } + ] + } + } + } + }, + "description": "A list of files attached to the message, and the tools they were added to.", + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + }, + "required": [ + "id", + "object", + "created_at", + "thread_id", + "status", + "incomplete_details", + "completed_at", + "incomplete_at", + "role", + "content", + "assistant_id", + "run_id", + "attachments", + "metadata" + ] + }, + "messageDeltaObject": { + "type": "object", + "title": "Message delta object", + "description": "Represents a message delta i.e. any changed fields on a message during streaming.\n", + "properties": { + "id": { + "description": "The identifier of the message, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `thread.message.delta`.", + "type": "string", + "enum": [ + "thread.message.delta" + ], + "x-ms-enum": { + "name": "MessageDeltaObjectType", + "modelAsString": true, + "values": [ + { + "value": "thread.message.delta" + } + ] + } + }, + "delta": { + "description": "The delta containing the fields that have changed on the Message.", + "type": "object", + "properties": { + "role": { + "description": "The entity that produced the message. One of `user` or `assistant`.", + "type": "string", + "enum": [ + "user", + "assistant" + ], + "x-ms-enum": { + "name": "MessageDeltaObjectDeltaRole", + "modelAsString": true, + "values": [ + { + "value": "user" + }, + { + "value": "assistant" + } + ] + } + }, + "content": { + "description": "The content of the message in array of text and/or images.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/messageDeltaContentImageFileObject" + }, + { + "$ref": "#/components/schemas/messageDeltaContentTextObject" + } + ] + } + } + } + } + }, + "required": [ + "id", + "object", + "delta" + ] + }, + "createMessageRequest": { + "type": "object", + "additionalProperties": false, + "required": [ + "role", + "content" + ], + "properties": { + "role": { + "type": "string", + "enum": [ + "user", + "assistant" + ], + "x-ms-enum": { + "name": "CreateMessageRequestRole", + "modelAsString": true, + "values": [ + { + "value": "user" + }, + { + "value": "assistant" + } + ] + }, + "description": "The role of the entity that is creating the message. Allowed values include:\n- `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages.\n- `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation.\n" + }, + "content": { + "type": "string", + "minLength": 1, + "maxLength": 256000, + "description": "The content of the message." + }, + "attachments": { + "type": "array", + "items": { + "type": "object", + "properties": { + "file_id": { + "type": "string", + "description": "The ID of the file to attach to the message." + }, + "tools": { + "description": "The tools to add this file to.", + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/assistantToolsCode" + }, + { + "$ref": "#/components/schemas/assistantToolsFileSearchTypeOnly" + } + ] + } + } + } + }, + "description": "A list of files attached to the message, and the tools they should be added to.", + "required": [ + "file_id", + "tools" + ], + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + } + }, + "modifyMessageRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + } + }, + "deleteMessageResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "object": { + "type": "string", + "enum": [ + "thread.message.deleted" + ], + "x-ms-enum": { + "name": "DeleteMessageResponseObject", + "modelAsString": true, + "values": [ + { + "value": "thread.message.deleted", + "description": "The delete message response object state" + } + ] + } + } + }, + "required": [ + "id", + "object", + "deleted" + ] + }, + "listMessagesResponse": { + "properties": { + "object": { + "type": "string", + "example": "list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/messageObject" + } + }, + "first_id": { + "type": "string" + }, + "last_id": { + "type": "string" + }, + "has_more": { + "type": "boolean", + "example": false + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "messageContentImageFileObject": { + "title": "Image file", + "type": "object", + "description": "References an image File in the content of a message.", + "properties": { + "type": { + "description": "Always `image_file`.", + "type": "string", + "enum": [ + "image_file" + ], + "x-ms-enum": { + "name": "MessageContentImageFileObjectType", + "modelAsString": true, + "values": [ + { + "value": "image_file", + "description": "The message content image file type" + } + ] + } + }, + "image_file": { + "type": "object", + "properties": { + "file_id": { + "description": "The File ID of the image in the message content.", + "type": "string" + } + }, + "required": [ + "file_id" + ] + } + }, + "required": [ + "type", + "image_file" + ] + }, + "messageContentTextObject": { + "title": "Text", + "type": "object", + "description": "The text content that is part of a message.", + "properties": { + "type": { + "description": "Always `text`.", + "type": "string", + "enum": [ + "text" + ], + "x-ms-enum": { + "name": "messageContentTextObjectType", + "modelAsString": true, + "values": [ + { + "value": "text", + "description": "The message content text Object type" + } + ] + } + }, + "text": { + "type": "object", + "properties": { + "value": { + "description": "The data that makes up the text.", + "type": "string" + }, + "annotations": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/messageContentTextAnnotationsFileCitationObject" + }, + { + "$ref": "#/components/schemas/messageContentTextAnnotationsFilePathObject" + } + ] + } + } + }, + "required": [ + "value", + "annotations" + ] + } + }, + "required": [ + "type", + "text" + ] + }, + "messageContentTextAnnotationsFileCitationObject": { + "title": "File citation", + "type": "object", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"retrieval\" tool to search files.", + "properties": { + "type": { + "description": "Always `file_citation`.", + "type": "string", + "enum": [ + "file_citation" + ], + "x-ms-enum": { + "name": "FileCitationObjectType", + "modelAsString": true, + "values": [ + { + "value": "file_citation", + "description": "The file citation object type" + } + ] + } + }, + "text": { + "description": "The text in the message content that needs to be replaced.", + "type": "string" + }, + "file_citation": { + "type": "object", + "properties": { + "file_id": { + "description": "The ID of the specific File the citation is from.", + "type": "string" + } + }, + "required": [ + "file_id" + ] + }, + "start_index": { + "type": "integer", + "minimum": 0 + }, + "end_index": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "type", + "text", + "file_citation", + "start_index", + "end_index" + ] + }, + "messageContentTextAnnotationsFilePathObject": { + "title": "File path", + "type": "object", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "properties": { + "type": { + "description": "Always `file_path`.", + "type": "string", + "enum": [ + "file_path" + ], + "x-ms-enum": { + "name": "FilePathObjectType", + "modelAsString": true, + "values": [ + { + "value": "file_path", + "description": "The file path object type" + } + ] + } + }, + "text": { + "description": "The text in the message content that needs to be replaced.", + "type": "string" + }, + "file_path": { + "type": "object", + "properties": { + "file_id": { + "description": "The ID of the file that was generated.", + "type": "string" + } + }, + "required": [ + "file_id" + ] + }, + "start_index": { + "type": "integer", + "minimum": 0 + }, + "end_index": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "type", + "text", + "file_path", + "start_index", + "end_index" + ] + }, + "messageDeltaContentImageFileObject": { + "title": "Image file", + "type": "object", + "description": "References an image File in the content of a message.", + "properties": { + "index": { + "type": "integer", + "description": "The index of the content part in the message." + }, + "type": { + "description": "Always `image_file`.", + "type": "string", + "enum": [ + "image_file" + ], + "x-ms-enum": { + "name": "MessageDeltaContentImageFileObjectType", + "modelAsString": true, + "values": [ + { + "value": "image_file" + } + ] + } + }, + "image_file": { + "type": "object", + "properties": { + "file_id": { + "description": "The File ID of the image in the message content.", + "type": "string" + } + } + } + }, + "required": [ + "index", + "type" + ] + }, + "messageDeltaContentTextObject": { + "title": "Text", + "type": "object", + "description": "The text content that is part of a message.", + "properties": { + "index": { + "type": "integer", + "description": "The index of the content part in the message." + }, + "type": { + "description": "Always `text`.", + "type": "string", + "enum": [ + "text" + ], + "x-ms-enum": { + "name": "MessageDeltaContentTextObjectType", + "modelAsString": true, + "values": [ + { + "value": "text" + } + ] + } + }, + "text": { + "type": "object", + "properties": { + "value": { + "description": "The data that makes up the text.", + "type": "string" + }, + "annotations": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/messageDeltaContentTextAnnotationsFileCitationObject" + }, + { + "$ref": "#/components/schemas/messageDeltaContentTextAnnotationsFilePathObject" + } + ] + } + } + } + } + }, + "required": [ + "index", + "type" + ] + }, + "messageDeltaContentTextAnnotationsFileCitationObject": { + "title": "File citation", + "type": "object", + "description": "A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the \"file_search\" tool to search files.", + "properties": { + "index": { + "type": "integer", + "description": "The index of the annotation in the text content part." + }, + "type": { + "description": "Always `file_citation`.", + "type": "string", + "enum": [ + "file_citation" + ], + "x-ms-enum": { + "name": "MessageDeltaContentTextAnnotationsFileCitationObjectType", + "modelAsString": true, + "values": [ + { + "value": "file_citation" + } + ] + } + }, + "text": { + "description": "The text in the message content that needs to be replaced.", + "type": "string" + }, + "file_citation": { + "type": "object", + "properties": { + "file_id": { + "description": "The ID of the specific File the citation is from.", + "type": "string" + }, + "quote": { + "description": "The specific quote in the file.", + "type": "string" + } + } + }, + "start_index": { + "type": "integer", + "minimum": 0 + }, + "end_index": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "index", + "type" + ] + }, + "messageDeltaContentTextAnnotationsFilePathObject": { + "title": "File path", + "type": "object", + "description": "A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.", + "properties": { + "index": { + "type": "integer", + "description": "The index of the annotation in the text content part." + }, + "type": { + "description": "Always `file_path`.", + "type": "string", + "enum": [ + "file_path" + ], + "x-ms-enum": { + "name": "MessageDeltaContentTextAnnotationsFilePathObjectType", + "modelAsString": true, + "values": [ + { + "value": "file_path" + } + ] + } + }, + "text": { + "description": "The text in the message content that needs to be replaced.", + "type": "string" + }, + "file_path": { + "type": "object", + "properties": { + "file_id": { + "description": "The ID of the file that was generated.", + "type": "string" + } + } + }, + "start_index": { + "type": "integer", + "minimum": 0 + }, + "end_index": { + "type": "integer", + "minimum": 0 + } + }, + "required": [ + "index", + "type" + ] + }, + "runStepObject": { + "type": "object", + "title": "Run steps", + "description": "Represents a step in execution of a run.\n", + "properties": { + "id": { + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `assistant.run.step``.", + "type": "string", + "enum": [ + "assistant.run.step" + ], + "x-ms-enum": { + "name": "RunStepObjectType", + "modelAsString": true, + "values": [ + { + "value": "assistant.run.step", + "description": "The object type, which is always `assistant.run.step`" + } + ] + } + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the run step was created.", + "type": "integer" + }, + "assistant_id": { + "description": "The ID of the [assistant](/docs/api-reference/assistants) associated with the run step.", + "type": "string" + }, + "thread_id": { + "description": "The ID of the [thread](/docs/api-reference/threads) that was run.", + "type": "string" + }, + "run_id": { + "description": "The ID of the [run](/docs/api-reference/runs) 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`.", + "type": "string", + "enum": [ + "message_creation", + "tool_calls" + ], + "x-ms-enum": { + "name": "RunStepObjectType", + "modelAsString": true, + "values": [ + { + "value": "message_creation", + "description": "The message_creation run step" + }, + { + "value": "tool_calls", + "description": "The tool_calls run step" + } + ] + } + }, + "status": { + "description": "The status of the run, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.", + "type": "string", + "enum": [ + "in_progress", + "cancelled", + "failed", + "completed", + "expired" + ], + "x-ms-enum": { + "name": "RunStepObjectStatus", + "modelAsString": true, + "values": [ + { + "value": "in_progress", + "description": "The in_progress run status" + }, + { + "value": "cancelled", + "description": "The cancelled run status" + }, + { + "value": "failed", + "description": "The cancelled run status" + }, + { + "value": "completed", + "description": "The cancelled run status" + }, + { + "value": "expired", + "description": "The cancelled run status" + } + ] + } + }, + "step_details": { + "type": "object", + "description": "The details of the run step.", + "oneOf": [ + { + "$ref": "#/components/schemas/runStepDetailsMessageCreationObject" + }, + { + "$ref": "#/components/schemas/runStepDetailsToolCallsObject" + } + ] + }, + "last_error": { + "type": "object", + "description": "The last error associated with this run step. Will be `null` if there are no errors.", + "nullable": true, + "properties": { + "code": { + "type": "string", + "description": "One of `server_error` or `rate_limit_exceeded`.", + "enum": [ + "server_error", + "rate_limit_exceeded" + ], + "x-ms-enum": { + "name": "LastErrorCode", + "modelAsString": true, + "values": [ + { + "value": "server_error", + "description": "The server_error" + }, + { + "value": "rate_limit_exceeded", + "description": "The rate_limit_exceeded status" + } + ] + } + }, + "message": { + "type": "string", + "description": "A human-readable description of the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "expired_at": { + "description": "The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired.", + "type": "integer", + "nullable": true + }, + "cancelled_at": { + "description": "The Unix timestamp (in seconds) for when the run step was cancelled.", + "type": "integer", + "nullable": true + }, + "failed_at": { + "description": "The Unix timestamp (in seconds) for when the run step failed.", + "type": "integer", + "nullable": true + }, + "completed_at": { + "description": "The Unix timestamp (in seconds) for when the run step completed.", + "type": "integer", + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + }, + "required": [ + "id", + "object", + "created_at", + "assistant_id", + "thread_id", + "run_id", + "type", + "status", + "step_details", + "last_error", + "expired_at", + "cancelled_at", + "failed_at", + "completed_at", + "metadata" + ] + }, + "runStepDeltaObject": { + "type": "object", + "title": "Run step delta object", + "description": "Represents a run step delta i.e. any changed fields on a run step during streaming.\n", + "properties": { + "id": { + "description": "The identifier of the run step, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `thread.run.step.delta`.", + "type": "string", + "enum": [ + "thread.run.step.delta" + ], + "x-ms-enum": { + "name": "RunStepDeltaObjectType", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.delta" + } + ] + } + }, + "delta": { + "description": "The delta containing the fields that have changed on the run step.", + "type": "object", + "properties": { + "step_details": { + "type": "object", + "description": "The details of the run step.", + "oneOf": [ + { + "$ref": "#/components/schemas/runStepDeltaStepDetailsMessageCreationObject" + }, + { + "$ref": "#/components/schemas/runStepDeltaStepDetailsToolCallsObject" + } + ] + } + } + } + }, + "required": [ + "id", + "object", + "delta" + ] + }, + "listRunStepsResponse": { + "properties": { + "object": { + "type": "string", + "example": "list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/runStepObject" + } + }, + "first_id": { + "type": "string" + }, + "last_id": { + "type": "string" + }, + "has_more": { + "type": "boolean", + "example": false + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "runStepDetailsMessageCreationObject": { + "title": "Message creation", + "type": "object", + "description": "Details of the message creation by the run step.", + "properties": { + "type": { + "description": "Always `message_creation``.", + "type": "string", + "enum": [ + "message_creation" + ], + "x-ms-enum": { + "name": "RunStepDetailsMessageCreationObjectType", + "modelAsString": true, + "values": [ + { + "value": "message_creation" + } + ] + } + }, + "message_creation": { + "type": "object", + "properties": { + "message_id": { + "type": "string", + "description": "The ID of the message that was created by this run step." + } + }, + "required": [ + "message_id" + ] + } + }, + "required": [ + "type", + "message_creation" + ] + }, + "runStepDeltaStepDetailsMessageCreationObject": { + "title": "Message creation", + "type": "object", + "description": "Details of the message creation by the run step.", + "properties": { + "type": { + "description": "Always `message_creation`.", + "type": "string", + "enum": [ + "message_creation" + ], + "x-ms-enum": { + "name": "RunStepDeltaStepDetailsMessageCreationObjectType", + "modelAsString": true, + "values": [ + { + "value": "message_creation" + } + ] + } + }, + "message_creation": { + "type": "object", + "properties": { + "message_id": { + "type": "string", + "description": "The ID of the message that was created by this run step." + } + } + } + }, + "required": [ + "type" + ] + }, + "runStepDetailsToolCallsObject": { + "title": "Tool calls", + "type": "object", + "description": "Details of the tool call.", + "properties": { + "type": { + "description": "Always `tool_calls`.", + "type": "string", + "enum": [ + "tool_calls" + ], + "x-ms-enum": { + "name": "RunStepDetailsToolCallsObjectType", + "modelAsString": true, + "values": [ + { + "value": "tool_calls" + } + ] + } + }, + "tool_calls": { + "type": "array", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `retrieval` or `function`.\n", + "items": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/runStepDetailsToolCallsCodeObject" + }, + { + "$ref": "#/components/schemas/runStepDetailsToolCallsFileSearchObject" + }, + { + "$ref": "#/components/schemas/runStepDetailsToolCallsFunctionObject" + } + ] + } + } + }, + "required": [ + "type", + "tool_calls" + ] + }, + "runStepDeltaStepDetailsToolCallsObject": { + "title": "Tool calls", + "type": "object", + "description": "Details of the tool call.", + "properties": { + "type": { + "description": "Always `tool_calls`.", + "type": "string", + "enum": [ + "tool_calls" + ], + "x-ms-enum": { + "name": "RunStepDeltaStepDetailsToolCallsObjectType", + "modelAsString": true, + "values": [ + { + "value": "tool_calls" + } + ] + } + }, + "tool_calls": { + "type": "array", + "description": "An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search` or `function`.\n", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/runStepDeltaStepDetailsToolCallsCodeObject" + }, + { + "$ref": "#/components/schemas/runStepDeltaStepDetailsToolCallsFileSearchObject" + }, + { + "$ref": "#/components/schemas/runStepDeltaStepDetailsToolCallsFunctionObject" + } + ] + } + } + }, + "required": [ + "type" + ] + }, + "runStepDetailsToolCallsCodeObject": { + "title": "Code interpreter tool call", + "type": "object", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "type": "string", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "enum": [ + "code_interpreter" + ], + "x-ms-enum": { + "name": "RunStepDetailsToolCallsCodeObjectType", + "modelAsString": true, + "values": [ + { + "value": "code_interpreter" + } + ] + } + }, + "code_interpreter": { + "type": "object", + "description": "The Code Interpreter tool call definition.", + "required": [ + "input", + "outputs" + ], + "properties": { + "input": { + "type": "string", + "description": "The input to the Code Interpreter tool call." + }, + "outputs": { + "type": "array", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "items": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/runStepDetailsToolCallsCodeOutputLogsObject" + }, + { + "$ref": "#/components/schemas/runStepDetailsToolCallsCodeOutputImageObject" + } + ] + } + } + } + } + }, + "required": [ + "id", + "type", + "code_interpreter" + ] + }, + "runStepDeltaStepDetailsToolCallsCodeObject": { + "title": "Code interpreter tool call", + "type": "object", + "description": "Details of the Code Interpreter tool call the run step was involved in.", + "properties": { + "index": { + "type": "integer", + "description": "The index of the tool call in the tool calls array." + }, + "id": { + "type": "string", + "description": "The ID of the tool call." + }, + "type": { + "type": "string", + "description": "The type of tool call. This is always going to be `code_interpreter` for this type of tool call.", + "enum": [ + "code_interpreter" + ], + "x-ms-enum": { + "name": "RunStepDeltaStepDetailsToolCallsCodeObjectType", + "modelAsString": true, + "values": [ + { + "value": "code_interpreter" + } + ] + } + }, + "code_interpreter": { + "type": "object", + "description": "The Code Interpreter tool call definition.", + "properties": { + "input": { + "type": "string", + "description": "The input to the Code Interpreter tool call." + }, + "outputs": { + "type": "array", + "description": "The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type.", + "items": { + "type": "object", + "oneOf": [ + { + "$ref": "#/components/schemas/runStepDeltaStepDetailsToolCallsCodeOutputLogsObject" + }, + { + "$ref": "#/components/schemas/runStepDeltaStepDetailsToolCallsCodeOutputImageObject" + } + ] + } + } + } + } + }, + "required": [ + "index", + "type" + ] + }, + "runStepDetailsToolCallsCodeOutputLogsObject": { + "title": "Code interpreter log output", + "type": "object", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "properties": { + "type": { + "description": "Always `logs`.", + "type": "string", + "enum": [ + "logs" + ], + "x-ms-enum": { + "name": "RunStepDetailsToolCallsCodeOutputLogsObjectType", + "modelAsString": true, + "values": [ + { + "value": "logs" + } + ] + } + }, + "logs": { + "type": "string", + "description": "The text output from the Code Interpreter tool call." + } + }, + "required": [ + "type", + "logs" + ] + }, + "runStepDeltaStepDetailsToolCallsCodeOutputLogsObject": { + "title": "Code interpreter log output", + "type": "object", + "description": "Text output from the Code Interpreter tool call as part of a run step.", + "properties": { + "index": { + "type": "integer", + "description": "The index of the output in the outputs array." + }, + "type": { + "description": "Always `logs`.", + "type": "string", + "enum": [ + "logs" + ], + "x-ms-enum": { + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType", + "modelAsString": true, + "values": [ + { + "value": "logs" + } + ] + } + }, + "logs": { + "type": "string", + "description": "The text output from the Code Interpreter tool call." + } + }, + "required": [ + "index", + "type" + ] + }, + "runStepDetailsToolCallsCodeOutputImageObject": { + "title": "Code interpreter image output", + "type": "object", + "properties": { + "type": { + "description": "Always `image`.", + "type": "string", + "enum": [ + "image" + ], + "x-ms-enum": { + "name": "RunStepDetailsToolCallsCodeOutputImageObjectType", + "modelAsString": true, + "values": [ + { + "value": "image" + } + ] + } + }, + "image": { + "type": "object", + "properties": { + "file_id": { + "description": "The File ID of the image.", + "type": "string" + } + }, + "required": [ + "file_id" + ] + } + }, + "required": [ + "type", + "image" + ] + }, + "runStepDeltaStepDetailsToolCallsCodeOutputImageObject": { + "title": "Code interpreter image output", + "type": "object", + "properties": { + "index": { + "type": "integer", + "description": "The index of the output in the outputs array." + }, + "type": { + "description": "Always `image`.", + "type": "string", + "enum": [ + "image" + ], + "x-ms-enum": { + "name": "RunStepDeltaStepDetailsToolCallsCodeOutputImageObject", + "modelAsString": true, + "values": [ + { + "value": "image" + } + ] + } + }, + "image": { + "type": "object", + "properties": { + "file_id": { + "description": "The file ID of the image.", + "type": "string" + } + } + } + }, + "required": [ + "index", + "type" + ] + }, + "runStepDetailsToolCallsFileSearchObject": { + "title": "File search tool call", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call object." + }, + "type": { + "type": "string", + "description": "The type of tool call. This is always going to be `file_search` for this type of tool call.", + "enum": [ + "file_search" + ], + "x-ms-enum": { + "name": "RunStepDetailsToolCallsFileSearchObjectType", + "modelAsString": true, + "values": [ + { + "value": "file_search" + } + ] + } + }, + "file_search": { + "type": "object", + "description": "For now, this is always going to be an empty object.", + "properties": { + "results": { + "type": "array", + "description": "The results of the file search.", + "items": { + "$ref": "#/components/schemas/runStepDetailsToolCallsFileSearchResultObject" + } + } + } + } + }, + "required": [ + "id", + "type", + "file_search" + ] + }, + "runStepDetailsToolCallsFileSearchResultObject": { + "title": "File search tool call result", + "type": "object", + "description": "A result instance of the file search.", + "x-oaiTypeLabel": "map", + "properties": { + "file_id": { + "type": "string", + "description": "The ID of the file that result was found in." + }, + "file_name": { + "type": "string", + "description": "The name of the file that result was found in." + }, + "score": { + "type": "number", + "description": "The score of the result. All values must be a floating point number between 0 and 1.", + "minimum": 0, + "maximum": 1 + }, + "content": { + "type": "array", + "description": "The content of the result that was found. The content is only included if requested via the include query parameter.", + "items": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of the content.", + "enum": [ + "text" + ] + }, + "text": { + "type": "string", + "description": "The text content of the file." + } + } + } + } + }, + "required": [ + "file_id", + "file_name", + "score" + ] + }, + "runStepDeltaStepDetailsToolCallsFileSearchObject": { + "title": "File search tool call", + "type": "object", + "properties": { + "index": { + "type": "integer", + "description": "The index of the tool call in the tool calls array." + }, + "id": { + "type": "string", + "description": "The ID of the tool call object." + }, + "type": { + "type": "string", + "description": "The type of tool call. This is always going to be `retrieval` for this type of tool call.", + "enum": [ + "file_search" + ], + "x-ms-enum": { + "name": "RunStepDeltaStepDetailsToolCallsFileSearchObjectType", + "modelAsString": true, + "values": [ + { + "value": "file_search" + } + ] + } + }, + "file_search": { + "type": "object", + "description": "For now, this is always going to be an empty object." + } + }, + "required": [ + "index", + "type", + "file_search" + ] + }, + "runStepDetailsToolCallsFunctionObject": { + "type": "object", + "title": "Function tool call", + "properties": { + "id": { + "type": "string", + "description": "The ID of the tool call object." + }, + "type": { + "type": "string", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "enum": [ + "function" + ], + "x-ms-enum": { + "name": "RunStepDetailsToolCallsFunctionObjectType", + "modelAsString": true, + "values": [ + { + "value": "function" + } + ] + } + }, + "function": { + "type": "object", + "description": "The definition of the function that was called.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function." + }, + "arguments": { + "type": "string", + "description": "The arguments passed to the function." + }, + "output": { + "type": "string", + "description": "The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet.", + "nullable": true + } + }, + "required": [ + "name", + "arguments", + "output" + ] + } + }, + "required": [ + "id", + "type", + "function" + ] + }, + "runStepDeltaStepDetailsToolCallsFunctionObject": { + "type": "object", + "title": "Function tool call", + "properties": { + "index": { + "type": "integer", + "description": "The index of the tool call in the tool calls array." + }, + "id": { + "type": "string", + "description": "The ID of the tool call object." + }, + "type": { + "type": "string", + "description": "The type of tool call. This is always going to be `function` for this type of tool call.", + "enum": [ + "function" + ], + "x-ms-enum": { + "name": "RunStepDetailsToolCallsFunctionObjectType", + "modelAsString": true, + "values": [ + { + "value": "function" + } + ] + } + }, + "function": { + "type": "object", + "description": "The definition of the function that was called.", + "properties": { + "name": { + "type": "string", + "description": "The name of the function." + }, + "arguments": { + "type": "string", + "description": "The arguments passed to the function." + }, + "output": { + "type": "string", + "description": "The output of the function. This will be `null` if the outputs have not been submitted yet.", + "nullable": true + } + } + } + }, + "required": [ + "index", + "type" + ] + }, + "vectorStoreExpirationAfter": { + "type": "object", + "title": "Vector store expiration policy", + "description": "The expiration policy for a vector store.", + "properties": { + "anchor": { + "description": "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`.", + "type": "string", + "enum": [ + "last_active_at" + ], + "x-ms-enum": { + "name": "VectorStoreExpirationAfterAnchor", + "modelAsString": true, + "values": [ + { + "value": "last_active_at", + "description": "The anchor timestamp after which the expiration policy applies." + } + ] + } + }, + "days": { + "description": "The number of days after the anchor time that the vector store will expire.", + "type": "integer", + "minimum": 1, + "maximum": 365 + } + }, + "required": [ + "anchor", + "days" + ] + }, + "vectorStoreObject": { + "type": "object", + "title": "Vector store", + "description": "A vector store is a collection of processed files can be used by the `file_search` tool.", + "properties": { + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `vector_store`.", + "type": "string", + "enum": [ + "vector_store" + ] + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the vector store was created.", + "type": "integer" + }, + "name": { + "description": "The name of the vector store.", + "type": "string" + }, + "usage_bytes": { + "description": "The total number of bytes used by the files in the vector store.", + "type": "integer" + }, + "file_counts": { + "type": "object", + "properties": { + "in_progress": { + "description": "The number of files that are currently being processed.", + "type": "integer" + }, + "completed": { + "description": "The number of files that have been successfully processed.", + "type": "integer" + }, + "failed": { + "description": "The number of files that have failed to process.", + "type": "integer" + }, + "cancelled": { + "description": "The number of files that were cancelled.", + "type": "integer" + }, + "total": { + "description": "The total number of files.", + "type": "integer" + } + }, + "required": [ + "in_progress", + "completed", + "failed", + "cancelled", + "total" + ] + }, + "status": { + "description": "The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.", + "type": "string", + "enum": [ + "expired", + "in_progress", + "completed" + ], + "x-ms-enum": { + "name": "VectorStoreObjectStatus", + "modelAsString": true, + "values": [ + { + "value": "expired" + }, + { + "value": "in_progress" + }, + { + "value": "completed" + } + ] + } + }, + "expires_after": { + "$ref": "#/components/schemas/vectorStoreExpirationAfter" + }, + "expires_at": { + "description": "The Unix timestamp (in seconds) for when the vector store will expire.", + "type": "integer", + "nullable": true + }, + "last_active_at": { + "description": "The Unix timestamp (in seconds) for when the vector store was last active.", + "type": "integer", + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + }, + "required": [ + "id", + "object", + "usage_bytes", + "created_at", + "status", + "last_active_at", + "name", + "bytes", + "file_counts", + "metadata" + ] + }, + "createVectorStoreRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "file_ids": { + "description": "A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": "array", + "maxItems": 500, + "items": { + "type": "string" + } + }, + "name": { + "description": "The name of the vector store.", + "type": "string" + }, + "expires_after": { + "$ref": "#/components/schemas/vectorStoreExpirationAfter" + }, + "chunking_strategy": { + "type": "object", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "oneOf": [ + { + "$ref": "#/components/schemas/autoChunkingStrategyRequestParam" + }, + { + "$ref": "#/components/schemas/staticChunkingStrategyRequestParam" + } + ] + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + } + }, + "updateVectorStoreRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "description": "The name of the vector store.", + "type": "string", + "nullable": true + }, + "expires_after": { + "$ref": "#/components/schemas/vectorStoreExpirationAfter", + "nullable": true + }, + "metadata": { + "description": "Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long.\n", + "type": "object", + "nullable": true + } + } + }, + "listVectorStoresResponse": { + "properties": { + "object": { + "type": "string", + "example": "list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/vectorStoreObject" + } + }, + "first_id": { + "type": "string", + "example": "vs_abc123" + }, + "last_id": { + "type": "string", + "example": "vs_abc456" + }, + "has_more": { + "type": "boolean", + "example": false + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "deleteVectorStoreResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "object": { + "type": "string", + "enum": [ + "vector_store.deleted" + ], + "x-ms-enum": { + "name": "DeleteVectorStoreResponseObject", + "modelAsString": true, + "values": [ + { + "value": "vector_store.deleted", + "description": "The delete vector store response object state" + } + ] + } + } + }, + "required": [ + "id", + "object", + "deleted" + ] + }, + "vectorStoreFileObject": { + "type": "object", + "title": "Vector store files", + "description": "A list of files attached to a vector store.", + "properties": { + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `vector_store.file`.", + "type": "string", + "enum": [ + "vector_store.file" + ], + "x-ms-enum": { + "name": "VectorStoreFileObjectType", + "modelAsString": true, + "values": [ + { + "value": "vector_store.file" + } + ] + } + }, + "usage_bytes": { + "description": "The total vector store usage in bytes. Note that this may be different from the original file size.", + "type": "integer" + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the vector store file was created.", + "type": "integer" + }, + "vector_store_id": { + "description": "The ID of the vector store that the file 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.", + "type": "string", + "enum": [ + "in_progress", + "completed", + "cancelled", + "failed" + ], + "x-ms-enum": { + "name": "VectorStoreFileObjectStatus", + "modelAsString": true, + "values": [ + { + "value": "in_progress" + }, + { + "value": "completed" + }, + { + "value": "cancelled" + }, + { + "value": "failed" + } + ] + } + }, + "last_error": { + "type": "object", + "description": "The last error associated with this vector store file. Will be `null` if there are no errors.", + "nullable": true, + "properties": { + "code": { + "type": "string", + "description": "One of `server_error` or `invalid_file` or `unsupported_file`.", + "enum": [ + "server_error", + "unsupported_file", + "invalid_file" + ], + "x-ms-enum": { + "name": "VectorStoreFileObjectLastErrorCode", + "modelAsString": true, + "values": [ + { + "value": "server_error" + }, + { + "value": "unsupported_file" + }, + { + "value": "invalid_file" + } + ] + } + }, + "message": { + "type": "string", + "description": "A human-readable description of the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "chunking_strategy": { + "type": "object", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. Only applicable if `file_ids` is non-empty.", + "oneOf": [ + { + "$ref": "#/components/schemas/autoChunkingStrategyRequestParam" + }, + { + "$ref": "#/components/schemas/staticChunkingStrategyRequestParam" + } + ] + } + }, + "required": [ + "id", + "object", + "usage_bytes", + "created_at", + "vector_store_id", + "status", + "last_error" + ] + }, + "otherChunkingStrategyResponseParam": { + "type": "object", + "title": "Other Chunking Strategy", + "description": "This is returned when the chunking strategy is unknown. Typically, this is because the file was indexed before the `chunking_strategy` concept was introduced in the API.", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `other`.", + "enum": [ + "other" + ], + "x-ms-enum": { + "name": "OtherChunkingStrategyResponseParamType", + "modelAsString": true, + "values": [ + { + "value": "other" + } + ] + } + } + }, + "required": [ + "type" + ] + }, + "staticChunkingStrategyResponseParam": { + "type": "object", + "title": "Static Chunking Strategy", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `static`.", + "enum": [ + "static" + ], + "x-ms-enum": { + "name": "StaticChunkingStrategyResponseParamType", + "modelAsString": true, + "values": [ + { + "value": "static" + } + ] + } + }, + "static": { + "$ref": "#/components/schemas/staticChunkingStrategy" + } + }, + "required": [ + "type", + "static" + ] + }, + "staticChunkingStrategy": { + "type": "object", + "additionalProperties": false, + "properties": { + "max_chunk_size_tokens": { + "type": "integer", + "minimum": 100, + "maximum": 4096, + "description": "The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`." + }, + "chunk_overlap_tokens": { + "type": "integer", + "description": "The number of tokens that overlap between chunks. The default value is `400`.\n\nNote that the overlap must not exceed half of `max_chunk_size_tokens`.\n" + } + }, + "required": [ + "max_chunk_size_tokens", + "chunk_overlap_tokens" + ] + }, + "autoChunkingStrategyRequestParam": { + "type": "object", + "title": "Auto Chunking Strategy", + "description": "The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`.", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `auto`.", + "enum": [ + "auto" + ] + } + }, + "required": [ + "type" + ] + }, + "staticChunkingStrategyRequestParam": { + "type": "object", + "title": "Static Chunking Strategy", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "description": "Always `static`.", + "enum": [ + "static" + ] + }, + "static": { + "$ref": "#/components/schemas/staticChunkingStrategy" + } + }, + "required": [ + "type", + "static" + ] + }, + "chunkingStrategyRequestParam": { + "type": "object", + "description": "The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy.", + "oneOf": [ + { + "$ref": "#/components/schemas/autoChunkingStrategyRequestParam" + }, + { + "$ref": "#/components/schemas/staticChunkingStrategyRequestParam" + } + ] + }, + "createVectorStoreFileRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "file_id": { + "description": "A File ID that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": "string" + }, + "chunking_strategy": { + "$ref": "#/components/schemas/chunkingStrategyRequestParam" + } + }, + "required": [ + "file_id" + ] + }, + "listVectorStoreFilesResponse": { + "properties": { + "object": { + "type": "string", + "example": "list" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/vectorStoreFileObject" + } + }, + "first_id": { + "type": "string", + "example": "file-abc123" + }, + "last_id": { + "type": "string", + "example": "file-abc456" + }, + "has_more": { + "type": "boolean", + "example": false + } + }, + "required": [ + "object", + "data", + "first_id", + "last_id", + "has_more" + ] + }, + "deleteVectorStoreFileResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "deleted": { + "type": "boolean" + }, + "object": { + "type": "string", + "enum": [ + "vector_store.file.deleted" + ], + "x-ms-enum": { + "name": "DeleteVectorStoreFileResponseObject", + "modelAsString": true, + "values": [ + { + "value": "vector_store.file.deleted" + } + ] + } + } + }, + "required": [ + "id", + "object", + "deleted" + ] + }, + "vectorStoreFileBatchObject": { + "type": "object", + "title": "Vector store file batch", + "description": "A batch of files attached to a vector store.", + "properties": { + "id": { + "description": "The identifier, which can be referenced in API endpoints.", + "type": "string" + }, + "object": { + "description": "The object type, which is always `vector_store.file_batch`.", + "type": "string", + "enum": [ + "vector_store.files_batch" + ], + "x-ms-enum": { + "name": "VectorStoreFileBatchObjectType", + "modelAsString": true, + "values": [ + { + "value": "vector_store.files_batch" + } + ] + } + }, + "created_at": { + "description": "The Unix timestamp (in seconds) for when the vector store files batch was created.", + "type": "integer" + }, + "vector_store_id": { + "description": "The ID of the vector store that the File 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`.", + "type": "string", + "enum": [ + "in_progress", + "completed", + "cancelled", + "failed" + ], + "x-ms-enum": { + "name": "VectorStoreFileBatchObjectStatus", + "modelAsString": true, + "values": [ + { + "value": "in_progress" + }, + { + "value": "completed" + }, + { + "value": "cancelled" + }, + { + "value": "failed" + } + ] + } + }, + "file_counts": { + "type": "object", + "properties": { + "in_progress": { + "description": "The number of files that are currently being processed.", + "type": "integer" + }, + "completed": { + "description": "The number of files that have been processed.", + "type": "integer" + }, + "failed": { + "description": "The number of files that have failed to process.", + "type": "integer" + }, + "cancelled": { + "description": "The number of files that where cancelled.", + "type": "integer" + }, + "total": { + "description": "The total number of files.", + "type": "integer" + } + }, + "required": [ + "in_progress", + "completed", + "cancelled", + "failed", + "total" + ] + } + }, + "required": [ + "id", + "object", + "created_at", + "vector_store_id", + "status", + "file_counts" + ] + }, + "createVectorStoreFileBatchRequest": { + "type": "object", + "additionalProperties": false, + "properties": { + "file_ids": { + "description": "A list of File IDs that the vector store should use. Useful for tools like `file_search` that can access files.", + "type": "array", + "minItems": 1, + "maxItems": 500, + "items": { + "type": "string" + } + }, + "chunking_strategy": { + "$ref": "#/components/schemas/chunkingStrategyRequestParam" + } + }, + "required": [ + "file_ids" + ] + }, + "assistantStreamEvent": { + "description": "Represents an event emitted when streaming a Run.\n\nEach event in a server-sent events stream has an `event` and `data` property:\n\n```\nevent: thread.created\ndata: {\"id\": \"thread_123\", \"object\": \"thread\", ...}\n```\n\nWe emit events whenever a new object is created, transitions to a new state, or is being\nstreamed in parts (deltas). For example, we emit `thread.run.created` when a new run\nis created, `thread.run.completed` when a run completes, and so on. When an Assistant chooses\nto create a message during a run, we emit a `thread.message.created event`, a\n`thread.message.in_progress` event, many `thread.message.delta` events, and finally a\n`thread.message.completed` event.\n\nWe may add additional events over time, so we recommend handling unknown events gracefully\nin your code.", + "oneOf": [ + { + "$ref": "#/components/schemas/threadStreamEvent" + }, + { + "$ref": "#/components/schemas/runStreamEvent" + }, + { + "$ref": "#/components/schemas/runStepStreamEvent" + }, + { + "$ref": "#/components/schemas/messageStreamEvent" + }, + { + "$ref": "#/components/schemas/errorEvent" + }, + { + "$ref": "#/components/schemas/doneEvent" + } + ] + }, + "threadStreamEvent": { + "oneOf": [ + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.created" + ], + "x-ms-enum": { + "name": "ThreadStreamEventEnum", + "modelAsString": true, + "values": [ + { + "value": "thread.created", + "description": "The thread created event" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/threadObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a new thread is created." + } + ] + }, + "runStreamEvent": { + "oneOf": [ + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.created" + ], + "x-ms-enum": { + "name": "RunStreamEventCreated", + "modelAsString": true, + "values": [ + { + "value": "thread.run.created" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a new run is created." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.queued" + ], + "x-ms-enum": { + "name": "RunStreamEventQueued", + "modelAsString": true, + "values": [ + { + "value": "thread.run.queued" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run moves to a `queued` status." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.in_progress" + ], + "x-ms-enum": { + "name": "RunStreamEventInProgress", + "modelAsString": true, + "values": [ + { + "value": "thread.run.in_progress" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run moves to an `in_progress` status." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.requires_action" + ], + "x-ms-enum": { + "name": "RunStreamEventRequiresAction", + "modelAsString": true, + "values": [ + { + "value": "thread.run.requires_action" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run moves to a `requires_action` status." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.completed" + ], + "x-ms-enum": { + "name": "RunStreamEventCompleted", + "modelAsString": true, + "values": [ + { + "value": "thread.run.completed" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run is completed." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.failed" + ], + "x-ms-enum": { + "name": "RunStreamEventFailed", + "modelAsString": true, + "values": [ + { + "value": "thread.run.failed" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run fails." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.cancelling" + ], + "x-ms-enum": { + "name": "RunStreamEventCancelling", + "modelAsString": true, + "values": [ + { + "value": "thread.run.cancelling" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run moves to a `cancelling` status." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.cancelled" + ], + "x-ms-enum": { + "name": "RunStreamEventCancelled", + "modelAsString": true, + "values": [ + { + "value": "thread.run.cancelled" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run is cancelled." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.expired" + ], + "x-ms-enum": { + "name": "RunStreamEventExpired", + "modelAsString": true, + "values": [ + { + "value": "thread.run.expired" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run expires." + } + ] + }, + "runStepStreamEvent": { + "oneOf": [ + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.step.created" + ], + "x-ms-enum": { + "name": "RunStepStreamEventCreated", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.created" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runStepObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run step is created." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.step.in_progress" + ], + "x-ms-enum": { + "name": "RunStepStreamEventInProgress", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.in_progress" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runStepObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run step moves to an `in_progress` state." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.step.delta" + ], + "x-ms-enum": { + "name": "RunStepStreamEventDelta", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.delta" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runStepDeltaObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when parts of a run step are being streamed." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.step.completed" + ], + "x-ms-enum": { + "name": "RunStepStreamEventCompleted", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.completed" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runStepObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run step is completed." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.step.failed" + ], + "x-ms-enum": { + "name": "RunStepStreamEventFailed", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.failed" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runStepObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run step fails." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.step.cancelled" + ], + "x-ms-enum": { + "name": "RunStepStreamEventCancelled", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.cancelled" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runStepObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run step is cancelled." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.run.step.expired" + ], + "x-ms-enum": { + "name": "RunStepStreamEventExpired", + "modelAsString": true, + "values": [ + { + "value": "thread.run.step.expired" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/runStepObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a run step expires." + } + ] + }, + "messageStreamEvent": { + "oneOf": [ + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.message.created" + ], + "x-ms-enum": { + "name": "MessageStreamEventCreated", + "modelAsString": true, + "values": [ + { + "value": "thread.message.created" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/messageObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a message is created." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.message.in_progress" + ], + "x-ms-enum": { + "name": "MessageStreamEventInProgress", + "modelAsString": true, + "values": [ + { + "value": "thread.message.in_progress" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/messageObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a message moves to an `in_progress` state." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.message.delta" + ], + "x-ms-enum": { + "name": "MessageStreamEventDelta", + "modelAsString": true, + "values": [ + { + "value": "thread.message.delta" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/messageDeltaObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when parts of a message are being streamed." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.message.completed" + ], + "x-ms-enum": { + "name": "MessageStreamEventCompleted", + "modelAsString": true, + "values": [ + { + "value": "thread.message.completed" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/messageObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a message is completed." + }, + { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "thread.message.incomplete" + ], + "x-ms-enum": { + "name": "MessageStreamEventIncomplete", + "modelAsString": true, + "values": [ + { + "value": "thread.message.incomplete" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/messageObject" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a message ends before it is completed." + } + ] + }, + "errorEvent": { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "error" + ], + "x-ms-enum": { + "name": "ErrorEventEnum", + "modelAsString": true, + "values": [ + { + "value": "error" + } + ] + } + }, + "data": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when an error occurs. This can happen due to an internal server error or a timeout." + }, + "doneEvent": { + "type": "object", + "properties": { + "event": { + "type": "string", + "enum": [ + "done" + ], + "x-ms-enum": { + "name": "DoneEventEnum", + "modelAsString": true, + "values": [ + { + "value": "done" + } + ] + } + }, + "data": { + "type": "string", + "enum": [ + "[DONE]" + ], + "x-ms-enum": { + "name": "DoneEventDataEnum", + "modelAsString": true, + "values": [ + { + "value": "[DONE]" + } + ] + } + } + }, + "required": [ + "event", + "data" + ], + "description": "Occurs when a stream ends." + } + }, + "securitySchemes": { + "bearer": { + "type": "oauth2", + "flows": { + "implicit": { + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize", + "scopes": {} + } + }, + "x-tokenInfoFunc": "api.middleware.auth.bearer_auth", + "x-scopeValidateFunc": "api.middleware.auth.validate_scopes" + }, + "apiKey": { + "type": "apiKey", + "name": "api-key", + "in": "header" + } + } + } +} diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/inference.yaml b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/inference.yaml new file mode 100644 index 000000000000..e401567f87ea --- /dev/null +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/inference.yaml @@ -0,0 +1,8586 @@ +openapi: 3.0.0 +info: + title: Azure OpenAI Service API + description: Azure OpenAI APIs for completions and search + version: 2024-12-01-preview +servers: + - url: https://{endpoint}/openai + variables: + endpoint: + default: your-resource-name.openai.azure.com +security: + - bearer: + - api.read + - apiKey: [] +paths: + /deployments/{deployment-id}/completions: + post: + summary: Creates a completion for the provided prompt, parameters and chosen model. + operationId: Completions_Create + parameters: + - in: path + name: deployment-id + required: true + schema: + type: string + example: davinci + description: Deployment id of the model which was deployed. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createCompletionRequest" + example: + prompt: |- + Negate the following sentence.The price for bubblegum increased on thursday. + + Negated Sentence: + max_tokens: 50 + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/createCompletionResponse" + example: + model: davinci + object: text_completion + id: cmpl-4509KAos68kxOqpE2uYGw81j6m7uo + created: 1637097562 + choices: + - index: 0 + text: The price for bubblegum decreased on thursday. + logprobs: null + finish_reason: stop + headers: + apim-request-id: + description: Request ID for troubleshooting purposes + schema: + type: string + default: + description: Service unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/errorResponse" + headers: + apim-request-id: + description: Request ID for troubleshooting purposes + schema: + type: string + /deployments/{deployment-id}/embeddings: + post: + summary: Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + operationId: embeddings_create + parameters: + - in: path + name: deployment-id + required: true + schema: + type: string + example: ada-search-index-v1 + description: The deployment id of the model which was deployed. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + type: object + additionalProperties: true + 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 `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. + oneOf: + - type: string + default: "" + example: This is a test. + nullable: true + - type: array + minItems: 1 + maxItems: 2048 + items: + type: string + minLength: 1 + example: This is a test. + nullable: false + user: + description: A unique identifier representing your end-user, which can help monitoring and detecting abuse. + type: string + nullable: false + input_type: + description: input type of embedding search to use + type: string + example: query + encoding_format: + description: The format to return the embeddings in. Can be either `float` or `base64`. Defaults to `float`. + type: string + example: base64 + nullable: true + dimensions: + description: The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. + type: integer + example: 1 + nullable: true + required: + - input + responses: + "200": + description: OK + content: + application/json: + schema: + type: object + properties: + object: + type: string + model: + type: string + data: + type: array + items: + type: object + properties: + index: + type: integer + object: + type: string + embedding: + type: array + items: + type: number + required: + - index + - object + - embedding + usage: + type: object + properties: + prompt_tokens: + type: integer + total_tokens: + type: integer + required: + - prompt_tokens + - total_tokens + required: + - object + - model + - data + - usage + x-ms-examples: + Create a embeddings.: + $ref: ./examples/embeddings.yaml + /deployments/{deployment-id}/chat/completions: + post: + summary: Creates a completion for the chat message + operationId: ChatCompletions_Create + parameters: + - in: path + name: deployment-id + required: true + schema: + type: string + description: Deployment id of the model which was deployed. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createChatCompletionRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/createChatCompletionResponse" + - $ref: "#/components/schemas/createChatCompletionStreamResponse" + headers: + apim-request-id: + description: Request ID for troubleshooting purposes + schema: + type: string + default: + description: Service unavailable + content: + application/json: + schema: + $ref: "#/components/schemas/errorResponse" + headers: + apim-request-id: + description: Request ID for troubleshooting purposes + schema: + type: string + x-ms-examples: + Create a chat completion.: + $ref: ./examples/chat_completions.yaml + Creates a completion based on Azure Search data and system-assigned managed identity.: + $ref: ./examples/chat_completions_azure_search_minimum.yaml + Creates a completion based on Azure Search image vector data.: + $ref: ./examples/chat_completions_azure_search_image_vector.yaml + Creates a completion based on Azure Search vector data, previous assistant message and user-assigned managed identity.: + $ref: ./examples/chat_completions_azure_search_advanced.yaml + Creates a completion for the provided Azure Cosmos DB.: + $ref: ./examples/chat_completions_cosmos_db.yaml + Creates a completion for the provided Mongo DB.: + $ref: ./examples/chat_completions_mongo_db.yaml + Creates a completion for the provided Elasticsearch.: + $ref: ./examples/chat_completions_elasticsearch.yaml + Creates a completion for the provided Pinecone resource.: + $ref: ./examples/chat_completions_pinecone.yaml + /deployments/{deployment-id}/audio/transcriptions: + post: + summary: Transcribes audio into the input language. + operationId: Transcriptions_Create + parameters: + - in: path + name: deployment-id + required: true + schema: + type: string + example: whisper + description: Deployment id of the whisper model. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/createTranscriptionRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/audioResponse" + - $ref: "#/components/schemas/audioVerboseResponse" + text/plain: + schema: + type: string + description: Transcribed text in the output format (when response_format was one of text, vtt or srt). + x-ms-examples: + Create an audio transcription with json response format.: + $ref: ./examples/audio_transcription_object.yaml + Create an audio transcription with text response format.: + $ref: ./examples/audio_transcription_text.yaml + /deployments/{deployment-id}/audio/translations: + post: + summary: Transcribes and translates input audio into English text. + operationId: Translations_Create + parameters: + - in: path + name: deployment-id + required: true + schema: + type: string + example: whisper + description: Deployment id of the whisper model which was deployed. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/createTranslationRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + oneOf: + - $ref: "#/components/schemas/audioResponse" + - $ref: "#/components/schemas/audioVerboseResponse" + text/plain: + schema: + type: string + description: Transcribed text in the output format (when response_format was one of text, vtt or srt). + x-ms-examples: + Create an audio translation with json response format.: + $ref: ./examples/audio_translation_object.yaml + Create an audio translation with text response format.: + $ref: ./examples/audio_translation_text.yaml + /deployments/{deployment-id}/audio/speech: + post: + summary: Generates audio from the input text. + operationId: Speech_Create + parameters: + - in: path + name: deployment-id + required: true + schema: + type: string + example: tts-1 + description: Deployment id of the tts model which was deployed. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/createSpeechRequest" + responses: + "200": + description: OK + content: + application/octet-stream: + schema: + type: string + format: binary + x-ms-examples: + Create an audio from text with response format mp3.: + $ref: ./examples/audio_speech.yaml + /deployments/{deployment-id}/images/generations: + post: + summary: Generates a batch of images from a text caption on a given DALLE model deployment + operationId: ImageGenerations_Create + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/imageGenerationsRequest" + parameters: + - in: path + name: deployment-id + required: true + schema: + type: string + example: dalle-deployment + description: Deployment id of the dalle model which was deployed. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: Ok + content: + application/json: + schema: + $ref: "#/components/schemas/generateImagesResponse" + default: + description: An error occurred. + content: + application/json: + schema: + $ref: "#/components/schemas/dalleErrorResponse" + x-ms-examples: + Create an image.: + $ref: ./examples/image_generation.yaml + /assistants: + get: + operationId: List_Assistants + tags: + - Assistants + summary: Returns a list of assistants. + parameters: + - name: limit + in: query + description: &pagination_limit_param_description | + A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. + required: false + schema: + type: integer + default: 20 + - name: order + in: query + description: &pagination_order_param_description | + Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. + schema: + type: string + default: desc + enum: + - asc + - desc + x-ms-enum: + name: ListAssistantsOrder + modelAsString: true + values: + - value: asc + description: Order results in ascending order + - value: desc + description: Order results in descending order + - name: after + in: query + description: &pagination_after_param_description | + A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. + schema: + type: string + - name: before + in: query + description: &pagination_before_param_description | + A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. + schema: + type: string + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/listAssistantsResponse" + x-ms-examples: + Create an image.: + $ref: ./examples/list_assistants.yaml + post: + operationId: Create_Assistant + tags: + - Assistants + summary: Create an assistant with a model and instructions. + parameters: + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createAssistantRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/assistantObject" + x-ms-examples: + Create an assistant.: + $ref: ./examples/create_assistant.yaml + + /assistants/{assistant_id}: + get: + operationId: Get_Assistant + tags: + - Assistants + summary: Retrieves an assistant. + parameters: + - in: path + name: assistant_id + required: true + schema: + type: string + description: The ID of the assistant to retrieve. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/assistantObject" + x-ms-examples: + Create an assistant.: + $ref: ./examples/retrieve_assistant.yaml + post: + operationId: Modify_Assistant + tags: + - Assistant + summary: Modifies an assistant. + parameters: + - in: path + name: assistant_id + required: true + schema: + type: string + description: The ID of the assistant to modify. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/modifyAssistantRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/assistantObject" + x-ms-examples: + Create an assistant.: + $ref: ./examples/modify_assistant.yaml + delete: + operationId: Delete_Assistant + tags: + - Assistants + summary: Delete an assistant. + parameters: + - in: path + name: assistant_id + required: true + schema: + type: string + description: The ID of the assistant to delete. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/deleteAssistantResponse" + x-ms-examples: + Create an assistant.: + $ref: ./examples/delete_assistant.yaml + /threads: + post: + operationId: Create_Thread + tags: + - Assistants + summary: Create a thread. + parameters: + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createThreadRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/threadObject" + x-ms-examples: + Create a thread.: + $ref: ./examples/create_thread.yaml + /threads/{thread_id}: + get: + operationId: Get_Thread + tags: + - Assistants + summary: Retrieves a thread. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the thread to retrieve. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/threadObject" + x-ms-examples: + Create a thread.: + $ref: ./examples/retrieve_thread.yaml + post: + operationId: Modify_Thread + tags: + - Assistants + summary: Modifies a thread. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the thread to modify. Only the `metadata` can be modified. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/modifyThreadRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/threadObject" + x-ms-examples: + Modify a thread.: + $ref: ./examples/modify_thread.yaml + delete: + operationId: Delete_Thread + tags: + - Assistants + summary: Delete a thread. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the thread to delete. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/deleteThreadResponse" + x-ms-examples: + Delete a thread.: + $ref: ./examples/delete_thread.yaml + /threads/{thread_id}/messages: + get: + operationId: List_Messages + tags: + - Assistants + summary: Returns a list of messages for a given thread. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the [thread](/docs/api-reference/threads) the messages belong to. + - name: limit + in: query + description: *pagination_limit_param_description + required: false + schema: + type: integer + default: 20 + - name: order + in: query + description: | + Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. + schema: + type: string + default: desc + enum: + - asc + - desc + x-ms-enum: + name: ListMessagesOrder + modelAsString: true + values: + - value: asc + description: Order results in ascending order + - value: desc + description: Order results in descending order + - name: after + in: query + description: | + A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. + schema: + type: string + - name: before + in: query + description: | + A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. + schema: + type: string + - name: run_id + in: query + description: | + Filter messages by the run ID that generated them. + schema: + type: string + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/listMessagesResponse" + x-ms-examples: + List messages.: + $ref: ./examples/list_messages.yaml + post: + operationId: Create_Message + tags: + - Assistants + summary: Create a message. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the [thread](/docs/api-reference/threads) to create a message for. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createMessageRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/messageObject" + x-ms-examples: + Create a message.: + $ref: ./examples/create_message.yaml + /threads/{thread_id}/messages/{message_id}: + get: + operationId: Get_Message + tags: + - Assistants + summary: Retrieve a message. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the [thread](/docs/api-reference/threads) to which this message belongs. + - in: path + name: message_id + required: true + schema: + type: string + description: The ID of the message to retrieve. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/messageObject" + x-ms-examples: + Retrieve a message.: + $ref: ./examples/get_message.yaml + post: + operationId: Modify_Message + tags: + - Assistants + summary: Modifies a message. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the thread to which this message belongs. + - in: path + name: message_id + required: true + schema: + type: string + description: The ID of the message to modify. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/modifyMessageRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/messageObject" + x-ms-examples: + Modify a message.: + $ref: ./examples/modify_message.yaml + /threads/runs: + post: + operationId: Create_Thread_And_Run + tags: + - Assistants + summary: Create a thread and run it in one request. + parameters: + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createThreadAndRunRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/runObject" + x-ms-examples: + Create a thread and run it.: + $ref: ./examples/create_thread_and_run.yaml + /threads/{thread_id}/runs: + get: + operationId: List_Runs + tags: + - Assistants + summary: Returns a list of runs belonging to a thread. + parameters: + - name: thread_id + in: path + required: true + schema: + type: string + description: The ID of the thread the run belongs to. + - name: limit + in: query + description: *pagination_limit_param_description + required: false + schema: + type: integer + default: 20 + - name: order + in: query + description: *pagination_order_param_description + schema: + type: string + default: desc + enum: + - asc + - desc + x-ms-enum: + name: ListRunsOrder + modelAsString: true + values: + - value: asc + description: Order results in ascending order + - value: desc + description: Order results in descending order + - name: after + in: query + description: *pagination_after_param_description + schema: + type: string + - name: before + in: query + description: *pagination_before_param_description + schema: + type: string + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/listRunsResponse" + x-ms-examples: + List runs.: + $ref: ./examples/list_runs.yaml + post: + operationId: Create_Run + tags: + - Assistants + summary: Create a run. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the thread to run. + - name: include[] + in: query + 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. + + schema: + type: array + items: + type: string + enum: + - step_details.tool_calls[*].file_search.results[*].content + x-ms-enum: + name: Include + modelAsString: true + values: + - value: step_details.tool_calls[*].file_search.results[*].content + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createRunRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/runObject" + x-ms-examples: + Create a run.: + $ref: ./examples/create_run.yaml + /threads/{thread_id}/runs/{run_id}: + get: + operationId: Get_Run + tags: + - Assistants + summary: Retrieves a run. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the [thread](/docs/api-reference/threads) that was run. + - in: path + name: run_id + required: true + schema: + type: string + description: The ID of the run to retrieve. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/runObject" + x-ms-examples: + Retrieve a run.: + $ref: ./examples/get_run.yaml + post: + operationId: Modify_Run + tags: + - Assistants + summary: Modifies a run. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the [thread](/docs/api-reference/threads) that was run. + - in: path + name: run_id + required: true + schema: + type: string + description: The ID of the run to modify. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/modifyRunRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/runObject" + x-ms-examples: + Modify a run.: + $ref: ./examples/modify_run.yaml + /threads/{thread_id}/runs/{run_id}/submit_tool_outputs: + post: + operationId: Submit_Tool_Outputs_To_Run + tags: + - Assistants + summary: | + When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the [thread](/docs/api-reference/threads) to which this run belongs. + - in: path + name: run_id + required: true + schema: + type: string + description: The ID of the run that requires the tool output submission. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/submitToolOutputsRunRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/runObject" + x-ms-examples: + Submit tool outputs to a run.: + $ref: ./examples/submit_tool_outputs_to_run.yaml + /threads/{thread_id}/runs/{run_id}/cancel: + post: + operationId: Cancel_Run + tags: + - Assistants + summary: Cancels a run that is `in_progress`. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the thread to which this run belongs. + - in: path + name: run_id + required: true + schema: + type: string + description: The ID of the run to cancel. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/runObject" + x-ms-examples: + Cancel a run.: + $ref: ./examples/cancel_run.yaml + /threads/{thread_id}/runs/{run_id}/steps: + get: + operationId: List_Run_Steps + tags: + - Assistants + summary: Returns a list of run steps belonging to a run. + parameters: + - name: thread_id + in: path + required: true + schema: + type: string + description: The ID of the thread the run and run steps belong to. + - name: run_id + in: path + required: true + schema: + type: string + description: The ID of the run the run steps belong to. + - name: limit + in: query + description: *pagination_limit_param_description + required: false + schema: + type: integer + default: 20 + - name: order + in: query + description: *pagination_order_param_description + schema: + type: string + default: desc + enum: + - asc + - desc + x-ms-enum: + name: ListRunStepsOrder + modelAsString: true + values: + - value: asc + description: Order results in ascending order + - value: desc + description: Order results in descending order + - name: after + in: query + description: *pagination_after_param_description + schema: + type: string + - name: before + in: query + description: *pagination_before_param_description + schema: + type: string + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + - name: include[] + in: query + 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. + + schema: + type: array + items: + type: string + enum: + - step_details.tool_calls[*].file_search.results[*].content + x-ms-enum: + name: Include + modelAsString: true + values: + - value: step_details.tool_calls[*].file_search.results[*].content + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/listRunStepsResponse" + x-ms-examples: + List run steps.: + $ref: ./examples/list_run_steps.yaml + /threads/{thread_id}/runs/{run_id}/steps/{step_id}: + get: + operationId: Get_Run_Step + tags: + - Assistants + summary: Retrieves a run step. + parameters: + - in: path + name: thread_id + required: true + schema: + type: string + description: The ID of the thread to which the run and run step belongs. + - in: path + name: run_id + required: true + schema: + type: string + description: The ID of the run to which the run step belongs. + - in: path + name: step_id + required: true + schema: + type: string + description: The ID of the run step to retrieve. + - name: include[] + in: query + 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. + + schema: + type: array + items: + type: string + enum: + - step_details.tool_calls[*].file_search.results[*].content + x-ms-enum: + name: Include + modelAsString: true + values: + - value: step_details.tool_calls[*].file_search.results[*].content + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/runStepObject" + x-ms-examples: + Retrieve a run step.: + $ref: ./examples/get_run_step.yaml + /vector_stores: + get: + operationId: List_Vector_Stores + tags: + - Vector Stores + summary: Returns a list of vector stores. + parameters: + - name: limit + in: query + description: *pagination_limit_param_description + required: false + schema: + type: integer + default: 20 + - name: order + in: query + description: *pagination_order_param_description + schema: + type: string + default: desc + enum: ["asc", "desc"] + x-ms-enum: + name: ListVectorStoresOrder + modelAsString: true + values: + - value: asc + - value: desc + - name: after + in: query + description: *pagination_after_param_description + schema: + type: string + - name: before + in: query + description: *pagination_before_param_description + schema: + type: string + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/listVectorStoresResponse" + x-ms-examples: + List vector stores.: + $ref: ./examples/list_vector_stores.yaml + post: + operationId: Create_Vector_Store + tags: + - Vector Stores + summary: Create a vector store. + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createVectorStoreRequest" + parameters: + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreObject" + x-ms-examples: + Create a vector store.: + $ref: ./examples/create_vector_store.yaml + + /vector_stores/{vector_store_id}: + get: + operationId: Get_Vector_Store + tags: + - Vector Stores + summary: Retrieves a vector store. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + description: The ID of the vector store to retrieve. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreObject" + x-ms-examples: + Retrieve a vector store.: + $ref: ./examples/retrieve_vector_store.yaml + post: + operationId: Modify_Vector_Store + tags: + - Vector Stores + summary: Modifies a vector store. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + description: The ID of the vector store to modify. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/updateVectorStoreRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreObject" + x-ms-examples: + Modify a vector store.: + $ref: ./examples/modify_vector_store.yaml + + delete: + operationId: Delete_Vector_Store + tags: + - Vector Stores + summary: Delete a vector store. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + description: The ID of the vector store to delete. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/deleteVectorStoreResponse" + x-ms-examples: + Delete a vector store.: + $ref: ./examples/delete_vector_store.yaml + + /vector_stores/{vector_store_id}/files: + get: + operationId: List_Vector_Store_Files + tags: + - Vector Stores + summary: Returns a list of vector store files. + parameters: + - name: vector_store_id + in: path + description: The ID of the vector store that the files belong to. + required: true + schema: + type: string + - name: limit + in: query + description: *pagination_limit_param_description + required: false + schema: + type: integer + default: 20 + - name: order + in: query + description: *pagination_order_param_description + schema: + type: string + default: desc + enum: ["asc", "desc"] + x-ms-enum: + name: ListVectorStoreFilesOrder + modelAsString: true + values: + - value: asc + - value: desc + - name: after + in: query + description: *pagination_after_param_description + schema: + type: string + - name: before + in: query + description: *pagination_before_param_description + schema: + type: string + - name: filter + in: query + description: "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`." + schema: + type: string + enum: ["in_progress", "completed", "failed", "cancelled"] + x-ms-enum: + name: ListVectorStoreFilesFilter + modelAsString: true + values: + - value: in_progress + - value: completed + - value: failed + - value: cancelled + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/listVectorStoreFilesResponse" + x-ms-examples: + List vector store files.: + $ref: ./examples/list_vector_store_files.yaml + post: + operationId: Create_Vector_Store_File + tags: + - Vector Stores + summary: Create a vector store file by attaching a [File](/docs/api-reference/files) to a [vector store](/docs/api-reference/vector-stores/object). + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + example: vs_abc123 + description: | + The ID of the vector store for which to create a File. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createVectorStoreFileRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreFileObject" + x-ms-examples: + Create a vector store file.: + $ref: ./examples/create_vector_store_file.yaml + + /vector_stores/{vector_store_id}/files/{file_id}: + get: + operationId: Get_Vector_Store_File + tags: + - Vector Stores + summary: Retrieves a vector store file. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + example: vs_abc123 + description: The ID of the vector store that the file belongs to. + - in: path + name: file_id + required: true + schema: + type: string + example: file-abc123 + description: The ID of the file being retrieved. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreFileObject" + x-ms-examples: + Retrieve a vector store file.: + $ref: ./examples/retrieve_vector_store_file.yaml + delete: + operationId: Delete_Vector_Store_File + tags: + - Vector Stores + summary: 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](/docs/api-reference/files/delete) endpoint. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + description: The ID of the vector store that the file belongs to. + - in: path + name: file_id + required: true + schema: + type: string + description: The ID of the file to delete. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/deleteVectorStoreFileResponse" + x-ms-examples: + Delete a vector store file.: + $ref: ./examples/delete_vector_store_file.yaml + + /vector_stores/{vector_store_id}/file_batches: + post: + operationId: Create_Vector_Store_File_Batch + tags: + - Vector Stores + summary: Create a vector store file batch. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + example: vs_abc123 + description: | + The ID of the vector store for which to create a File Batch. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/createVectorStoreFileBatchRequest" + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreFileBatchObject" + x-ms-examples: + Create a vector store file batch.: + $ref: ./examples/create_vector_store_file_batch.yaml + + /vector_stores/{vector_store_id}/file_batches/{batch_id}: + get: + operationId: Get_Vector_Store_File_Batch + tags: + - Vector Stores + summary: Retrieves a vector store file batch. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + example: vs_abc123 + description: The ID of the vector store that the file batch belongs to. + - in: path + name: batch_id + required: true + schema: + type: string + example: vsfb_abc123 + description: The ID of the file batch being retrieved. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreFileBatchObject" + x-ms-examples: + Retrieve a vector store file batch.: + $ref: ./examples/retrieve_vector_store_file_batch.yaml + + /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel: + post: + operationId: Cancel_Vector_Store_File_Batch + tags: + - Vector Stores + summary: Cancel a vector store file batch. This attempts to cancel the processing of files in this batch as soon as possible. + parameters: + - in: path + name: vector_store_id + required: true + schema: + type: string + description: The ID of the vector store that the file batch belongs to. + - in: path + name: batch_id + required: true + schema: + type: string + description: The ID of the file batch to cancel. + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/vectorStoreFileBatchObject" + x-ms-examples: + Cancel a vector store file batch.: + $ref: ./examples/cancel_vector_store_file_batch.yaml + + /vector_stores/{vector_store_id}/file_batches/{batch_id}/files: + get: + operationId: List_Vector_Store_File_Batch_Files + tags: + - Vector Stores + summary: Returns a list of vector store files in a batch. + parameters: + - name: vector_store_id + in: path + description: The ID of the vector store that the files belong to. + required: true + schema: + type: string + - name: batch_id + in: path + description: The ID of the file batch that the files belong to. + required: true + schema: + type: string + - name: limit + in: query + description: *pagination_limit_param_description + required: false + schema: + type: integer + default: 20 + - name: order + in: query + description: *pagination_order_param_description + schema: + type: string + default: desc + enum: ["asc", "desc"] + x-ms-enum: + name: ListVectorStoreFilesOrder + modelAsString: true + values: + - value: asc + - value: desc + - name: after + in: query + description: *pagination_after_param_description + schema: + type: string + - name: before + in: query + description: *pagination_before_param_description + schema: + type: string + - name: filter + in: query + description: "Filter by file status. One of `in_progress`, `completed`, `failed`, `cancelled`." + schema: + type: string + enum: ["in_progress", "completed", "failed", "cancelled"] + x-ms-enum: + name: ListVectorStoreFilesFilter + modelAsString: true + values: + - value: in_progress + - value: completed + - value: failed + - value: cancelled + - in: query + name: api-version + required: true + schema: + type: string + example: 2024-12-01-preview + description: api version + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/listVectorStoreFilesResponse" + x-ms-examples: + List vector store files in a batch.: + $ref: ./examples/list_vector_store_file_batch.yaml + +components: + schemas: + errorResponse: + type: object + properties: + error: + $ref: "#/components/schemas/error" + errorBase: + type: object + properties: + code: + type: string + message: + type: string + error: + type: object + allOf: + - $ref: "#/components/schemas/errorBase" + properties: + param: + type: string + type: + type: string + inner_error: + $ref: "#/components/schemas/innerError" + innerError: + description: Inner error with additional details. + type: object + properties: + code: + $ref: "#/components/schemas/innerErrorCode" + content_filter_results: + $ref: "#/components/schemas/contentFilterPromptResults" + innerErrorCode: + description: Error codes for the inner error object. + enum: + - ResponsibleAIPolicyViolation + type: string + x-ms-enum: + name: InnerErrorCode + modelAsString: true + values: + - value: ResponsibleAIPolicyViolation + description: The prompt violated one of more content filter rules. + dalleErrorResponse: + type: object + properties: + error: + $ref: "#/components/schemas/dalleError" + dalleError: + type: object + allOf: + - $ref: "#/components/schemas/errorBase" + properties: + param: + type: string + type: + type: string + inner_error: + $ref: "#/components/schemas/dalleInnerError" + dalleInnerError: + description: Inner error with additional details. + type: object + properties: + code: + $ref: "#/components/schemas/innerErrorCode" + content_filter_results: + $ref: "#/components/schemas/dalleFilterResults" + revised_prompt: + type: string + description: The prompt that was used to generate the image, if there was any revision to the prompt. + contentFilterCompletionTextSpan: + description: Describes a span within generated completion text. Offset 0 is the first UTF32 code point of the completion text. + type: object + properties: + completion_start_offset: + description: Offset of the UTF32 code point which begins the span. + type: integer + completion_end_offset: + description: Offset of the first UTF32 code point which is excluded from the span. This field is always equal to completion_start_offset for empty spans. This field is always larger than completion_start_offset for non-empty spans. + type: integer + required: + - completion_start_offset + - completion_end_offset + contentFilterResultBase: + type: object + properties: + filtered: + type: boolean + required: + - filtered + contentFilterSeverityResult: + type: object + allOf: + - $ref: "#/components/schemas/contentFilterResultBase" + - properties: + severity: + type: string + enum: + - safe + - low + - medium + - high + x-ms-enum: + name: ContentFilterSeverity + modelAsString: true + values: + - value: safe + description: General content or related content in generic or non-harmful contexts. + - value: low + description: Harmful content at a low intensity and risk level. + - value: medium + description: Harmful content at a medium intensity and risk level. + - value: high + description: Harmful content at a high intensity and risk level. + required: + - severity + - filtered + contentFilterDetectedResult: + type: object + allOf: + - $ref: "#/components/schemas/contentFilterResultBase" + - properties: + detected: + type: boolean + required: + - detected + - filtered + contentFilterDetectedWithCitationResult: + type: object + allOf: + - $ref: "#/components/schemas/contentFilterDetectedResult" + - properties: + citation: + type: object + properties: + URL: + type: string + license: + type: string + required: + - detected + - filtered + contentFilterDetectedWithCompletionTextSpansResult: + type: object + allOf: + - $ref: "#/components/schemas/contentFilterDetectedResult" + - properties: + details: + type: array + items: + $ref: "#/components/schemas/contentFilterCompletionTextSpan" + required: + - detected + - filtered + - details + contentFilterIdResult: + type: object + allOf: + - $ref: "#/components/schemas/contentFilterResultBase" + - properties: + id: + type: string + required: + - id + - filtered + contentFilterResultsBase: + type: object + description: Information about the content filtering results. + properties: + sexual: + $ref: "#/components/schemas/contentFilterSeverityResult" + violence: + $ref: "#/components/schemas/contentFilterSeverityResult" + hate: + $ref: "#/components/schemas/contentFilterSeverityResult" + self_harm: + $ref: "#/components/schemas/contentFilterSeverityResult" + profanity: + $ref: "#/components/schemas/contentFilterDetectedResult" + custom_blocklists: + $ref: "#/components/schemas/contentFilterDetailedResults" + error: + $ref: "#/components/schemas/errorBase" + contentFilterPromptResults: + type: object + description: Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about jailbreak content and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id. + allOf: + - $ref: "#/components/schemas/contentFilterResultsBase" + - properties: + jailbreak: + $ref: "#/components/schemas/contentFilterDetectedResult" + indirect_attack: + $ref: "#/components/schemas/contentFilterDetectedResult" + contentFilterChoiceResults: + type: object + description: Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about third party text and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id. + allOf: + - $ref: "#/components/schemas/contentFilterResultsBase" + - properties: + protected_material_text: + $ref: "#/components/schemas/contentFilterDetectedResult" + - properties: + protected_material_code: + $ref: "#/components/schemas/contentFilterDetectedWithCitationResult" + - properties: + ungrounded_material: + $ref: "#/components/schemas/contentFilterDetectedWithCompletionTextSpansResult" + contentFilterDetailedResults: + type: object + description: Content filtering results with a detail of content filter ids for the filtered segments. + allOf: + - $ref: "#/components/schemas/contentFilterResultBase" + - properties: + details: + items: + $ref: "#/components/schemas/contentFilterIdResult" + type: array + required: + - filtered + - details + promptFilterResult: + type: object + description: Content filtering results for a single prompt in the request. + properties: + prompt_index: + type: integer + content_filter_results: + $ref: "#/components/schemas/contentFilterPromptResults" + promptFilterResults: + type: array + description: Content filtering results for zero or more prompts in the request. In a streaming request, results for different prompts may arrive at different times or in different orders. + items: + $ref: "#/components/schemas/promptFilterResult" + dalleContentFilterResults: + type: object + description: Information about the content filtering results. + properties: + sexual: + $ref: "#/components/schemas/contentFilterSeverityResult" + violence: + $ref: "#/components/schemas/contentFilterSeverityResult" + hate: + $ref: "#/components/schemas/contentFilterSeverityResult" + self_harm: + $ref: "#/components/schemas/contentFilterSeverityResult" + dalleFilterResults: + type: object + description: Information about the content filtering category (hate, sexual, violence, self_harm), if it has been detected, as well as the severity level (very_low, low, medium, high-scale that determines the intensity and risk level of harmful content) and if it has been filtered or not. Information about jailbreak content and profanity, if it has been detected, and if it has been filtered or not. And information about customer block list, if it has been filtered and its id. + allOf: + - $ref: "#/components/schemas/dalleContentFilterResults" + - properties: + profanity: + $ref: "#/components/schemas/contentFilterDetectedResult" + jailbreak: + $ref: "#/components/schemas/contentFilterDetectedResult" + custom_blocklists: + $ref: "#/components/schemas/contentFilterDetailedResults" + chatCompletionsRequestCommon: + type: object + properties: + temperature: + description: |- + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + We generally recommend altering this or `top_p` but not both. + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + top_p: + description: |- + An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. + We generally recommend altering this or `temperature` but not both. + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + stream: + description: "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message." + type: boolean + nullable: true + default: false + stop: + description: Up to 4 sequences where the API will stop generating further tokens. + oneOf: + - type: string + nullable: true + - type: array + items: + type: string + nullable: false + minItems: 1 + maxItems: 4 + description: Array minimum size of 1 and maximum of 4 + default: null + max_tokens: + description: | + The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens). + + This is not compatible with o1 series models. + type: integer + default: 4096 + 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. This is only supported in o1 series models. Will expand the support to other models in future API release. + + type: integer + nullable: true + presence_penalty: + 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. + type: number + default: 0 + minimum: -2 + maximum: 2 + frequency_penalty: + 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. + type: number + default: 0 + minimum: -2 + maximum: 2 + logit_bias: + 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 tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + type: object + nullable: true + store: + type: boolean + default: false + nullable: true + description: Whether or not to store the output of this chat completion request for use in our model distillation or evaluation products. + metadata: + type: object + nullable: true + description: Developer-defined tags and values used for filtering completions in the stored completions dashboard. + additionalProperties: + type: string + user: + description: A unique identifier representing your end-user, which can help Azure OpenAI to monitor and detect abuse. + type: string + example: user-1234 + nullable: false + createCompletionRequest: + type: object + properties: + prompt: + description: &completions_prompt_description | + The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. + + Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. + default: "<|endoftext|>" + nullable: true + oneOf: + - type: string + default: "" + example: "This is a test." + - type: array + items: + type: string + default: "" + example: "This is a test." + best_of: + type: integer + default: 1 + minimum: 0 + maximum: 20 + nullable: true + description: &completions_best_of_description | + Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed. + + When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how many to return – `best_of` must be greater than `n`. + + **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. + echo: + type: boolean + default: false + nullable: true + description: &completions_echo_description > + Echo back the prompt in addition to the completion + frequency_penalty: + type: number + default: 0 + minimum: -2 + maximum: 2 + nullable: true + description: &completions_frequency_penalty_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. + + logit_bias: &completions_logit_bias + type: object + x-oaiTypeLabel: map + default: null + nullable: true + additionalProperties: + type: integer + description: &completions_logit_bias_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](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: &completions_logprobs_configuration + type: integer + minimum: 0 + maximum: 5 + default: null + nullable: true + description: &completions_logprobs_description | + Include the log probabilities on the `logprobs` most likely output tokens, as well the chosen tokens. For example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in the response. + + The maximum value for `logprobs` is 5. + max_tokens: + type: integer + minimum: 0 + default: 16 + example: 16 + nullable: true + description: &completions_max_tokens_description | + 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: + type: integer + minimum: 1 + maximum: 128 + default: 1 + example: 1 + nullable: true + description: &completions_completions_description | + How many completions to generate for each prompt. + + **Note:** Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. + presence_penalty: + type: number + default: 0 + minimum: -2 + maximum: 2 + nullable: true + description: &completions_presence_penalty_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. + seed: &completions_seed_param + type: integer + minimum: -9223372036854775808 + maximum: 9223372036854775807 + nullable: true + description: | + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. + + Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. + stop: + description: &completions_stop_description > + Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. + default: null + nullable: true + oneOf: + - type: string + default: <|endoftext|> + example: "\n" + nullable: true + - type: array + minItems: 1 + maxItems: 4 + items: + type: string + example: '["\n"]' + stream: + description: > + Whether to stream back partial progress. If set, tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + type: boolean + nullable: true + default: false + suffix: + description: | + The suffix that comes after a completion of inserted text. + + This parameter is only supported for `gpt-3.5-turbo-instruct`. + default: null + nullable: true + type: string + example: "test." + stream_options: + $ref: "#/components/schemas/chatCompletionStreamOptions" + temperature: + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + description: &completions_temperature_description | + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + + We generally recommend altering this or `top_p` but not both. + top_p: + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + description: &completions_top_p_description | + An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. + + We generally recommend altering this or `temperature` but not both. + user: &end_user_param_configuration + type: string + example: user-1234 + description: | + A unique identifier representing your end-user, which can help to monitor and detect abuse. + required: + - prompt + + createCompletionResponse: + type: object + description: | + Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint). + properties: + id: + type: string + description: A unique identifier for the completion. + choices: + type: array + description: The list of completion choices the model generated for the input prompt. + items: + type: object + required: + - finish_reason + - index + - logprobs + - text + properties: + finish_reason: + type: string + description: &completion_finish_reason_description | + The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, + `length` if the maximum number of tokens specified in the request was reached, + or `content_filter` if content was omitted due to a flag from our content filters. + enum: ["stop", "length", "content_filter"] + index: + type: integer + logprobs: + type: object + nullable: true + properties: + text_offset: + type: array + items: + type: integer + token_logprobs: + type: array + items: + type: number + tokens: + type: array + items: + type: string + top_logprobs: + type: array + items: + type: object + additionalProperties: + type: number + text: + type: string + content_filter_results: + $ref: "#/components/schemas/contentFilterChoiceResults" + created: + type: integer + description: The Unix timestamp (in seconds) of when the completion was created. + model: + type: string + description: The model used for completion. + prompt_filter_results: + $ref: "#/components/schemas/promptFilterResults" + system_fingerprint: + type: string + description: | + This fingerprint represents the backend configuration that the model runs with. + + Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. + object: + type: string + description: The object type, which is always "text_completion" + enum: [text_completion] + usage: + $ref: "#/components/schemas/completionUsage" + required: + - id + - object + - created + - model + - choices + + createChatCompletionRequest: + type: object + allOf: + - $ref: "#/components/schemas/chatCompletionsRequestCommon" + - properties: + messages: + description: A list of messages comprising the conversation so far. [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb). + type: array + minItems: 1 + items: + $ref: "#/components/schemas/chatCompletionRequestMessage" + data_sources: + type: array + description: |2- + The configuration entries for Azure OpenAI chat extensions that use them. + This additional specification is only compatible with Azure OpenAI. + items: + $ref: "#/components/schemas/azureChatExtensionConfiguration" + reasoning_effort: + type: string + enum: + - low + - medium + - high + default: medium + description: > + **o1 models only** + + + Constrains effort on reasoning for + + [reasoning + models](https://platform.openai.com/docs/guides/reasoning). + + Currently supported values are `low`, `medium`, and `high`. Reducing + + reasoning effort can result in faster responses and fewer tokens + used + + on reasoning in a response. + frequency_penalty: + type: number + default: 0 + minimum: -2 + maximum: 2 + nullable: true + description: *completions_frequency_penalty_description + logit_bias: + type: object + default: null + nullable: true + additionalProperties: + type: integer + 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 tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token. + logprobs: + description: Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`. + type: boolean + default: false + nullable: true + top_logprobs: + description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used. + type: integer + minimum: 0 + maximum: 20 + nullable: true + max_tokens: + description: | + The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. + + The total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. + type: integer + nullable: true + n: + type: integer + minimum: 1 + maximum: 128 + default: 1 + example: 1 + nullable: true + description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. + parallel_tool_calls: + $ref: "#/components/schemas/ParallelToolCalls" + presence_penalty: + type: number + default: 0 + minimum: -2 + maximum: 2 + nullable: true + description: *completions_presence_penalty_description + response_format: + description: | + An object specifying the format that the model must output. Compatible with [GPT-4o](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models), [GPT-4o mini](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models), [GPT-4 Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models) and all [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-35) Turbo models newer than `gpt-3.5-turbo-1106`. + + Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which guarantees the model will match your supplied JSON schema. + + Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON. + + **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. + oneOf: + - $ref: "#/components/schemas/ResponseFormatText" + - $ref: "#/components/schemas/ResponseFormatJsonObject" + - $ref: "#/components/schemas/ResponseFormatJsonSchema" + x-oaiExpandable: true + seed: + type: integer + minimum: -9223372036854775808 + maximum: 9223372036854775807 + nullable: true + description: | + This feature is in Beta. + If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. + Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. + stop: + description: | + Up to 4 sequences where the API will stop generating further tokens. + default: null + oneOf: + - type: string + nullable: true + - type: array + minItems: 1 + maxItems: 4 + items: + type: string + stream: + description: > + If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) + as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). + type: boolean + nullable: true + default: false + stream_options: + $ref: "#/components/schemas/chatCompletionStreamOptions" + temperature: + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + description: *completions_temperature_description + top_p: + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + description: *completions_top_p_description + tools: + type: array + description: > + A list of tools the model may call. Currently, only functions are supported as a tool. + Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. + items: + $ref: "#/components/schemas/chatCompletionTool" + tool_choice: + $ref: "#/components/schemas/chatCompletionToolChoiceOption" + function_call: + deprecated: true + description: | + Deprecated in favor of `tool_choice`. + + Controls which (if any) function is called by the model. + `none` means the model will not call a function and instead generates a message. + `auto` means the model can pick between generating a message or calling a function. + Specifying a particular function via `{"name": "my_function"}` forces the model to call that function. + + `none` is the default when no functions are present. `auto` is the default if functions are present. + oneOf: + - type: string + description: > + `none` means the model will not call a function and instead generates a message. + `auto` means the model can pick between generating a message or calling a function. + enum: [none, auto] + - $ref: "#/components/schemas/chatCompletionFunctionCallOption" + x-oaiExpandable: true + functions: + deprecated: true + description: | + Deprecated in favor of `tools`. + + A list of functions the model may generate JSON inputs for. + type: array + minItems: 1 + maxItems: 128 + items: + $ref: "#/components/schemas/chatCompletionFunctions" + user: *end_user_param_configuration + user_security_context: + $ref: "#/components/schemas/user_security_context" + + required: + - messages + + user_security_context: + description: | + User security context contains several parameters that describe the AI application itself, and the end user that interacts with the AI application. These fields assist your security operations teams to investigate and mitigate security incidents by providing a comprehensive approach to protecting your AI applications. [Learn more](https://aka.ms/TP4AI/Documentation/EndUserContext) about protecting AI applications using Microsoft Defender for Cloud. + type: object + properties: + application_name: + type: string + description: The name of the application. Sensitive personal information should not be included in this field. + end_user_id: + type: string + format: uuid + description: This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application. Sensitive personal information should not be included in this field. + end_user_tenant_id: + type: string + format: uuid + description: The Microsoft 365 tenant ID the end user belongs to. It's required when the generative AI application is multi tenant. + source_ip: + type: string + description: Captures the original client's IP address, accepting both IPv4 and IPv6 formats. + + chatCompletionFunctions: + type: object + deprecated: true + properties: + description: + type: string + description: A description of what the function does, used by the model to choose when and how to call the function. + name: + type: string + description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + parameters: + $ref: "#/components/schemas/FunctionParameters" + required: + - name + + chatCompletionFunctionCallOption: + type: object + description: > + Specifying a particular function via `{"name": "my_function"}` forces the model to call that function. + properties: + name: + type: string + description: The name of the function to call. + required: + - name + + chatCompletionFunctionParameters: + type: object + description: The parameters the functions accepts, described as a JSON Schema object. See the [guide/](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. + additionalProperties: true + + chatCompletionRequestMessage: + oneOf: + - $ref: "#/components/schemas/ChatCompletionRequestDeveloperMessage" + - $ref: "#/components/schemas/chatCompletionRequestSystemMessage" + - $ref: "#/components/schemas/chatCompletionRequestUserMessage" + - $ref: "#/components/schemas/chatCompletionRequestAssistantMessage" + - $ref: "#/components/schemas/chatCompletionRequestToolMessage" + - $ref: "#/components/schemas/chatCompletionRequestFunctionMessage" + + ChatCompletionRequestDeveloperMessage: + type: object + title: Developer message + description: > + Developer-provided instructions that the model should follow, regardless + of + + messages sent by the user. With o1 models and newer, `developer` + messages + + replace the previous `system` messages. + properties: + content: + description: The contents of the developer message. + oneOf: + - type: string + description: The contents of the developer message. + title: Text content + - type: array + description: An array of content parts with a defined type. For developer + messages, only type `text` is supported. + title: Array of content parts + items: + $ref: "#/components/schemas/chatCompletionRequestDeveloperMessageContentPart" + minItems: 1 + role: + type: string + enum: + - developer + description: The role of the messages author, in this case `developer`. + name: + type: string + description: An optional name for the participant. Provides the model + information to differentiate between participants of the same role. + required: + - content + - role + + chatCompletionRequestSystemMessage: + type: object + title: System message + properties: + content: + description: The contents of the system message. + oneOf: + - type: string + description: The contents of the system message. + title: Text content + - type: array + description: An array of content parts with a defined type. For system messages, only type `text` is supported. + title: Array of content parts + items: + $ref: "#/components/schemas/chatCompletionRequestSystemMessageContentPart" + minItems: 1 + role: + type: string + enum: ["system"] + description: The role of the messages author, in this case `system`. + name: + type: string + description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. + required: + - content + - role + + chatCompletionRequestUserMessage: + type: object + title: User message + properties: + content: + description: | + The contents of the user message. + oneOf: + - type: string + 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 `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4o` model. + title: Array of content parts + items: + $ref: "#/components/schemas/chatCompletionRequestUserMessageContentPart" + minItems: 1 + x-oaiExpandable: true + role: + type: string + enum: ["user"] + description: The role of the messages author, in this case `user`. + name: + type: string + description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. + required: + - content + - role + + chatCompletionRequestAssistantMessage: + type: object + title: Assistant message + properties: + content: + nullable: true + oneOf: + - type: string + description: The contents of the assistant message. + title: Text content + - type: array + description: An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`. + title: Array of content parts + items: + $ref: "#/components/schemas/chatCompletionRequestAssistantMessageContentPart" + minItems: 1 + description: | + The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. + refusal: + nullable: true + type: string + description: The refusal message by the assistant. + role: + type: string + enum: ["assistant"] + description: The role of the messages author, in this case `assistant`. + name: + type: string + description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. + tool_calls: + $ref: "#/components/schemas/chatCompletionMessageToolCalls" + function_call: + type: object + deprecated: true + description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." + nullable: true + properties: + arguments: + type: string + description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + name: + type: string + description: The name of the function to call. + required: + - arguments + - name + required: + - role + + chatCompletionRequestToolMessage: + type: object + title: Tool message + properties: + role: + type: string + enum: ["tool"] + description: The role of the messages author, in this case `tool`. + content: + oneOf: + - type: string + description: The contents of the tool message. + title: Text content + - type: array + description: An array of content parts with a defined type. For tool messages, only type `text` is supported. + title: Array of content parts + items: + $ref: "#/components/schemas/chatCompletionRequestToolMessageContentPart" + minItems: 1 + description: The contents of the tool message. + tool_call_id: + type: string + description: Tool call that this message is responding to. + required: + - role + - content + - tool_call_id + + chatCompletionRequestFunctionMessage: + type: object + title: Function message + deprecated: true + properties: + role: + type: string + enum: ["function"] + description: The role of the messages author, in this case `function`. + content: + nullable: true + type: string + description: The contents of the function message. + name: + type: string + description: The name of the function to call. + required: + - role + - content + - name + + chatCompletionRequestDeveloperMessageContentPart: + oneOf: + - $ref: "#/components/schemas/chatCompletionRequestMessageContentPartText" + + chatCompletionRequestSystemMessageContentPart: + oneOf: + - $ref: "#/components/schemas/chatCompletionRequestMessageContentPartText" + + chatCompletionRequestUserMessageContentPart: + oneOf: + - $ref: "#/components/schemas/chatCompletionRequestMessageContentPartText" + - $ref: "#/components/schemas/chatCompletionRequestMessageContentPartImage" + + chatCompletionRequestAssistantMessageContentPart: + oneOf: + - $ref: "#/components/schemas/chatCompletionRequestMessageContentPartText" + - $ref: "#/components/schemas/chatCompletionRequestMessageContentPartRefusal" + + chatCompletionRequestToolMessageContentPart: + oneOf: + - $ref: "#/components/schemas/chatCompletionRequestMessageContentPartText" + + chatCompletionRequestMessageContentPartText: + type: object + title: Text content part + properties: + type: + type: string + enum: ["text"] + description: The type of the content part. + text: + type: string + description: The text content. + required: + - type + - text + + chatCompletionRequestMessageContentPartImage: + type: object + title: Image content part + properties: + type: + type: string + enum: ["image_url"] + description: The type of the content part. + image_url: + type: object + properties: + url: + type: string + description: Either a URL of the image or the base64 encoded image data. + format: uri + detail: + type: string + description: Specifies the detail level of the image. Learn more in the [Vision guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision?tabs=rest%2Csystem-assigned%2Cresource#detail-parameter-settings-in-image-processing-low-high-auto). + enum: ["auto", "low", "high"] + default: "auto" + required: + - url + required: + - type + - image_url + + chatCompletionRequestMessageContentPartRefusal: + type: object + title: Refusal content part + properties: + type: + type: string + enum: ["refusal"] + description: The type of the content part. + refusal: + type: string + description: The refusal message generated by the model. + required: + - type + - refusal + azureChatExtensionConfiguration: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/azureChatExtensionType" + description: |2- + A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat + completions request that should use Azure OpenAI chat extensions to augment the response behavior. + The use of this configuration is compatible only with Azure OpenAI. + discriminator: + propertyName: type + mapping: + azure_search: "#/components/schemas/azureSearchChatExtensionConfiguration" + azure_cosmos_db: "#/components/schemas/azureCosmosDBChatExtensionConfiguration" + elasticsearch: "#/components/schemas/elasticsearchChatExtensionConfiguration" + mongo_db: "#/components/schemas/mongoDBChatExtensionConfiguration" + pinecone: "#/components/schemas/pineconeChatExtensionConfiguration" + azureChatExtensionType: + type: string + description: |2- + A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat + completions request that should use Azure OpenAI chat extensions to augment the response behavior. + The use of this configuration is compatible only with Azure OpenAI. + enum: + - azure_search + - azure_cosmos_db + - elasticsearch + - mongo_db + - pinecone + x-ms-enum: + name: AzureChatExtensionType + modelAsString: true + values: + - name: azureSearch + value: azure_search + description: Represents the use of Azure Search as an Azure OpenAI chat extension. + - name: azureCosmosDB + value: azure_cosmos_db + description: Represents the use of Azure Cosmos DB as an Azure OpenAI chat extension. + - name: elasticsearch + value: elasticsearch + description: Represents the use of Elasticsearch® index as an Azure OpenAI chat extension. + - name: mongoDB + value: mongo_db + description: Represents the use of Mongo DB as an Azure OpenAI chat extension. + - name: pinecone + value: pinecone + description: Represents the use of Pinecone index as an Azure OpenAI chat extension. + azureSearchChatExtensionConfiguration: + required: + - parameters + description: |- + A specific representation of configurable options for Azure Search when using it as an Azure OpenAI chat + extension. + allOf: + - $ref: "#/components/schemas/azureChatExtensionConfiguration" + - properties: + parameters: + $ref: "#/components/schemas/azureSearchChatExtensionParameters" + x-ms-discriminator-value: azure_search + azureSearchChatExtensionParameters: + required: + - authentication + - endpoint + - index_name + type: object + properties: + authentication: + oneOf: + - $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions" + - $ref: "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions" + - $ref: "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions" + - $ref: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions" + top_n_documents: + type: integer + description: The configured top number of documents to feature for the configured query. + format: int32 + max_search_queries: + type: integer + description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send. + format: int32 + allow_partial_result: + type: boolean + default: false + description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails. + in_scope: + type: boolean + description: Whether queries should be restricted to use of indexed data. + strictness: + maximum: 5 + minimum: 1 + type: integer + description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer. + format: int32 + endpoint: + type: string + description: The absolute endpoint path for the Azure Search resource to use. + format: uri + index_name: + type: string + description: The name of the index to use as available in the referenced Azure Search resource. + fields_mapping: + $ref: "#/components/schemas/azureSearchIndexFieldMappingOptions" + query_type: + $ref: "#/components/schemas/azureSearchQueryType" + semantic_configuration: + type: string + description: The additional semantic configuration for the query. + filter: + type: string + description: Search filter. + embedding_dependency: + oneOf: + - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource" + - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + - $ref: "#/components/schemas/onYourDataIntegratedVectorizationSource" + include_contexts: + type: array + description: The included properties of the output context. If not specified, the default value is `citations` and `intent`. + items: + $ref: "#/components/schemas/onYourDataContextProperty" + description: Parameters for Azure Search when used as an Azure OpenAI chat extension. + azureSearchIndexFieldMappingOptions: + type: object + properties: + title_field: + type: string + description: The name of the index field to use as a title. + url_field: + type: string + description: The name of the index field to use as a URL. + filepath_field: + type: string + description: The name of the index field to use as a filepath. + content_fields: + type: array + description: The names of index fields that should be treated as content. + items: + type: string + content_fields_separator: + type: string + description: The separator pattern that content fields should use. + vector_fields: + type: array + description: The names of fields that represent vector data. + items: + type: string + image_vector_fields: + type: array + description: The names of fields that represent image vector data. + items: + type: string + description: Optional settings to control how fields are processed when using a configured Azure Search resource. + azureSearchQueryType: + type: string + description: The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension. + enum: + - simple + - semantic + - vector + - vector_simple_hybrid + - vector_semantic_hybrid + x-ms-enum: + name: AzureSearchQueryType + modelAsString: true + values: + - name: simple + value: simple + description: Represents the default, simple query parser. + - name: semantic + value: semantic + description: Represents the semantic query parser for advanced semantic modeling. + - name: vector + value: vector + description: Represents vector search over computed data. + - name: vectorSimpleHybrid + value: vector_simple_hybrid + description: Represents a combination of the simple query strategy with vector data. + - name: vectorSemanticHybrid + value: vector_semantic_hybrid + description: Represents a combination of semantic search and vector data querying. + azureCosmosDBChatExtensionConfiguration: + required: + - parameters + description: |- + A specific representation of configurable options for Azure Cosmos DB when using it as an Azure OpenAI chat + extension. + allOf: + - $ref: "#/components/schemas/azureChatExtensionConfiguration" + - properties: + parameters: + $ref: "#/components/schemas/azureCosmosDBChatExtensionParameters" + x-ms-discriminator-value: azure_cosmos_db + azureCosmosDBChatExtensionParameters: + required: + - authentication + - container_name + - database_name + - embedding_dependency + - fields_mapping + - index_name + type: object + properties: + authentication: + $ref: "#/components/schemas/onYourDataConnectionStringAuthenticationOptions" + top_n_documents: + type: integer + description: The configured top number of documents to feature for the configured query. + format: int32 + max_search_queries: + type: integer + description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send. + format: int32 + allow_partial_result: + type: boolean + default: false + description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails. + in_scope: + type: boolean + description: Whether queries should be restricted to use of indexed data. + strictness: + maximum: 5 + minimum: 1 + type: integer + description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer. + format: int32 + database_name: + type: string + description: The MongoDB vCore database name to use with Azure Cosmos DB. + container_name: + type: string + description: The name of the Azure Cosmos DB resource container. + index_name: + type: string + description: The MongoDB vCore index name to use with Azure Cosmos DB. + fields_mapping: + $ref: "#/components/schemas/azureCosmosDBFieldMappingOptions" + embedding_dependency: + oneOf: + - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource" + - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + include_contexts: + type: array + description: The included properties of the output context. If not specified, the default value is `citations` and `intent`. + items: + $ref: "#/components/schemas/onYourDataContextProperty" + description: |- + Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Azure Cosmos DB for + MongoDB vCore. + azureCosmosDBFieldMappingOptions: + required: + - content_fields + - vector_fields + type: object + properties: + title_field: + type: string + description: The name of the index field to use as a title. + url_field: + type: string + description: The name of the index field to use as a URL. + filepath_field: + type: string + description: The name of the index field to use as a filepath. + content_fields: + type: array + description: The names of index fields that should be treated as content. + items: + type: string + content_fields_separator: + type: string + description: The separator pattern that content fields should use. + vector_fields: + type: array + description: The names of fields that represent vector data. + items: + type: string + description: Optional settings to control how fields are processed when using a configured Azure Cosmos DB resource. + elasticsearchChatExtensionConfiguration: + required: + - parameters + description: |- + A specific representation of configurable options for Elasticsearch when using it as an Azure OpenAI chat + extension. + allOf: + - $ref: "#/components/schemas/azureChatExtensionConfiguration" + - properties: + parameters: + $ref: "#/components/schemas/elasticsearchChatExtensionParameters" + x-ms-discriminator-value: elasticsearch + elasticsearchChatExtensionParameters: + required: + - authentication + - endpoint + - index_name + type: object + properties: + authentication: + oneOf: + - $ref: "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions" + - $ref: "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions" + top_n_documents: + type: integer + description: The configured top number of documents to feature for the configured query. + format: int32 + max_search_queries: + type: integer + description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send. + format: int32 + allow_partial_result: + type: boolean + default: false + description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails. + in_scope: + type: boolean + description: Whether queries should be restricted to use of indexed data. + strictness: + maximum: 5 + minimum: 1 + type: integer + description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer. + format: int32 + endpoint: + type: string + description: The endpoint of Elasticsearch®. + format: uri + index_name: + type: string + description: The index name of Elasticsearch®. + fields_mapping: + $ref: "#/components/schemas/elasticsearchIndexFieldMappingOptions" + query_type: + $ref: "#/components/schemas/elasticsearchQueryType" + embedding_dependency: + oneOf: + - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource" + - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + - $ref: "#/components/schemas/onYourDataModelIdVectorizationSource" + include_contexts: + type: array + description: The included properties of the output context. If not specified, the default value is `citations` and `intent`. + items: + $ref: "#/components/schemas/onYourDataContextProperty" + description: "Parameters to use when configuring Elasticsearch® as an Azure OpenAI chat extension. " + elasticsearchIndexFieldMappingOptions: + type: object + properties: + title_field: + type: string + description: The name of the index field to use as a title. + url_field: + type: string + description: The name of the index field to use as a URL. + filepath_field: + type: string + description: The name of the index field to use as a filepath. + content_fields: + type: array + description: The names of index fields that should be treated as content. + items: + type: string + content_fields_separator: + type: string + description: The separator pattern that content fields should use. + vector_fields: + type: array + description: The names of fields that represent vector data. + items: + type: string + description: Optional settings to control how fields are processed when using a configured Elasticsearch® resource. + elasticsearchQueryType: + type: string + description: The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension. + enum: + - simple + - vector + x-ms-enum: + name: ElasticsearchQueryType + modelAsString: true + values: + - name: simple + value: simple + description: Represents the default, simple query parser. + - name: vector + value: vector + description: Represents vector search over computed data. + mongoDBChatExtensionConfiguration: + required: + - parameters + description: |- + A specific representation of configurable options for Mongo DB when using it as an Azure OpenAI chat + extension. + allOf: + - $ref: "#/components/schemas/azureChatExtensionConfiguration" + - properties: + parameters: + $ref: "#/components/schemas/mongoDBChatExtensionParameters" + x-ms-discriminator-value: mongo_db + mongoDBChatExtensionParameters: + required: + - authentication + - app_name + - collection_name + - database_name + - endpoint + - embedding_dependency + - fields_mapping + - index_name + type: object + properties: + authentication: + $ref: "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions" + top_n_documents: + type: integer + description: The configured top number of documents to feature for the configured query. + format: int32 + max_search_queries: + type: integer + description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send. + format: int32 + allow_partial_result: + type: boolean + default: false + description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails. + in_scope: + type: boolean + description: Whether queries should be restricted to use of indexed data. + strictness: + maximum: 5 + minimum: 1 + type: integer + description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer. + format: int32 + endpoint: + type: string + description: The name of the Mongo DB cluster endpoint. + database_name: + type: string + description: The name of the Mongo DB database. + collection_name: + type: string + description: The name of the Mongo DB Collection. + app_name: + type: string + description: The name of the Mongo DB Application. + index_name: + type: string + description: The The name of the Mongo DB index. + fields_mapping: + $ref: "#/components/schemas/mongoDBFieldMappingOptions" + embedding_dependency: + oneOf: + - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource" + - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + include_contexts: + type: array + description: The included properties of the output context. If not specified, the default value is `citations` and `intent`. + items: + $ref: "#/components/schemas/onYourDataContextProperty" + description: |- + Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Mongo DB. + + mongoDBFieldMappingOptions: + required: + - content_fields + - vector_fields + type: object + properties: + title_field: + type: string + description: The name of the index field to use as a title. + url_field: + type: string + description: The name of the index field to use as a URL. + filepath_field: + type: string + description: The name of the index field to use as a filepath. + content_fields: + type: array + description: The names of index fields that should be treated as content. + items: + type: string + content_fields_separator: + type: string + description: The separator pattern that content fields should use. + vector_fields: + type: array + description: The names of fields that represent vector data. + items: + type: string + description: Optional settings to control how fields are processed when using a configured Mongo DB resource. + + pineconeChatExtensionConfiguration: + required: + - parameters + description: |- + A specific representation of configurable options for Pinecone when using it as an Azure OpenAI chat + extension. + allOf: + - $ref: "#/components/schemas/azureChatExtensionConfiguration" + - properties: + parameters: + $ref: "#/components/schemas/pineconeChatExtensionParameters" + x-ms-discriminator-value: pinecone + pineconeChatExtensionParameters: + required: + - authentication + - embedding_dependency + - environment + - fields_mapping + - index_name + type: object + properties: + authentication: + $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions" + top_n_documents: + type: integer + description: The configured top number of documents to feature for the configured query. + format: int32 + max_search_queries: + type: integer + description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send. + format: int32 + allow_partial_result: + type: boolean + default: false + description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails. + in_scope: + type: boolean + description: Whether queries should be restricted to use of indexed data. + strictness: + maximum: 5 + minimum: 1 + type: integer + description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer. + format: int32 + environment: + type: string + description: The environment name of Pinecone. + index_name: + type: string + description: The name of the Pinecone database index. + fields_mapping: + $ref: "#/components/schemas/pineconeFieldMappingOptions" + embedding_dependency: + $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + include_contexts: + type: array + description: The included properties of the output context. If not specified, the default value is `citations` and `intent`. + items: + $ref: "#/components/schemas/onYourDataContextProperty" + description: Parameters for configuring Azure OpenAI Pinecone chat extensions. + pineconeFieldMappingOptions: + required: + - content_fields + type: object + properties: + title_field: + type: string + description: The name of the index field to use as a title. + url_field: + type: string + description: The name of the index field to use as a URL. + filepath_field: + type: string + description: The name of the index field to use as a filepath. + content_fields: + type: array + description: The names of index fields that should be treated as content. + items: + type: string + content_fields_separator: + type: string + description: The separator pattern that content fields should use. + description: Optional settings to control how fields are processed when using a configured Pinecone resource. + onYourDataAuthenticationOptions: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/onYourDataAuthenticationType" + description: The authentication options for Azure OpenAI On Your Data. + discriminator: + propertyName: type + mapping: + api_key: "#/components/schemas/onYourDataApiKeyAuthenticationOptions" + connection_string: "#/components/schemas/onYourDataConnectionStringAuthenticationOptions" + key_and_key_id: "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions" + encoded_api_key: "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions" + access_token: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions" + system_assigned_managed_identity: "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions" + user_assigned_managed_identity: "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions" + username_and_password: "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions" + onYourDataContextProperty: + type: string + description: The context property. + enum: + - citations + - intent + - all_retrieved_documents + x-ms-enum: + name: OnYourDataContextProperty + modelAsString: true + values: + - name: citations + value: citations + description: The `citations` property. + - name: intent + value: intent + description: The `intent` property. + - name: allRetrievedDocuments + value: all_retrieved_documents + description: The `all_retrieved_documents` property. + onYourDataAuthenticationType: + type: string + description: The authentication types supported with Azure OpenAI On Your Data. + enum: + - api_key + - connection_string + - key_and_key_id + - encoded_api_key + - access_token + - system_assigned_managed_identity + - user_assigned_managed_identity + - username_and_password + x-ms-enum: + name: OnYourDataAuthenticationType + modelAsString: true + values: + - name: apiKey + value: api_key + description: Authentication via API key. + - name: connectionString + value: connection_string + description: Authentication via connection string. + - name: keyAndKeyId + value: key_and_key_id + description: Authentication via key and key ID pair. + - name: encodedApiKey + value: encoded_api_key + description: Authentication via encoded API key. + - name: accessToken + value: access_token + description: Authentication via access token. + - name: systemAssignedManagedIdentity + value: system_assigned_managed_identity + description: Authentication via system-assigned managed identity. + - name: userAssignedManagedIdentity + value: user_assigned_managed_identity + description: Authentication via user-assigned managed identity. + - name: usernameAndPassword + value: username_and_password + description: Authentication via username and password. + onYourDataApiKeyAuthenticationOptions: + required: + - key + description: The authentication options for Azure OpenAI On Your Data when using an API key. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + - properties: + key: + type: string + description: The API key to use for authentication. + x-ms-discriminator-value: api_key + onYourDataConnectionStringAuthenticationOptions: + required: + - connection_string + description: The authentication options for Azure OpenAI On Your Data when using a connection string. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + - properties: + connection_string: + type: string + description: The connection string to use for authentication. + x-ms-discriminator-value: connection_string + onYourDataKeyAndKeyIdAuthenticationOptions: + required: + - key + - key_id + description: The authentication options for Azure OpenAI On Your Data when using an Elasticsearch key and key ID pair. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + - properties: + key: + type: string + description: The Elasticsearch key to use for authentication. + key_id: + type: string + description: The Elasticsearch key ID to use for authentication. + x-ms-discriminator-value: key_and_key_id + onYourDataEncodedApiKeyAuthenticationOptions: + required: + - encoded_api_key + description: The authentication options for Azure OpenAI On Your Data when using an Elasticsearch encoded API key. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + - properties: + encoded_api_key: + type: string + description: The Elasticsearch encoded API key to use for authentication. + x-ms-discriminator-value: encoded_api_key + onYourDataAccessTokenAuthenticationOptions: + required: + - access_token + description: The authentication options for Azure OpenAI On Your Data when using access token. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + - properties: + access_token: + type: string + description: The access token to use for authentication. + x-ms-discriminator-value: access_token + onYourDataSystemAssignedManagedIdentityAuthenticationOptions: + description: The authentication options for Azure OpenAI On Your Data when using a system-assigned managed identity. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + x-ms-discriminator-value: system_assigned_managed_identity + onYourDataUserAssignedManagedIdentityAuthenticationOptions: + required: + - managed_identity_resource_id + description: The authentication options for Azure OpenAI On Your Data when using a user-assigned managed identity. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + - properties: + managed_identity_resource_id: + type: string + description: The resource ID of the user-assigned managed identity to use for authentication. + x-ms-discriminator-value: user_assigned_managed_identity + onYourDataUsernameAndPasswordAuthenticationOptions: + required: + - username + - password + description: The authentication options for Azure OpenAI On Your Data when using a username and a password. + allOf: + - $ref: "#/components/schemas/onYourDataAuthenticationOptions" + - properties: + username: + type: string + description: The username to use for authentication. + password: + type: string + description: The password. to use for authentication. + x-ms-discriminator-value: username_and_password + onYourDataVectorizationSource: + required: + - type + type: object + properties: + type: + $ref: "#/components/schemas/onYourDataVectorizationSourceType" + description: An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search. + discriminator: + propertyName: type + mapping: + endpoint: "#/components/schemas/onYourDataEndpointVectorizationSource" + deployment_name: "#/components/schemas/onYourDataDeploymentNameVectorizationSource" + integrated: "#/components/schemas/onYourDataIntegratedVectorizationSource" + model_id: "#/components/schemas/onYourDataModelIdVectorizationSource" + onYourDataVectorizationSourceType: + type: string + description: |- + Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with + vector search. + enum: + - endpoint + - deployment_name + - integrated + - model_id + x-ms-enum: + name: OnYourDataVectorizationSourceType + modelAsString: true + values: + - name: endpoint + value: endpoint + description: Represents vectorization performed by public service calls to an Azure OpenAI embedding model. + - name: deploymentName + value: deployment_name + description: |- + Represents an Ada model deployment name to use. This model deployment must be in the same Azure OpenAI resource, but + On Your Data will use this model deployment via an internal call rather than a public one, which enables vector + search even in private networks. + - name: integrated + value: integrated + description: Represents the integrated vectorizer defined within the search resource. + - name: modelId + value: model_id + description: |- + Represents a specific embedding model ID as defined in the search service. + Currently only supported by Elasticsearch®. + onYourDataEndpointVectorizationSource: + required: + - authentication + - endpoint + description: |- + The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based + on a public Azure OpenAI endpoint call for embeddings. + allOf: + - $ref: "#/components/schemas/onYourDataVectorizationSource" + - properties: + endpoint: + type: string + description: Specifies the resource endpoint URL from which embeddings should be retrieved. It should be in the format of https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/embeddings. The api-version query parameter is not allowed. + format: uri + authentication: + oneOf: + - $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions" + - $ref: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions" + dimensions: + type: integer + description: The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models. + format: int32 + x-ms-discriminator-value: endpoint + onYourDataDeploymentNameVectorizationSource: + required: + - deployment_name + description: |- + The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based + on an internal embeddings model deployment name in the same Azure OpenAI resource. + allOf: + - $ref: "#/components/schemas/onYourDataVectorizationSource" + - properties: + deployment_name: + type: string + description: Specifies the name of the model deployment to use for vectorization. This model deployment must be in the same Azure OpenAI resource, but On Your Data will use this model deployment via an internal call rather than a public one, which enables vector search even in private networks. + dimensions: + type: integer + description: The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models. + format: int32 + x-ms-discriminator-value: deployment_name + onYourDataIntegratedVectorizationSource: + description: |- + Represents the integrated vectorizer defined within the search resource. + allOf: + - $ref: "#/components/schemas/onYourDataVectorizationSource" + x-ms-discriminator-value: integrated + onYourDataModelIdVectorizationSource: + required: + - model_id + description: |- + The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based + on a search service model ID. Currently only supported by Elasticsearch®. + allOf: + - $ref: "#/components/schemas/onYourDataVectorizationSource" + - properties: + model_id: + type: string + description: Specifies the model ID to use for vectorization. This model ID must be defined in the search service. + x-ms-discriminator-value: model_id + azureChatExtensionsMessageContext: + type: object + properties: + citations: + type: array + description: The data source retrieval result, used to generate the assistant message in the response. + items: + $ref: "#/components/schemas/citation" + x-ms-identifiers: [] + intent: + type: string + description: The detected intent from the chat history, used to pass to the next turn to carry over the context. + all_retrieved_documents: + type: array + description: All the retrieved documents. + items: + $ref: "#/components/schemas/retrievedDocument" + + description: |2- + A representation of the additional context information available when Azure OpenAI chat extensions are involved + in the generation of a corresponding chat completions response. This context information is only populated when + using an Azure OpenAI request configured to use a matching extension. + citation: + required: + - content + type: object + properties: + content: + type: string + description: The content of the citation. + title: + type: string + description: The title of the citation. + url: + type: string + description: The URL of the citation. + filepath: + type: string + description: The file path of the citation. + chunk_id: + type: string + description: The chunk ID of the citation. + rerank_score: + type: number + description: The rerank score of the retrieved document. + format: double + description: citation information for a chat completions response message. + retrievedDocument: + type: object + description: The retrieved document. + required: + - search_queries + - data_source_index + allOf: + - $ref: "#/components/schemas/citation" + - properties: + search_queries: + type: array + description: The search queries used to retrieve the document. + items: + type: string + data_source_index: + type: integer + description: The index of the data source. + format: int32 + original_search_score: + type: number + description: The original search score of the retrieved document. + format: double + filter_reason: + $ref: "#/components/schemas/filterReason" + description: Represents the rationale for filtering the document. If the document does not undergo filtering, this field will remain unset. + + filterReason: + type: string + description: The filtering reason of the retrieved document. + enum: + - score + - rerank + x-ms-enum: + name: FilterReason + modelAsString: true + values: + - name: score + value: score + description: The document is filtered by original search score threshold defined by `strictness` configure. + - name: rerank + value: rerank + description: The document is not filtered by original search score threshold, but is filtered by rerank score and `top_n_documents` configure. + + chatCompletionMessageToolCall: + type: object + properties: + id: + type: string + description: The ID of the tool call. + type: + $ref: "#/components/schemas/toolCallType" + function: + type: object + description: The function that the model called. + properties: + name: + type: string + description: The name of the function to call. + arguments: + type: string + description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + required: + - name + - arguments + required: + - id + - type + - function + toolCallType: + type: string + enum: + - function + description: The type of the tool call, in this case `function`. + x-ms-enum: + name: ToolCallType + modelAsString: true + values: + - value: function + description: The tool call type is function. + chatCompletionRequestMessageTool: + allOf: + - $ref: "#/components/schemas/chatCompletionRequestMessage" + - type: object + nullable: true + properties: + tool_call_id: + type: string + description: Tool call that this message is responding to. + content: + type: string + description: The contents of the message. + nullable: true + required: + - tool_call_id + - content + chatCompletionRequestMessageFunction: + allOf: + - $ref: "#/components/schemas/chatCompletionRequestMessage" + - type: object + description: Deprecated. Message that represents a function. + nullable: true + properties: + role: + type: string + enum: + - function + description: The role of the messages author, in this case `function`. + name: + type: string + description: The contents of the message. + content: + type: string + description: The contents of the message. + nullable: true + required: + - function_call_id + - content + createChatCompletionResponse: + type: object + description: Represents a chat completion response returned by model, based on the provided input. + properties: + id: + type: string + description: A unique identifier for the chat completion. + prompt_filter_results: + $ref: "#/components/schemas/promptFilterResults" + choices: + type: array + description: A list of chat completion choices. Can be more than one if `n` is greater than 1. + items: + type: object + required: + - finish_reason + - index + - message + - logprobs + properties: + finish_reason: + type: string + description: &chat_completion_finish_reason_description | + The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, + `length` if the maximum number of tokens specified in the request was reached, + `content_filter` if content was omitted due to a flag from our content filters, + `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. + enum: + [ + "stop", + "length", + "tool_calls", + "content_filter", + "function_call", + ] + index: + type: integer + description: The index of the choice in the list of choices. + message: + $ref: "#/components/schemas/chatCompletionResponseMessage" + content_filter_results: + $ref: "#/components/schemas/contentFilterChoiceResults" + logprobs: &chat_completion_response_logprobs + description: Log probability information for the choice. + type: object + nullable: true + properties: + content: + description: A list of message content tokens with log probability information. + type: array + items: + $ref: "#/components/schemas/chatCompletionTokenLogprob" + nullable: true + refusal: + description: A list of message refusal tokens with log probability information. + type: array + items: + $ref: "#/components/schemas/chatCompletionTokenLogprob" + nullable: true + required: + - content + - refusal + created: + type: integer + description: The Unix timestamp (in seconds) of when the chat completion was created. + model: + type: string + description: The model used for the chat completion. + system_fingerprint: + type: string + description: | + This fingerprint represents the backend configuration that the model runs with. + + Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. + object: + type: string + description: The object type, which is always `chat.completion`. + enum: [chat.completion] + usage: + $ref: "#/components/schemas/completionUsage" + required: + - choices + - created + - id + - model + - object + + createChatCompletionStreamResponse: + type: object + description: Represents a streamed chunk of a chat completion response returned by model, based on the provided input. + properties: + id: + type: string + description: A unique identifier for the chat completion. Each chunk has the same ID. + choices: + type: array + description: | + A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. + items: + type: object + required: + - delta + - finish_reason + - index + properties: + delta: + $ref: "#/components/schemas/chatCompletionStreamResponseDelta" + logprobs: *chat_completion_response_logprobs + finish_reason: + type: string + description: *chat_completion_finish_reason_description + enum: + [ + "stop", + "length", + "tool_calls", + "content_filter", + "function_call", + ] + nullable: true + index: + type: integer + description: The index of the choice in the list of choices. + created: + type: integer + description: The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp. + model: + type: string + description: The model to generate the completion. + system_fingerprint: + type: string + description: | + This fingerprint represents the backend configuration that the model runs with. + Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. + object: + type: string + description: The object type, which is always `chat.completion.chunk`. + enum: [chat.completion.chunk] + required: + - prompt_tokens + - completion_tokens + - total_tokens + required: + - choices + - created + - id + - model + - object + + chatCompletionStreamResponseDelta: + type: object + description: A chat completion delta generated by streamed model responses. + properties: + content: + type: string + description: The contents of the chunk message. + nullable: true + function_call: + deprecated: true + type: object + description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model." + properties: + arguments: + type: string + description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + name: + type: string + description: The name of the function to call. + tool_calls: + type: array + items: + $ref: "#/components/schemas/chatCompletionMessageToolCallChunk" + role: + type: string + enum: ["system", "user", "assistant", "tool"] + description: The role of the author of this message. + refusal: + type: string + description: The refusal message generated by the model. + nullable: true + + chatCompletionMessageToolCallChunk: + type: object + properties: + index: + type: integer + id: + type: string + description: The ID of the tool call. + type: + type: string + enum: ["function"] + description: The type of the tool. Currently, only `function` is supported. + function: + type: object + properties: + name: + type: string + description: The name of the function to call. + arguments: + type: string + description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + required: + - index + + chatCompletionStreamOptions: + description: | + Options for streaming response. Only set this when you set `stream: true`. + type: object + nullable: true + default: null + properties: + include_usage: + type: boolean + description: | + If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value. + + chatCompletionChoiceLogProbs: + description: Log probability information for the choice. + type: object + nullable: true + properties: + content: + description: A list of message content tokens with log probability information. + type: array + items: + $ref: "#/components/schemas/chatCompletionTokenLogprob" + nullable: true + refusal: + description: A list of message refusal tokens with log probability information. + type: array + items: + $ref: "#/components/schemas/chatCompletionTokenLogprob" + nullable: true + required: + - content + chatCompletionTokenLogprob: + type: object + properties: + token: + description: The token. + type: string + logprob: + description: The log probability of this token. + type: number + bytes: + description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. + type: array + items: + type: integer + nullable: true + top_logprobs: + description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. + type: array + items: + type: object + properties: + token: + description: The token. + type: string + logprob: + description: The log probability of this token. + type: number + bytes: + description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. + type: array + items: + type: integer + nullable: true + required: + - token + - logprob + - bytes + required: + - token + - logprob + - bytes + - top_logprobs + + chatCompletionResponseMessage: + type: object + description: A chat completion message generated by the model. + properties: + role: + $ref: "#/components/schemas/chatCompletionResponseMessageRole" + refusal: + type: string + description: The refusal message generated by the model. + nullable: true + content: + type: string + description: The contents of the message. + nullable: true + tool_calls: + type: array + description: The tool calls generated by the model, such as function calls. + items: + $ref: "#/components/schemas/chatCompletionMessageToolCall" + function_call: + $ref: "#/components/schemas/chatCompletionFunctionCall" + context: + $ref: "#/components/schemas/azureChatExtensionsMessageContext" + required: + - role + - content + - refusal + chatCompletionResponseMessageRole: + type: string + enum: + - assistant + description: The role of the author of the response message. + chatCompletionToolChoiceOption: + description: | + Controls which (if any) tool is called by the model. + `none` means the model will not call any tool and instead generates a message. + `auto` means the model can pick between generating a message or calling one or more tools. + `required` means the model must call one or more tools. + Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. + `none` is the default when no tools are present. `auto` is the default if tools are present. + oneOf: + - type: string + description: > + `none` means the model will not call any tool and instead generates a message. + `auto` means the model can pick between generating a message or calling one or more tools. + `required` means the model must call one or more tools. + enum: + - none + - auto + - required + - $ref: "#/components/schemas/chatCompletionNamedToolChoice" + chatCompletionNamedToolChoice: + type: object + description: Specifies a tool the model should use. Use to force the model to call a specific function. + properties: + type: + type: string + enum: + - "function" + description: The type of the tool. Currently, only `function` is supported. + function: + type: object + properties: + name: + type: string + description: The name of the function to call. + required: + - name + required: + - type + - function + + ParallelToolCalls: + description: Whether to enable parallel function calling during tool use. + type: boolean + default: true + + chatCompletionMessageToolCalls: + type: array + description: The tool calls generated by the model, such as function calls. + items: + $ref: "#/components/schemas/chatCompletionMessageToolCall" + + chatCompletionFunctionCall: + type: object + description: Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. + properties: + name: + type: string + description: The name of the function to call. + arguments: + type: string + description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. + required: + - name + - arguments + completionUsage: + type: object + description: Usage statistics for the completion request. + properties: + prompt_tokens: + type: integer + description: Number of tokens in the prompt. + completion_tokens: + type: integer + description: Number of tokens in the generated completion. + total_tokens: + type: integer + description: Total number of tokens used in the request (prompt + completion). + prompt_tokens_details: + type: object + description: Details of the prompt tokens. + properties: + cached_tokens: + type: integer + description: The number of cached prompt tokens. + completion_tokens_details: + type: object + description: Breakdown of tokens used in a completion. + properties: + reasoning_tokens: + type: integer + description: Tokens generated by the model for reasoning. + required: + - prompt_tokens + - completion_tokens + - total_tokens + chatCompletionTool: + type: object + properties: + type: + type: string + enum: ["function"] + description: The type of the tool. Currently, only `function` is supported. + function: + $ref: "#/components/schemas/FunctionObject" + required: + - type + - function + + FunctionParameters: + type: object + description: "The parameters the functions accepts, described as a JSON Schema object. See the guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/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." + additionalProperties: true + + FunctionObject: + type: object + properties: + description: + type: string + description: A description of what the function does, used by the model to choose when and how to call the function. + name: + type: string + description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + parameters: + $ref: "#/components/schemas/FunctionParameters" + strict: + type: boolean + nullable: true + 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](docs/guides/function-calling). + required: + - name + + ResponseFormatText: + type: object + properties: + type: + type: string + description: "The type of response format being defined: `text`" + enum: + - text + required: + - type + + ResponseFormatJsonObject: + type: object + properties: + type: + type: string + description: "The type of response format being defined: `json_object`" + enum: + - json_object + required: + - type + + ResponseFormatJsonSchemaSchema: + type: object + description: "The schema for the response format, described as a JSON Schema object." + additionalProperties: true + + ResponseFormatJsonSchema: + type: object + properties: + type: + type: string + description: "The type of response format being defined: `json_schema`" + enum: + - json_schema + json_schema: + type: object + properties: + description: + type: string + description: A description of what the response format is for, used by the model to determine how to respond in the format. + name: + type: string + description: The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + schema: + $ref: "#/components/schemas/ResponseFormatJsonSchemaSchema" + strict: + type: boolean + nullable: true + default: false + description: 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`. + required: + - schema + - name + required: + - type + - json_schema + + chatCompletionChoiceCommon: + type: object + properties: + index: + type: integer + finish_reason: + type: string + createTranslationRequest: + type: object + description: Translation request. + properties: + file: + type: string + description: The audio file to translate. + format: binary + prompt: + type: string + description: An optional text to guide the model's style or continue a previous audio segment. The prompt should be in English. + response_format: + $ref: "#/components/schemas/audioResponseFormat" + temperature: + type: number + default: 0 + description: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. + required: + - file + audioResponse: + description: Translation or transcription response when response_format was json + type: object + properties: + text: + type: string + description: Translated or transcribed text. + required: + - text + audioVerboseResponse: + description: Translation or transcription response when response_format was verbose_json + type: object + allOf: + - $ref: "#/components/schemas/audioResponse" + - properties: + task: + type: string + description: Type of audio task. + enum: + - transcribe + - translate + x-ms-enum: + modelAsString: true + language: + type: string + description: Language. + duration: + type: number + description: Duration. + segments: + type: array + items: + $ref: "#/components/schemas/audioSegment" + words: + type: array + items: + $ref: "#/components/schemas/audioWord" + + required: + - text + audioResponseFormat: + title: AudioResponseFormat + description: Defines the format of the output. + enum: + - json + - text + - srt + - verbose_json + - vtt + type: string + x-ms-enum: + modelAsString: true + createTranscriptionRequest: + type: object + description: Transcription request. + properties: + file: + type: string + description: The audio file object to transcribe. + format: binary + prompt: + type: string + description: An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. + response_format: + $ref: "#/components/schemas/audioResponseFormat" + temperature: + type: number + default: 0 + description: The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit. + language: + type: string + description: The language of the input audio. Supplying the input language in ISO-639-1 format will improve accuracy and latency. + timestamp_granularities[]: + description: | + The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency. + type: array + items: + type: string + enum: + - word + - segment + default: [segment] + required: + - file + audioSegment: + type: object + description: Transcription or translation segment. + properties: + id: + type: integer + description: Segment identifier. + seek: + type: number + description: Offset of the segment. + start: + type: number + description: Segment start offset. + end: + type: number + description: Segment end offset. + text: + type: string + description: Segment text. + tokens: + type: array + items: + type: number + nullable: false + description: Tokens of the text. + temperature: + type: number + description: Temperature. + avg_logprob: + type: number + description: Average log probability. + compression_ratio: + type: number + description: Compression ratio. + no_speech_prob: + type: number + description: Probability of 'no speech'. + audioWord: + type: object + description: Transcription or translation word. + properties: + word: + type: string + description: Word + start: + type: number + description: Word start offset. + end: + type: number + description: Word end offset. + createSpeechRequest: + type: object + description: Speech request. + properties: + input: + type: string + description: The text to synthesize audio for. The maximum length is 4096 characters. + maxLength: 4096 + voice: + type: string + description: The voice to use for speech synthesis. + enum: + - alloy + - echo + - fable + - onyx + - nova + - shimmer + response_format: + type: string + description: The format to synthesize the audio in. + enum: + - mp3 + - opus + - aac + - flac + - wav + - pcm + speed: + description: The speed of the synthesize audio. Select a value from `0.25` to `4.0`. `1.0` is the default. + type: number + default: 1 + minimum: 0.25 + maximum: 4 + required: + - input + - voice + imageQuality: + description: The quality of the image that will be generated. + type: string + enum: + - standard + - hd + default: standard + x-ms-enum: + name: Quality + modelAsString: true + values: + - value: standard + description: Standard quality creates images with standard quality. + name: Standard + - value: hd + description: HD quality creates images with finer details and greater consistency across the image. + name: HD + imagesResponseFormat: + description: The format in which the generated images are returned. + type: string + enum: + - url + - b64_json + default: url + x-ms-enum: + name: ImagesResponseFormat + modelAsString: true + values: + - value: url + description: The URL that provides temporary access to download the generated images. + name: Url + - value: b64_json + description: The generated images are returned as base64 encoded string. + name: Base64Json + imageSize: + description: The size of the generated images. + type: string + enum: + - 256x256 + - 512x512 + - 1792x1024 + - 1024x1792 + - 1024x1024 + default: 1024x1024 + x-ms-enum: + name: Size + modelAsString: true + values: + - value: 256x256 + description: The desired size of the generated image is 256x256 pixels. Only supported for dall-e-2. + name: Size256x256 + - value: 512x512 + description: The desired size of the generated image is 512x512 pixels. Only supported for dall-e-2. + name: Size512x512 + - value: 1792x1024 + description: The desired size of the generated image is 1792x1024 pixels. Only supported for dall-e-3. + name: Size1792x1024 + - value: 1024x1792 + description: The desired size of the generated image is 1024x1792 pixels. Only supported for dall-e-3. + name: Size1024x1792 + - value: 1024x1024 + description: The desired size of the generated image is 1024x1024 pixels. + name: Size1024x1024 + imageStyle: + description: The style of the generated images. + type: string + enum: + - vivid + - natural + default: vivid + x-ms-enum: + name: Style + modelAsString: true + values: + - value: vivid + description: Vivid creates images that are hyper-realistic and dramatic. + name: Vivid + - value: natural + description: Natural creates images that are more natural and less hyper-realistic. + name: Natural + imageGenerationsRequest: + type: object + properties: + prompt: + description: A text description of the desired image(s). The maximum length is 4000 characters. + type: string + format: string + example: a corgi in a field + minLength: 1 + "n": + description: The number of images to generate. + type: integer + minimum: 1 + maximum: 1 + default: 1 + size: + $ref: "#/components/schemas/imageSize" + response_format: + $ref: "#/components/schemas/imagesResponseFormat" + user: + description: A unique identifier representing your end-user, which can help to monitor and detect abuse. + type: string + format: string + example: user123456 + quality: + $ref: "#/components/schemas/imageQuality" + style: + $ref: "#/components/schemas/imageStyle" + required: + - prompt + generateImagesResponse: + type: object + properties: + created: + type: integer + format: unixtime + description: The unix timestamp when the operation was created. + example: "1676540381" + data: + type: array + description: The result data of the operation, if successful + items: + $ref: "#/components/schemas/imageResult" + required: + - created + - data + imageResult: + type: object + description: The image url or encoded image if successful, and an error otherwise. + properties: + url: + type: string + description: The image url. + example: https://www.contoso.com + b64_json: + type: string + description: The base64 encoded image + content_filter_results: + $ref: "#/components/schemas/dalleContentFilterResults" + revised_prompt: + type: string + description: The prompt that was used to generate the image, if there was any revision to the prompt. + prompt_filter_results: + $ref: "#/components/schemas/dalleFilterResults" + line: + type: object + description: A content line object consisting of an adjacent sequence of content elements, such as words and selection marks. + properties: + text: + type: string + spans: + type: array + description: An array of spans that represent detected objects and its bounding box information. + items: + $ref: "#/components/schemas/span" + required: + - text + - spans + span: + type: object + description: A span object that represents a detected object and its bounding box information. + properties: + text: + type: string + description: The text content of the span that represents the detected object. + offset: + type: integer + description: The character offset within the text where the span begins. This offset is defined as the position of the first character of the span, counting from the start of the text as Unicode codepoints. + length: + type: integer + description: The length of the span in characters, measured in Unicode codepoints. + polygon: + type: array + description: An array of objects representing points in the polygon that encloses the detected object. + items: + type: object + properties: + x: + type: number + description: The x-coordinate of the point. + "y": + type: number + description: The y-coordinate of the point. + required: + - text + - offset + - length + - polygon + + runCompletionUsage: + type: object + description: Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). + properties: + completion_tokens: + type: integer + description: Number of completion tokens used over the course of the run. + prompt_tokens: + type: integer + description: Number of prompt tokens used over the course of the run. + total_tokens: + type: integer + description: Total number of tokens used (prompt + completion). + required: + - prompt_tokens + - completion_tokens + - total_tokens + nullable: true + + runStepCompletionUsage: + type: object + description: Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. + properties: + completion_tokens: + type: integer + description: Number of completion tokens used over the course of the run step. + prompt_tokens: + type: integer + description: Number of prompt tokens used over the course of the run step. + total_tokens: + type: integer + description: Total number of tokens used (prompt + completion). + required: + - prompt_tokens + - completion_tokens + - total_tokens + nullable: true + + assistantsApiResponseFormatOption: + description: | + Specifies the format that the model must output. Compatible with + GPT-4o, 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](/docs/guides/structured-outputs). + + Setting to `{ "type": "json_object" }` enables + JSON mode, which ensures the message the model generates is valid JSON. + + **Important:** when using JSON mode, + you **must** also instruct the model to produce JSON yourself + via a system or user message. Without this, the model may + generate an unending stream of whitespace until the generation + reaches the token limit, resulting in a long-running and + seemingly "stuck" request. Also note that the message content + may be partially cut off if `finish_reason="length"`, which indicates + the generation exceeded `max_tokens` or the conversation exceeded + the max context length. + oneOf: + - type: string + description: > + `auto` is the default value + enum: + - auto + x-ms-enum: + name: AssistantsApiResponseFormatOption + modelAsString: true + values: + - value: auto + - $ref: "#/components/schemas/ResponseFormatText" + - $ref: "#/components/schemas/ResponseFormatJsonObject" + - $ref: "#/components/schemas/ResponseFormatJsonSchema" + + assistantsApiResponseFormat: + type: object + description: | + An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run. If `text` the model can return text or any value needed. + properties: + type: + type: string + enum: ["text", "json_object"] + x-ms-enum: + name: AssistantsApiResponseFormat + modelAsString: true + values: + - value: text + - value: json_object + example: "json_object" + default: "text" + description: Must be one of `text` or `json_object`. + + assistantObject: + type: object + title: Assistant + description: Represents an `assistant` that can call the model and use tools. + properties: + id: + description: The identifier, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `assistant`. + type: string + enum: + - assistant + x-ms-enum: + name: AssistantObjectType + modelAsString: true + values: + - value: assistant + created_at: + type: integer + description: The Unix timestamp (in seconds) for when the assistant was created. + name: + description: &assistant_name_param_description | + The name of the assistant. The maximum length is 256 characters. + type: string + maxLength: 256 + nullable: true + description: + description: &assistant_description_param_description | + The description of the assistant. The maximum length is 512 characters. + type: string + maxLength: 512 + nullable: true + model: + description: | + ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them. + type: string + instructions: + description: &assistant_instructions_param_description | + The system instructions that the assistant uses. The maximum length is 256,000 characters. + type: string + maxLength: 256000 + nullable: true + tools: + description: &assistant_tools_param_description | + A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `file_search`, or `function`. + default: [] + type: array + maxItems: 128 + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearch" + - $ref: "#/components/schemas/assistantToolsFunction" + tool_resources: + type: object + description: | + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + properties: + code_interpreter: + type: object + properties: + file_ids: + type: array + description: | + A list of file IDs made available to the `code_interpreter`` tool. There can be a maximum of 20 files associated with the tool. + default: [] + maxItems: 20 + items: + type: string + file_search: + type: object + properties: + vector_store_ids: + type: array + description: | + The ID of the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + maxItems: 1 + items: + type: string + metadata: + description: &metadata_description | + Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. + type: object + nullable: true + temperature: + description: &run_temperature_description | + What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + top_p: + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + description: &run_top_p_description | + An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. + + We generally recommend altering this or temperature but not both. + response_format: + $ref: "#/components/schemas/assistantsApiResponseFormatOption" + nullable: true + required: + - id + - object + - created_at + - name + - description + - model + - instructions + - tools + - metadata + + createAssistantRequest: + type: object + additionalProperties: false + properties: + model: + description: | + ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them. + anyOf: + - type: string + name: + description: *assistant_name_param_description + type: string + nullable: true + maxLength: 256 + description: + description: *assistant_description_param_description + type: string + nullable: true + maxLength: 512 + instructions: + description: *assistant_instructions_param_description + type: string + nullable: true + maxLength: 256000 + tools: + description: *assistant_tools_param_description + default: [] + type: array + maxItems: 128 + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearch" + - $ref: "#/components/schemas/assistantToolsFunction" + tool_resources: + type: object + description: | + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + properties: + code_interpreter: + type: object + properties: + file_ids: + type: array + description: | + A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + default: [] + maxItems: 20 + items: + type: string + file_search: + type: object + properties: + vector_store_ids: + type: array + description: | + The vector store 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 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 + properties: + file_ids: + type: array + description: | + A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. + maxItems: 10000 + items: + type: string + chunking_strategy: + # Ideally we'd reuse the chunking strategy schema here, but it doesn't expand properly + type: object + description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. + oneOf: + - type: object + title: Auto Chunking Strategy + description: The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. + additionalProperties: false + properties: + type: + type: string + description: Always `auto`. + enum: ["auto"] + x-ms-enum: + name: AutoChunkingStrategyType + modelAsString: true + values: + - value: auto + required: + - type + - type: object + title: Static Chunking Strategy + additionalProperties: false + properties: + type: + type: string + description: Always `static`. + enum: ["static"] + x-ms-enum: + name: StaticChunkingStrategyType + modelAsString: true + values: + - value: static + static: + type: object + additionalProperties: false + properties: + max_chunk_size_tokens: + type: integer + minimum: 100 + maximum: 4096 + description: The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + chunk_overlap_tokens: + type: integer + description: | + The number of tokens that overlap between chunks. The default value is `400`. + + Note that the overlap must not exceed half of `max_chunk_size_tokens`. + required: + - max_chunk_size_tokens + - chunk_overlap_tokens + required: + - type + - static + metadata: + type: object + description: | + Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. + oneOf: + - required: [vector_store_ids] + - required: [vector_stores] + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + temperature: + description: *run_temperature_description + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + top_p: + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + description: *run_top_p_description + response_format: + $ref: "#/components/schemas/assistantsApiResponseFormatOption" + nullable: true + required: + - model + + modifyAssistantRequest: + type: object + additionalProperties: false + properties: + model: + description: | + ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see all of your available models, or see our [Model overview](/docs/models/overview) for descriptions of them. + anyOf: + - type: string + name: + description: | + The name of the assistant. The maximum length is 256 characters. + type: string + nullable: true + maxLength: 256 + description: + description: | + The description of the assistant. The maximum length is 512 characters. + type: string + nullable: true + maxLength: 512 + instructions: + description: | + The system instructions that the assistant uses. The maximum length is 32768 characters. + type: string + nullable: true + maxLength: 32768 + tools: + description: | + A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`. + default: [] + type: array + maxItems: 128 + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearch" + - $ref: "#/components/schemas/assistantToolsFunction" + tool_resources: + type: object + description: | + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + properties: + code_interpreter: + type: object + properties: + file_ids: + type: array + description: | + Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + default: [] + maxItems: 20 + items: + type: string + file_search: + type: object + properties: + vector_store_ids: + type: array + description: | + Overrides the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + maxItems: 1 + items: + type: string + metadata: + description: *metadata_description + type: object + nullable: true + temperature: + description: *run_temperature_description + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + top_p: + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + description: *run_top_p_description + response_format: + $ref: "#/components/schemas/assistantsApiResponseFormatOption" + nullable: true + + deleteAssistantResponse: + type: object + properties: + id: + type: string + deleted: + type: boolean + object: + type: string + enum: + - assistant.deleted + x-ms-enum: + name: DeleteAssistantResponseState + modelAsString: true + values: + - value: assistant.deleted + required: + - id + - object + - deleted + + listAssistantsResponse: + type: object + properties: + object: + type: string + example: list + data: + type: array + items: + $ref: "#/components/schemas/assistantObject" + first_id: + type: string + example: asst_hLBK7PXBv5Lr2NQT7KLY0ag1 + last_id: + type: string + example: asst_QLoItBbqwyAJEzlTy4y9kOMM + has_more: + type: boolean + example: false + required: + - object + - data + - first_id + - last_id + - has_more + + assistantToolsCode: + type: object + title: Code interpreter tool + properties: + type: + type: string + description: "The type of tool being defined: `code_interpreter`" + enum: + - code_interpreter + x-ms-enum: + name: assistantToolsCodeType + modelAsString: true + values: + - value: code_interpreter + required: + - type + + assistantToolsFileSearch: + type: object + title: FileSearch tool + properties: + type: + type: string + description: "The type of tool being defined: `file_search`" + enum: + - file_search + x-ms-enum: + name: assistantToolsFileSearchType + modelAsString: true + values: + - value: file_search + file_search: + type: object + description: Overrides for the file search tool. + properties: + max_num_results: + type: integer + minimum: 1 + maximum: 50 + 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. + assistantToolsFileSearchTypeOnly: + type: object + title: FileSearch tool + properties: + type: + type: string + description: "The type of tool being defined: `file_search`" + enum: + - file_search + x-ms-enum: + name: assistantToolsFileSearchType + modelAsString: true + values: + - value: file_search + required: + - type + + assistantToolsFunction: + type: object + title: Function tool + properties: + type: + type: string + description: "The type of tool being defined: `function`" + enum: + - function + x-ms-enum: + name: assistantToolsFunction + modelAsString: true + values: + - value: function + function: + type: object + description: The function definition. + properties: + description: + type: string + description: A description of what the function does, used by the model to choose when and how to call the function. + name: + type: string + description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. + parameters: + $ref: "#/components/schemas/chatCompletionFunctionParameters" + required: + - name + - parameters + - description + required: + - type + - function + + truncationObject: + type: object + title: Thread Truncation Controls + description: Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run. + properties: + type: + type: string + description: The truncation strategy to use for the thread. The default is `auto`. If set to `last_messages`, the thread will be truncated to the n most recent messages in the thread. When set to `auto`, messages in the middle of the thread will be dropped to fit the context length of the model, `max_prompt_tokens`. + enum: ["auto", "last_messages"] + x-ms-enum: + name: TruncationType + modelAsString: true + values: + - value: auto + - value: last_messages + last_messages: + type: integer + description: The number of most recent messages from the thread when constructing the context for the run. + minimum: 1 + nullable: true + required: + - type + + assistantsApiToolChoiceOption: + description: | + Controls which (if any) tool is called by the model. + `none` means the model will not call any tools and instead generates a message. + `auto` is the default value and means the model can pick between generating a message or calling a tool. + Specifying a particular tool like `{"type": "file_search"}` or `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool. + oneOf: + - type: string + description: > + `none` means the model will not call a function and instead generates a message. + `auto` means the model can pick between generating a message or calling a function. + enum: [none, auto] + x-ms-enum: + name: AssistantsApiToolChoiceOption + modelAsString: true + values: + - value: none + - value: auto + - $ref: "#/components/schemas/assistantsNamedToolChoice" + + assistantsNamedToolChoice: + type: object + description: Specifies a tool the model should use. Use to force the model to call a specific tool. + properties: + type: + type: string + enum: ["function", "code_interpreter", "file_search"] + description: The type of the tool. If type is `function`, the function name must be set + x-ms-enum: + name: AssistantsNamedToolChoiceType + modelAsString: true + values: + - value: function + - value: code_interpreter + - value: file_search + function: + type: object + properties: + name: + type: string + description: The name of the function to call. + required: + - name + required: + - type + + runObject: + type: object + title: A run on a thread + description: Represents an execution run on a [thread](/docs/api-reference/threads). + properties: + id: + description: The identifier, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `thread.run`. + type: string + enum: + - thread.run + x-ms-enum: + name: runObjectType + modelAsString: true + values: + - value: thread.run + description: The run object type which is always thread.run + created_at: + description: The Unix timestamp (in seconds) for when the run was created. + type: integer + thread_id: + description: The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run. + type: string + assistant_id: + description: The ID of the assistant used for execution of this run. + type: string + status: + description: The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`. + type: string + enum: + - queued + - in_progress + - requires_action + - cancelling + - cancelled + - failed + - completed + - expired + x-ms-enum: + name: RunObjectStatus + modelAsString: true + values: + - value: queued + description: The queued state + - value: in_progress + description: The in_progress state + - value: requires_action + description: The required_action state + - value: cancelling + description: The cancelling state + - value: cancelled + description: The cancelled state + - value: failed + description: The failed state + - value: completed + description: The completed state + - value: expired + description: The expired state + required_action: + type: object + description: Details on the action required to continue the run. Will be `null` if no action is required. + nullable: true + properties: + type: + description: For now, this is always `submit_tool_outputs`. + type: string + enum: + - submit_tool_outputs + submit_tool_outputs: + type: object + description: Details on the tool outputs needed for this run to continue. + properties: + tool_calls: + type: array + description: A list of the relevant tool calls. + items: + $ref: "#/components/schemas/runToolCallObject" + required: + - tool_calls + required: + - type + - submit_tool_outputs + last_error: + type: object + description: The last error associated with this run. Will be `null` if there are no errors. + nullable: true + properties: + code: + type: string + description: One of `server_error` or `rate_limit_exceeded`. + enum: + - server_error + - rate_limit_exceeded + x-ms-enum: + name: LastErrorCode + modelAsString: true + values: + - value: server_error + description: The server failed to respond to request due to server error + - value: rate_limit_exceeded + description: The server failed to respond to request due to rate limit exceeded + message: + type: string + description: A human-readable description of the error. + required: + - code + - message + expires_at: + description: The Unix timestamp (in seconds) for when the run will expire. + type: integer + started_at: + description: The Unix timestamp (in seconds) for when the run was started. + type: integer + nullable: true + cancelled_at: + description: The Unix timestamp (in seconds) for when the run was cancelled. + type: integer + nullable: true + failed_at: + description: The Unix timestamp (in seconds) for when the run failed. + type: integer + nullable: true + completed_at: + description: The Unix timestamp (in seconds) for when the run was completed. + type: integer + nullable: true + incomplete_details: + description: Details on why the run is incomplete. Will be `null` if the run is not incomplete. + type: object + nullable: true + properties: + reason: + description: The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run. + type: string + enum: ["max_completion_tokens", "max_prompt_tokens"] + x-ms-enum: + name: IncompleteDetailsReason + modelAsString: true + values: + - value: max_completion_tokens + - value: max_prompt_tokens + model: + description: The model that the assistant used for this run. + type: string + instructions: + description: The instructions that the assistant used for this run. + type: string + tools: + description: The list of tools that the assistant used for this run. + default: [] + type: array + maxItems: 20 + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearch" + - $ref: "#/components/schemas/assistantToolsFunction" + metadata: + description: *metadata_description + type: object + nullable: true + usage: + $ref: "#/components/schemas/runCompletionUsage" + temperature: + description: The sampling temperature used for this run. If not set, defaults to 1. + type: number + nullable: true + top_p: + description: The nucleus sampling value used for this run. If not set, defaults to 1. + type: number + nullable: true + max_prompt_tokens: + type: integer + nullable: true + description: | + The maximum number of prompt tokens specified to have been used over the course of the run. + minimum: 256 + max_completion_tokens: + type: integer + nullable: true + description: | + The maximum number of completion tokens specified to have been used over the course of the run. + minimum: 256 + truncation_strategy: + $ref: "#/components/schemas/truncationObject" + nullable: true + tool_choice: + $ref: "#/components/schemas/assistantsApiToolChoiceOption" + nullable: true + parallel_tool_calls: + $ref: "#/components/schemas/ParallelToolCalls" + response_format: + $ref: "#/components/schemas/assistantsApiResponseFormatOption" + nullable: true + required: + - id + - object + - created_at + - thread_id + - assistant_id + - status + - required_action + - last_error + - expires_at + - started_at + - cancelled_at + - failed_at + - completed_at + - model + - instructions + - tools + - metadata + - usage + - incomplete_details + - max_prompt_tokens + - max_completion_tokens + - truncation_strategy + - tool_choice + - response_format + + createRunRequest: + type: object + additionalProperties: false + properties: + assistant_id: + description: The ID of the assistant to use to execute this run. + type: string + model: + description: The ID of the Model 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. + type: string + nullable: true + instructions: + description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. + type: string + nullable: true + additional_instructions: + description: Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. + type: string + nullable: true + additional_messages: + description: Adds additional messages to the thread before creating the run. + type: array + items: + $ref: "#/components/schemas/createMessageRequest" + nullable: true + tools: + description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. + nullable: true + type: array + maxItems: 20 + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearch" + - $ref: "#/components/schemas/assistantToolsFunction" + metadata: + description: *metadata_description + type: object + nullable: true + temperature: + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + description: *run_temperature_description + top_p: + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + description: *run_top_p_description + stream: + type: boolean + nullable: true + description: | + If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + max_prompt_tokens: + type: integer + nullable: true + description: | + The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + minimum: 256 + max_completion_tokens: + type: integer + nullable: true + description: | + The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + minimum: 256 + truncation_strategy: + $ref: "#/components/schemas/truncationObject" + nullable: true + tool_choice: + $ref: "#/components/schemas/assistantsApiToolChoiceOption" + nullable: true + parallel_tool_calls: + $ref: "#/components/schemas/ParallelToolCalls" + response_format: + $ref: "#/components/schemas/assistantsApiResponseFormatOption" + nullable: true + required: + - thread_id + - assistant_id + + listRunsResponse: + type: object + properties: + object: + type: string + example: list + data: + type: array + items: + $ref: "#/components/schemas/runObject" + first_id: + type: string + example: run_hLBK7PXBv5Lr2NQT7KLY0ag1 + last_id: + type: string + example: run_QLoItBbqwyAJEzlTy4y9kOMM + has_more: + type: boolean + example: false + required: + - object + - data + - first_id + - last_id + - has_more + + modifyRunRequest: + type: object + additionalProperties: false + properties: + metadata: + description: *metadata_description + type: object + nullable: true + + submitToolOutputsRunRequest: + type: object + additionalProperties: false + properties: + tool_outputs: + description: A list of tools for which the outputs are being submitted. + type: array + items: + type: object + properties: + tool_call_id: + type: string + description: The ID of the tool call in the `required_action` object within the run object the output is being submitted for. + output: + type: string + description: The output of the tool call to be submitted to continue the run. + stream: + type: boolean + nullable: true + description: | + If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + required: + - tool_outputs + + runToolCallObject: + type: object + description: Tool call objects + 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](/docs/api-reference/runs/submitToolOutputs) endpoint. + type: + type: string + description: The type of tool call the output is required for. For now, this is always `function`. + enum: + - function + x-ms-enum: + name: RunToolCallObjectType + modelAsString: true + values: + - value: function + function: + type: object + description: The function definition. + properties: + name: + type: string + description: The name of the function. + arguments: + type: string + description: The arguments that the model expects you to pass to the function. + required: + - name + - arguments + required: + - id + - type + - function + + createThreadAndRunRequest: + type: object + additionalProperties: false + properties: + assistant_id: + description: The ID of the assistant to use to execute this run. + type: string + thread: + $ref: "#/components/schemas/createThreadRequest" + description: If no thread is provided, an empty thread will be created. + model: + description: The ID of the [Model](/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. + type: string + nullable: true + instructions: + description: Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. + type: string + nullable: true + tools: + description: Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. + nullable: true + type: array + maxItems: 20 + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearch" + - $ref: "#/components/schemas/assistantToolsFunction" + tool_resources: + type: object + description: | + A set of resources that are used by the assistant's tools. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + properties: + code_interpreter: + type: object + properties: + file_ids: + type: array + description: | + A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + default: [] + maxItems: 20 + items: + type: string + file_search: + type: object + properties: + vector_store_ids: + type: array + description: | + The ID of the vector store attached to this assistant. There can be a maximum of 1 vector store attached to the assistant. + maxItems: 1 + items: + type: string + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + temperature: + type: number + minimum: 0 + maximum: 2 + default: 1 + example: 1 + nullable: true + description: *run_temperature_description + top_p: + type: number + minimum: 0 + maximum: 1 + default: 1 + example: 1 + nullable: true + description: *run_top_p_description + stream: + type: boolean + nullable: true + description: | + If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. + max_prompt_tokens: + type: integer + nullable: true + description: | + The maximum number of prompt tokens that may be used over the course of the run. The run will make a best effort to use only the number of prompt tokens specified, across multiple turns of the run. If the run exceeds the number of prompt tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + minimum: 256 + max_completion_tokens: + type: integer + nullable: true + description: | + The maximum number of completion tokens that may be used over the course of the run. The run will make a best effort to use only the number of completion tokens specified, across multiple turns of the run. If the run exceeds the number of completion tokens specified, the run will end with status `incomplete`. See `incomplete_details` for more info. + minimum: 256 + truncation_strategy: + $ref: "#/components/schemas/truncationObject" + nullable: true + tool_choice: + $ref: "#/components/schemas/assistantsApiToolChoiceOption" + nullable: true + parallel_tool_calls: + $ref: "#/components/schemas/ParallelToolCalls" + response_format: + $ref: "#/components/schemas/assistantsApiResponseFormatOption" + nullable: true + required: + - thread_id + - assistant_id + + threadObject: + type: object + title: Thread + description: Represents a thread that contains [messages](/docs/api-reference/messages). + properties: + id: + description: The identifier, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `thread`. + type: string + enum: + - thread + x-ms-enum: + name: ThreadObjectType + modelAsString: true + values: + - value: thread + description: The type of thread object which is always `thread` + created_at: + description: The Unix timestamp (in seconds) for when the thread was created. + type: integer + tool_resources: + type: object + description: | + A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + properties: + code_interpreter: + type: object + properties: + file_ids: + type: array + description: | + A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + default: [] + maxItems: 20 + items: + type: string + file_search: + type: object + properties: + vector_store_ids: + type: array + description: | + The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread. + maxItems: 1 + items: + type: string + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + required: + - id + - object + - created_at + - tool_resources + - metadata + + createThreadRequest: + type: object + additionalProperties: false + properties: + messages: + description: A list of messages to start the thread with. + type: array + items: + $ref: "#/components/schemas/createMessageRequest" + tool_resources: + type: object + description: | + A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + properties: + code_interpreter: + type: object + properties: + file_ids: + type: array + description: | + A list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + default: [] + maxItems: 20 + items: + type: string + file_search: + type: object + properties: + vector_store_ids: + type: array + description: | + The vector store 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 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 + properties: + file_ids: + type: array + description: | + A list of file IDs to add to the vector store. There can be a maximum of 10000 files in a vector store. + maxItems: 10000 + items: + type: string + chunking_strategy: + # Ideally we'd reuse the chunking strategy schema here, but it doesn't expand properly + type: object + description: The chunking strategy used to chunk the file(s). If not set, will use the `auto` strategy. + oneOf: + - type: object + title: Auto Chunking Strategy + description: The default strategy. This strategy currently uses a `max_chunk_size_tokens` of `800` and `chunk_overlap_tokens` of `400`. + additionalProperties: false + properties: + type: + type: string + description: Always `auto`. + enum: ["auto"] + x-ms-enum: + name: AutoChunkingStrategyType + modelAsString: true + values: + - value: auto + required: + - type + - type: object + title: Static Chunking Strategy + additionalProperties: false + properties: + type: + type: string + description: Always `static`. + enum: ["static"] + x-ms-enum: + name: StaticChunkingStrategyType + modelAsString: true + values: + - value: static + static: + type: object + additionalProperties: false + properties: + max_chunk_size_tokens: + type: integer + minimum: 100 + maximum: 4096 + description: The maximum number of tokens in each chunk. The default value is `800`. The minimum value is `100` and the maximum value is `4096`. + chunk_overlap_tokens: + type: integer + description: | + The number of tokens that overlap between chunks. The default value is `400`. + + Note that the overlap must not exceed half of `max_chunk_size_tokens`. + required: + - max_chunk_size_tokens + - chunk_overlap_tokens + required: + - type + - static + metadata: + type: object + description: | + Set of 16 key-value pairs that can be attached to a vector store. This can be useful for storing additional information about the vector store in a structured format. Keys can be a maximum of 64 characters long and values can be a maximum of 512 characters long. + oneOf: + - required: [vector_store_ids] + - required: [vector_stores] + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + + modifyThreadRequest: + type: object + additionalProperties: false + properties: + tool_resources: + type: object + description: | + A set of resources that are made available to the assistant's tools in this thread. The resources are specific to the type of tool. For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of vector store IDs. + properties: + code_interpreter: + type: object + properties: + file_ids: + type: array + description: | + A list of File IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files associated with the tool. + default: [] + maxItems: 20 + items: + type: string + file_search: + type: object + properties: + vector_store_ids: + type: array + description: | + The vector store attached to this thread. There can be a maximum of 1 vector store attached to the thread. + maxItems: 1 + items: + type: string + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + + deleteThreadResponse: + type: object + properties: + id: + type: string + deleted: + type: boolean + object: + type: string + enum: + - thread.deleted + x-ms-enum: + name: DeleteThreadResponseObjectState + modelAsString: true + values: + - value: thread.deleted + description: The delete thread response object state which is `thread.deleted` + required: + - id + - object + - deleted + + listThreadsResponse: + properties: + object: + type: string + example: list + data: + type: array + items: + $ref: "#/components/schemas/threadObject" + first_id: + type: string + example: asst_hLBK7PXBv5Lr2NQT7KLY0ag1 + last_id: + type: string + example: asst_QLoItBbqwyAJEzlTy4y9kOMM + has_more: + type: boolean + example: false + required: + - object + - data + - first_id + - last_id + - has_more + + messageObject: + type: object + title: The message object + description: Represents a message within a [thread](/docs/api-reference/threads). + properties: + id: + description: The identifier, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `thread.message`. + type: string + enum: + - thread.message + x-ms-enum: + name: MessageObjectType + modelAsString: true + values: + - value: thread.message + description: The message object type which is `thread.message` + created_at: + description: The Unix timestamp (in seconds) for when the message was created. + type: integer + thread_id: + description: The [thread](/docs/api-reference/threads) ID that this message belongs to. + type: string + status: + description: The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. + type: string + enum: ["in_progress", "incomplete", "completed"] + x-ms-enum: + name: MessageObjectStatus + modelAsString: true + values: + - value: in_progress + - value: incomplete + - value: completed + incomplete_details: + description: On an incomplete message, details about why the message is incomplete. + type: object + properties: + reason: + type: string + description: The reason the message is incomplete. + enum: + [ + "content_filter", + "max_tokens", + "run_cancelled", + "run_expired", + "run_failed", + ] + x-ms-enum: + name: MessageObjectIncompleteReason + modelAsString: true + values: + - value: content_filter + - value: max_tokens + - value: run_cancelled + - value: run_expired + - value: run_failed + nullable: true + required: + - reason + completed_at: + description: The Unix timestamp (in seconds) for when the message was completed. + type: integer + nullable: true + incomplete_at: + description: The Unix timestamp (in seconds) for when the message was marked as incomplete. + type: integer + nullable: true + role: + description: The entity that produced the message. One of `user` or `assistant`. + type: string + enum: + - user + - assistant + x-ms-enum: + name: MessageObjectRole + modelAsString: true + values: + - value: user + - value: assistant + content: + description: The content of the message in array of text and/or images. + type: array + items: + oneOf: + - $ref: "#/components/schemas/messageContentImageFileObject" + - $ref: "#/components/schemas/messageContentTextObject" + assistant_id: + description: If applicable, the ID of the assistant that authored this message. + type: string + nullable: true + run_id: + description: If applicable, the ID of the [run](/docs/api-reference/runs) associated with the authoring of this message. + type: string + nullable: true + attachments: + type: array + items: + type: object + properties: + file_id: + type: string + description: The ID of the file to attach to the message. + tools: + description: The tools to add this file to. + type: array + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearchTypeOnly" + description: A list of files attached to the message, and the tools they were added to. + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + required: + - id + - object + - created_at + - thread_id + - status + - incomplete_details + - completed_at + - incomplete_at + - role + - content + - assistant_id + - run_id + - attachments + - metadata + + messageDeltaObject: + type: object + title: Message delta object + description: | + Represents a message delta i.e. any changed fields on a message during streaming. + properties: + id: + description: The identifier of the message, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `thread.message.delta`. + type: string + enum: ["thread.message.delta"] + x-ms-enum: + name: MessageDeltaObjectType + modelAsString: true + values: + - value: thread.message.delta + delta: + description: The delta containing the fields that have changed on the Message. + type: object + properties: + role: + description: The entity that produced the message. One of `user` or `assistant`. + type: string + enum: ["user", "assistant"] + x-ms-enum: + name: MessageDeltaObjectDeltaRole + modelAsString: true + values: + - value: user + - value: assistant + content: + description: The content of the message in array of text and/or images. + type: array + items: + oneOf: + - $ref: "#/components/schemas/messageDeltaContentImageFileObject" + - $ref: "#/components/schemas/messageDeltaContentTextObject" + required: + - id + - object + - delta + + createMessageRequest: + type: object + additionalProperties: false + required: + - role + - content + properties: + role: + type: string + enum: + - user + - assistant + x-ms-enum: + name: CreateMessageRequestRole + modelAsString: true + values: + - value: user + - value: assistant + description: | + The role of the entity that is creating the message. Allowed values include: + - `user`: Indicates the message is sent by an actual user and should be used in most cases to represent user-generated messages. + - `assistant`: Indicates the message is generated by the assistant. Use this value to insert messages from the assistant into the conversation. + content: + type: string + minLength: 1 + maxLength: 256000 + description: The content of the message. + attachments: + type: array + items: + type: object + properties: + file_id: + type: string + description: The ID of the file to attach to the message. + tools: + description: The tools to add this file to. + type: array + items: + oneOf: + - $ref: "#/components/schemas/assistantToolsCode" + - $ref: "#/components/schemas/assistantToolsFileSearchTypeOnly" + x-oaiExpandable: true + description: A list of files attached to the message, and the tools they should be added to. + required: + - file_id + - tools + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + modifyMessageRequest: + type: object + additionalProperties: false + properties: + metadata: + description: *metadata_description + type: object + nullable: true + deleteMessageResponse: + type: object + properties: + id: + type: string + deleted: + type: boolean + object: + type: string + enum: + - thread.message.deleted + x-ms-enum: + name: DeleteMessageResponseObject + modelAsString: true + values: + - value: thread.message.deleted + description: The delete message response object state + required: + - id + - object + - deleted + listMessagesResponse: + properties: + object: + type: string + example: list + data: + type: array + items: + $ref: "#/components/schemas/messageObject" + first_id: + type: string + example: msg_hLBK7PXBv5Lr2NQT7KLY0ag1 + last_id: + type: string + example: msg_QLoItBbqwyAJEzlTy4y9kOMM + has_more: + type: boolean + example: false + required: + - object + - data + - first_id + - last_id + - has_more + + messageContentImageFileObject: + title: Image file + type: object + description: References an image file in the content of a message. + properties: + type: + description: Always `image_file`. + type: string + enum: + - image_file + x-ms-enum: + name: MessageContentImageFileObjectType + modelAsString: true + values: + - value: image_file + description: The message content image file type + image_file: + type: object + properties: + file_id: + description: The file ID of the image in the message content. + type: string + required: + - file_id + required: + - type + - image_file + + messageContentTextObject: + title: Text + type: object + description: The text content that is part of a message. + properties: + type: + description: Always `text`. + type: string + enum: + - text + x-ms-enum: + name: messageContentTextObjectType + modelAsString: true + values: + - value: text + description: The message content text Object type + text: + type: object + properties: + value: + description: The data that makes up the text. + type: string + annotations: + type: array + items: + oneOf: + - $ref: "#/components/schemas/messageContentTextAnnotationsFileCitationObject" + - $ref: "#/components/schemas/messageContentTextAnnotationsFilePathObject" + required: + - value + - annotations + required: + - type + - text + + messageContentTextAnnotationsFileCitationObject: + title: File citation + type: object + description: A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "retrieval" tool to search files. + properties: + type: + description: Always `file_citation`. + type: string + enum: + - file_citation + x-ms-enum: + name: FileCitationObjectType + modelAsString: true + values: + - value: file_citation + description: The file citation object type + text: + description: The text in the message content that needs to be replaced. + type: string + file_citation: + type: object + properties: + file_id: + description: The ID of the specific File the citation is from. + type: string + required: + - file_id + start_index: + type: integer + minimum: 0 + end_index: + type: integer + minimum: 0 + required: + - type + - text + - file_citation + - start_index + - end_index + + messageContentTextAnnotationsFilePathObject: + title: File path + type: object + description: A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. + properties: + type: + description: Always `file_path`. + type: string + enum: + - file_path + x-ms-enum: + name: FilePathObjectType + modelAsString: true + values: + - value: file_path + description: The file path object type + text: + description: The text in the message content that needs to be replaced. + type: string + file_path: + type: object + properties: + file_id: + description: The ID of the file that was generated. + type: string + required: + - file_id + start_index: + type: integer + minimum: 0 + end_index: + type: integer + minimum: 0 + required: + - type + - text + - file_path + - start_index + - end_index + + messageDeltaContentImageFileObject: + title: Image file + type: object + description: References an image File in the content of a message. + properties: + index: + type: integer + description: The index of the content part in the message. + type: + description: Always `image_file`. + type: string + enum: ["image_file"] + x-ms-enum: + name: MessageDeltaContentImageFileObjectType + modelAsString: true + values: + - value: image_file + image_file: + type: object + properties: + file_id: + description: The File ID of the image in the message content. + type: string + required: + - index + - type + + messageDeltaContentTextObject: + title: Text + type: object + description: The text content that is part of a message. + properties: + index: + type: integer + description: The index of the content part in the message. + type: + description: Always `text`. + type: string + enum: ["text"] + x-ms-enum: + name: MessageDeltaContentTextObjectType + modelAsString: true + values: + - value: text + text: + type: object + properties: + value: + description: The data that makes up the text. + type: string + annotations: + type: array + items: + oneOf: + - $ref: "#/components/schemas/messageDeltaContentTextAnnotationsFileCitationObject" + - $ref: "#/components/schemas/messageDeltaContentTextAnnotationsFilePathObject" + required: + - index + - type + + messageDeltaContentTextAnnotationsFileCitationObject: + title: File citation + type: object + description: A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "file_search" tool to search files. + properties: + index: + type: integer + description: The index of the annotation in the text content part. + type: + description: Always `file_citation`. + type: string + enum: ["file_citation"] + x-ms-enum: + name: MessageDeltaContentTextAnnotationsFileCitationObjectType + modelAsString: true + values: + - value: file_citation + text: + description: The text in the message content that needs to be replaced. + type: string + file_citation: + type: object + properties: + file_id: + description: The ID of the specific File the citation is from. + type: string + quote: + description: The specific quote in the file. + type: string + start_index: + type: integer + minimum: 0 + end_index: + type: integer + minimum: 0 + required: + - index + - type + + messageDeltaContentTextAnnotationsFilePathObject: + title: File path + type: object + description: A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file. + properties: + index: + type: integer + description: The index of the annotation in the text content part. + type: + description: Always `file_path`. + type: string + enum: ["file_path"] + x-ms-enum: + name: MessageDeltaContentTextAnnotationsFilePathObjectType + modelAsString: true + values: + - value: file_path + text: + description: The text in the message content that needs to be replaced. + type: string + file_path: + type: object + properties: + file_id: + description: The ID of the file that was generated. + type: string + start_index: + type: integer + minimum: 0 + end_index: + type: integer + minimum: 0 + required: + - index + - type + + runStepObject: + type: object + title: Run steps + description: | + Represents a step in execution of a run. + properties: + id: + description: The identifier of the run step, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `assistant.run.step``. + type: string + enum: + - assistant.run.step + x-ms-enum: + name: RunStepObjectType + modelAsString: true + values: + - value: assistant.run.step + description: The object type, which is always `assistant.run.step` + created_at: + description: The Unix timestamp (in seconds) for when the run step was created. + type: integer + assistant_id: + description: The ID of the assistant associated with the run step. + type: string + thread_id: + description: The ID of the [thread](/docs/api-reference/threads) that was run. + type: string + run_id: + description: The ID of the [run](/docs/api-reference/runs) 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`. + type: string + enum: + - message_creation + - tool_calls + x-ms-enum: + name: RunStepObjectType + modelAsString: true + values: + - value: message_creation + description: The message_creation run step + - value: tool_calls + description: The tool_calls run step + status: + description: The status of the run, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. + type: string + enum: + - in_progress + - cancelled + - failed + - completed + - expired + x-ms-enum: + name: RunStepObjectStatus + modelAsString: true + values: + - value: in_progress + description: The in_progress run status + - value: cancelled + description: The cancelled run status + - value: failed + description: The cancelled run status + - value: completed + description: The cancelled run status + - value: expired + description: The cancelled run status + step_details: + type: object + description: The details of the run step. + oneOf: + - $ref: "#/components/schemas/runStepDetailsMessageCreationObject" + - $ref: "#/components/schemas/runStepDetailsToolCallsObject" + last_error: + type: object + description: The last error associated with this run step. Will be `null` if there are no errors. + nullable: true + properties: + code: + type: string + description: One of `server_error` or `rate_limit_exceeded`. + enum: + - server_error + - rate_limit_exceeded + x-ms-enum: + name: LastErrorCode + modelAsString: true + values: + - value: server_error + description: The server_error + - value: rate_limit_exceeded + description: The rate_limit_exceeded status + message: + type: string + description: A human-readable description of the error. + required: + - code + - message + expired_at: + description: The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. + type: integer + nullable: true + cancelled_at: + description: The Unix timestamp (in seconds) for when the run step was cancelled. + type: integer + nullable: true + failed_at: + description: The Unix timestamp (in seconds) for when the run step failed. + type: integer + nullable: true + completed_at: + description: The Unix timestamp (in seconds) for when the run step completed. + type: integer + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + required: + - id + - object + - created_at + - assistant_id + - thread_id + - run_id + - type + - status + - step_details + - last_error + - expired_at + - cancelled_at + - failed_at + - completed_at + - metadata + + runStepDeltaObject: + type: object + title: Run step delta object + description: | + Represents a run step delta i.e. any changed fields on a run step during streaming. + properties: + id: + description: The identifier of the run step, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `thread.run.step.delta`. + type: string + enum: ["thread.run.step.delta"] + x-ms-enum: + name: RunStepDeltaObjectType + modelAsString: true + values: + - value: thread.run.step.delta + delta: + description: The delta containing the fields that have changed on the run step. + type: object + properties: + step_details: + type: object + description: The details of the run step. + oneOf: + - $ref: "#/components/schemas/runStepDeltaStepDetailsMessageCreationObject" + - $ref: "#/components/schemas/runStepDeltaStepDetailsToolCallsObject" + required: + - id + - object + - delta + + listRunStepsResponse: + properties: + object: + type: string + example: list + data: + type: array + items: + $ref: "#/components/schemas/runStepObject" + first_id: + type: string + example: step_hLBK7PXBv5Lr2NQT7KLY0ag1 + last_id: + type: string + example: step_QLoItBbqwyAJEzlTy4y9kOMM + has_more: + type: boolean + example: false + required: + - object + - data + - first_id + - last_id + - has_more + + runStepDetailsMessageCreationObject: + title: Message creation + type: object + description: Details of the message creation by the run step. + properties: + type: + description: Always `message_creation``. + type: string + enum: + - message_creation + x-ms-enum: + name: RunStepDetailsMessageCreationObjectType + modelAsString: true + values: + - value: message_creation + message_creation: + type: object + properties: + message_id: + type: string + description: The ID of the message that was created by this run step. + required: + - message_id + required: + - type + - message_creation + + runStepDeltaStepDetailsMessageCreationObject: + title: Message creation + type: object + description: Details of the message creation by the run step. + properties: + type: + description: Always `message_creation`. + type: string + enum: ["message_creation"] + x-ms-enum: + name: RunStepDeltaStepDetailsMessageCreationObjectType + modelAsString: true + values: + - value: message_creation + message_creation: + type: object + properties: + message_id: + type: string + description: The ID of the message that was created by this run step. + required: + - type + + runStepDetailsToolCallsObject: + title: Tool calls + type: object + description: Details of the tool call. + properties: + type: + description: Always `tool_calls`. + type: string + enum: + - tool_calls + x-ms-enum: + name: RunStepDetailsToolCallsObjectType + modelAsString: true + values: + - value: tool_calls + tool_calls: + type: array + description: | + An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `retrieval` or `function`. + items: + type: object + oneOf: + - $ref: "#/components/schemas/runStepDetailsToolCallsCodeObject" + - $ref: "#/components/schemas/runStepDetailsToolCallsFileSearchObject" + - $ref: "#/components/schemas/runStepDetailsToolCallsFunctionObject" + required: + - type + - tool_calls + + runStepDeltaStepDetailsToolCallsObject: + title: Tool calls + type: object + description: Details of the tool call. + properties: + type: + description: Always `tool_calls`. + type: string + enum: ["tool_calls"] + x-ms-enum: + name: RunStepDeltaStepDetailsToolCallsObjectType + modelAsString: true + values: + - value: tool_calls + tool_calls: + type: array + description: | + An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `file_search` or `function`. + items: + oneOf: + - $ref: "#/components/schemas/runStepDeltaStepDetailsToolCallsCodeObject" + - $ref: "#/components/schemas/runStepDeltaStepDetailsToolCallsFileSearchObject" + - $ref: "#/components/schemas/runStepDeltaStepDetailsToolCallsFunctionObject" + required: + - type + + runStepDetailsToolCallsCodeObject: + title: Code interpreter tool call + type: object + description: Details of the Code Interpreter tool call the run step was involved in. + properties: + id: + type: string + description: The ID of the tool call. + type: + type: string + description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call. + enum: + - code_interpreter + x-ms-enum: + name: RunStepDetailsToolCallsCodeObjectType + modelAsString: true + values: + - value: code_interpreter + code_interpreter: + type: object + description: The Code Interpreter tool call definition. + required: + - input + - outputs + properties: + input: + type: string + description: The input to the Code Interpreter tool call. + outputs: + type: array + description: The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. + items: + type: object + oneOf: + - $ref: "#/components/schemas/runStepDetailsToolCallsCodeOutputLogsObject" + - $ref: "#/components/schemas/runStepDetailsToolCallsCodeOutputImageObject" + required: + - id + - type + - code_interpreter + + runStepDeltaStepDetailsToolCallsCodeObject: + title: Code interpreter tool call + type: object + description: Details of the Code Interpreter tool call the run step was involved in. + properties: + index: + type: integer + description: The index of the tool call in the tool calls array. + id: + type: string + description: The ID of the tool call. + type: + type: string + description: The type of tool call. This is always going to be `code_interpreter` for this type of tool call. + enum: ["code_interpreter"] + x-ms-enum: + name: RunStepDeltaStepDetailsToolCallsCodeObjectType + modelAsString: true + values: + - value: code_interpreter + code_interpreter: + type: object + description: The Code Interpreter tool call definition. + properties: + input: + type: string + description: The input to the Code Interpreter tool call. + outputs: + type: array + description: The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. + items: + type: object + oneOf: + - $ref: "#/components/schemas/runStepDeltaStepDetailsToolCallsCodeOutputLogsObject" + - $ref: "#/components/schemas/runStepDeltaStepDetailsToolCallsCodeOutputImageObject" + required: + - index + - type + + runStepDetailsToolCallsCodeOutputLogsObject: + title: Code interpreter log output + type: object + description: Text output from the Code Interpreter tool call as part of a run step. + properties: + type: + description: Always `logs`. + type: string + enum: + - logs + x-ms-enum: + name: RunStepDetailsToolCallsCodeOutputLogsObjectType + modelAsString: true + values: + - value: logs + logs: + type: string + description: The text output from the Code Interpreter tool call. + required: + - type + - logs + + runStepDeltaStepDetailsToolCallsCodeOutputLogsObject: + title: Code interpreter log output + type: object + description: Text output from the Code Interpreter tool call as part of a run step. + properties: + index: + type: integer + description: The index of the output in the outputs array. + type: + description: Always `logs`. + type: string + enum: ["logs"] + x-ms-enum: + name: RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType + modelAsString: true + values: + - value: logs + logs: + type: string + description: The text output from the Code Interpreter tool call. + required: + - index + - type + + runStepDetailsToolCallsCodeOutputImageObject: + title: Code interpreter image output + type: object + properties: + type: + description: Always `image`. + type: string + enum: + - image + x-ms-enum: + name: RunStepDetailsToolCallsCodeOutputImageObjectType + modelAsString: true + values: + - value: image + image: + type: object + properties: + file_id: + description: The file ID of the image. + type: string + required: + - file_id + required: + - type + - image + + runStepDeltaStepDetailsToolCallsCodeOutputImageObject: + title: Code interpreter image output + type: object + properties: + index: + type: integer + description: The index of the output in the outputs array. + type: + description: Always `image`. + type: string + enum: ["image"] + x-ms-enum: + name: RunStepDeltaStepDetailsToolCallsCodeOutputImageObject + modelAsString: true + values: + - value: image + image: + type: object + properties: + file_id: + description: The file ID of the image. + type: string + required: + - index + - type + + runStepDetailsToolCallsFileSearchObject: + title: File search tool call + type: object + properties: + id: + type: string + description: The ID of the tool call object. + type: + type: string + description: The type of tool call. This is always going to be `file_search` for this type of tool call. + enum: ["file_search"] + x-ms-enum: + name: RunStepDetailsToolCallsFileSearchObjectType + modelAsString: true + values: + - value: file_search + file_search: + type: object + description: For now, this is always going to be an empty object. + properties: + results: + type: array + description: The results of the file search. + items: + $ref: "#/components/schemas/runStepDetailsToolCallsFileSearchResultObject" + required: + - id + - type + - file_search + + runStepDetailsToolCallsFileSearchResultObject: + title: File search tool call result + type: object + description: A result instance of the file search. + x-oaiTypeLabel: map + properties: + file_id: + type: string + description: The ID of the file that result was found in. + file_name: + type: string + description: The name of the file that result was found in. + score: + type: number + description: The score of the result. All values must be a floating point number between 0 and 1. + minimum: 0 + maximum: 1 + content: + type: array + description: The content of the result that was found. The content is only included if requested via the include query parameter. + items: + type: object + properties: + type: + type: string + description: The type of the content. + enum: ["text"] + text: + type: string + description: The text content of the file. + required: + - file_id + - file_name + - score + + runStepDeltaStepDetailsToolCallsFileSearchObject: + title: File search tool call + type: object + properties: + index: + type: integer + description: The index of the tool call in the tool calls array. + id: + type: string + description: The ID of the tool call object. + type: + type: string + description: The type of tool call. This is always going to be `retrieval` for this type of tool call. + enum: + - file_search + x-ms-enum: + name: RunStepDeltaStepDetailsToolCallsFileSearchObjectType + modelAsString: true + values: + - value: file_search + file_search: + type: object + description: For now, this is always going to be an empty object. + required: + - index + - type + - file_search + + runStepDetailsToolCallsFunctionObject: + type: object + title: Function tool call + properties: + id: + type: string + description: The ID of the tool call object. + type: + type: string + description: The type of tool call. This is always going to be `function` for this type of tool call. + enum: + - function + x-ms-enum: + name: RunStepDetailsToolCallsFunctionObjectType + modelAsString: true + values: + - value: function + function: + type: object + description: The definition of the function that was called. + properties: + name: + type: string + description: The name of the function. + arguments: + type: string + description: The arguments passed to the function. + output: + type: string + description: The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet. + nullable: true + required: + - name + - arguments + - output + required: + - id + - type + - function + + runStepDeltaStepDetailsToolCallsFunctionObject: + type: object + title: Function tool call + properties: + index: + type: integer + description: The index of the tool call in the tool calls array. + id: + type: string + description: The ID of the tool call object. + type: + type: string + description: The type of tool call. This is always going to be `function` for this type of tool call. + enum: ["function"] + x-ms-enum: + name: RunStepDetailsToolCallsFunctionObjectType + modelAsString: true + values: + - value: function + function: + type: object + description: The definition of the function that was called. + properties: + name: + type: string + description: The name of the function. + arguments: + type: string + description: The arguments passed to the function. + output: + type: string + description: The output of the function. This will be `null` if the outputs have not been submitted yet. + nullable: true + required: + - index + - type + + vectorStoreExpirationAfter: + type: object + title: Vector store expiration policy + description: The expiration policy for a vector store. + properties: + anchor: + description: "Anchor timestamp after which the expiration policy applies. Supported anchors: `last_active_at`." + type: string + enum: ["last_active_at"] + x-ms-enum: + name: VectorStoreExpirationAfterAnchor + modelAsString: true + values: + - value: last_active_at + description: The anchor timestamp after which the expiration policy applies. + days: + description: The number of days after the anchor time that the vector store will expire. + type: integer + minimum: 1 + maximum: 365 + required: + - anchor + - days + + vectorStoreObject: + type: object + title: Vector store + description: A vector store is a collection of processed files can be used by the `file_search` tool. + properties: + id: + description: The identifier, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `vector_store`. + type: string + enum: ["vector_store"] + created_at: + description: The Unix timestamp (in seconds) for when the vector store was created. + type: integer + name: + description: The name of the vector store. + type: string + usage_bytes: + description: The total number of bytes used by the files in the vector store. + type: integer + file_counts: + type: object + properties: + in_progress: + description: The number of files that are currently being processed. + type: integer + completed: + description: The number of files that have been successfully processed. + type: integer + failed: + description: The number of files that have failed to process. + type: integer + cancelled: + description: The number of files that were cancelled. + type: integer + total: + description: The total number of files. + type: integer + required: + - in_progress + - completed + - failed + - cancelled + - total + status: + description: The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use. + type: string + enum: ["expired", "in_progress", "completed"] + x-ms-enum: + name: VectorStoreObjectStatus + modelAsString: true + values: + - value: expired + - value: in_progress + - value: completed + expires_after: + $ref: "#/components/schemas/vectorStoreExpirationAfter" + expires_at: + description: The Unix timestamp (in seconds) for when the vector store will expire. + type: integer + nullable: true + last_active_at: + description: The Unix timestamp (in seconds) for when the vector store was last active. + type: integer + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + required: + - id + - object + - usage_bytes + - created_at + - status + - last_active_at + - name + - bytes + - file_counts + - metadata + + createVectorStoreRequest: + type: object + additionalProperties: false + properties: + file_ids: + description: A list of file IDs that the vector store should use. Useful for tools like `file_search` that can access files. + type: array + maxItems: 500 + items: + type: string + name: + description: The name of the vector store. + type: string + expires_after: + $ref: "#/components/schemas/vectorStoreExpirationAfter" + chunking_strategy: + type: object + description: >- + The chunking strategy used to chunk the file(s). If not set, will use the + `auto` strategy. Only applicable if `file_ids` is non-empty. + oneOf: + - $ref: "#/components/schemas/autoChunkingStrategyRequestParam" + - $ref: "#/components/schemas/staticChunkingStrategyRequestParam" + metadata: + description: *metadata_description + type: object + nullable: true + + updateVectorStoreRequest: + type: object + additionalProperties: false + properties: + name: + description: The name of the vector store. + type: string + nullable: true + expires_after: + $ref: "#/components/schemas/vectorStoreExpirationAfter" + nullable: true + metadata: + description: *metadata_description + type: object + nullable: true + + listVectorStoresResponse: + properties: + object: + type: string + example: "list" + data: + type: array + items: + $ref: "#/components/schemas/vectorStoreObject" + first_id: + type: string + example: "vs_abc123" + last_id: + type: string + example: "vs_abc456" + has_more: + type: boolean + example: false + required: + - object + - data + - first_id + - last_id + - has_more + + deleteVectorStoreResponse: + type: object + properties: + id: + type: string + deleted: + type: boolean + object: + type: string + enum: [vector_store.deleted] + x-ms-enum: + name: DeleteVectorStoreResponseObject + modelAsString: true + values: + - value: vector_store.deleted + description: The delete vector store response object state + required: + - id + - object + - deleted + + vectorStoreFileObject: + type: object + title: Vector store files + description: A list of files attached to a vector store. + properties: + id: + description: The identifier, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `vector_store.file`. + type: string + enum: ["vector_store.file"] + x-ms-enum: + name: VectorStoreFileObjectType + modelAsString: true + values: + - value: vector_store.file + usage_bytes: + description: The total vector store usage in bytes. Note that this may be different from the original file size. + type: integer + created_at: + description: The Unix timestamp (in seconds) for when the vector store file was created. + type: integer + vector_store_id: + description: The ID of the vector store that the file 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. + type: string + enum: ["in_progress", "completed", "cancelled", "failed"] + x-ms-enum: + name: VectorStoreFileObjectStatus + modelAsString: true + values: + - value: in_progress + - value: completed + - value: cancelled + - value: failed + last_error: + type: object + description: The last error associated with this vector store file. Will be `null` if there are no errors. + nullable: true + properties: + code: + type: string + description: One of `server_error` or `invalid_file` or `unsupported_file`. + enum: + [ + "server_error", + "unsupported_file", + "invalid_file" + ] + x-ms-enum: + name: VectorStoreFileObjectLastErrorCode + modelAsString: true + values: + - value: server_error + - value: unsupported_file + - value: invalid_file + message: + type: string + description: A human-readable description of the error. + required: + - code + - message + chunking_strategy: + type: object + description: | + The chunking strategy used to chunk the file(s). If not set, will use the + `auto` strategy. Only applicable if `file_ids` is non-empty. + oneOf: + - $ref: "#/components/schemas/autoChunkingStrategyRequestParam" + - $ref: "#/components/schemas/staticChunkingStrategyRequestParam" + required: + - id + - object + - usage_bytes + - created_at + - vector_store_id + - status + - last_error + + otherChunkingStrategyResponseParam: + type: object + title: Other Chunking Strategy + description: | + This is returned when the chunking strategy is unknown. Typically, this is + because the file was indexed before the `chunking_strategy` concept was + introduced in the API. + additionalProperties: false + properties: + type: + type: string + description: Always `other`. + enum: + - other + x-ms-enum: + name: OtherChunkingStrategyResponseParamType + modelAsString: true + values: + - value: other + required: + - type + + staticChunkingStrategyResponseParam: + type: object + title: Static Chunking Strategy + additionalProperties: false + properties: + type: + type: string + description: Always `static`. + enum: + - static + x-ms-enum: + name: StaticChunkingStrategyResponseParamType + modelAsString: true + values: + - value: static + static: + $ref: "#/components/schemas/staticChunkingStrategy" + required: + - type + - static + + staticChunkingStrategy: + type: object + additionalProperties: false + properties: + max_chunk_size_tokens: + type: integer + minimum: 100 + maximum: 4096 + description: | + The maximum number of tokens in each chunk. The default value is `800`. + The minimum value is `100` and the maximum value is `4096`. + chunk_overlap_tokens: + type: integer + description: > + The number of tokens that overlap between chunks. The default value is + `400`. + Note that the overlap must not exceed half of `max_chunk_size_tokens`. + required: + - max_chunk_size_tokens + - chunk_overlap_tokens + + autoChunkingStrategyRequestParam: + type: object + title: Auto Chunking Strategy + description: | + The default strategy. This strategy currently uses a `max_chunk_size_tokens` + of `800` and `chunk_overlap_tokens` of `400`. + additionalProperties: false + properties: + type: + type: string + description: Always `auto`. + enum: + - auto + required: + - type + + staticChunkingStrategyRequestParam: + type: object + title: Static Chunking Strategy + additionalProperties: false + properties: + type: + type: string + description: Always `static`. + enum: + - static + static: + $ref: "#/components/schemas/staticChunkingStrategy" + required: + - type + - static + + chunkingStrategyRequestParam: + type: object + description: >- + The chunking strategy used to chunk the file(s). If not set, will use the + `auto` strategy. + oneOf: + - $ref: "#/components/schemas/autoChunkingStrategyRequestParam" + - $ref: "#/components/schemas/staticChunkingStrategyRequestParam" + + createVectorStoreFileRequest: + type: object + additionalProperties: false + properties: + file_id: + description: A File ID that the vector store should use. Useful for tools like `file_search` that can access files. + type: string + chunking_strategy: + $ref: "#/components/schemas/chunkingStrategyRequestParam" + required: + - file_id + + listVectorStoreFilesResponse: + properties: + object: + type: string + example: "list" + data: + type: array + items: + $ref: "#/components/schemas/vectorStoreFileObject" + first_id: + type: string + example: "file-abc123" + last_id: + type: string + example: "file-abc456" + has_more: + type: boolean + example: false + required: + - object + - data + - first_id + - last_id + - has_more + + deleteVectorStoreFileResponse: + type: object + properties: + id: + type: string + deleted: + type: boolean + object: + type: string + enum: [vector_store.file.deleted] + x-ms-enum: + name: DeleteVectorStoreFileResponseObject + modelAsString: true + values: + - value: vector_store.file.deleted + required: + - id + - object + - deleted + + vectorStoreFileBatchObject: + type: object + title: Vector store file batch + description: A batch of files attached to a vector store. + properties: + id: + description: The identifier, which can be referenced in API endpoints. + type: string + object: + description: The object type, which is always `vector_store.file_batch`. + type: string + enum: ["vector_store.files_batch"] + x-ms-enum: + name: VectorStoreFileBatchObjectType + modelAsString: true + values: + - value: vector_store.files_batch + created_at: + description: The Unix timestamp (in seconds) for when the vector store files batch was created. + type: integer + vector_store_id: + description: The ID of the vector store that the File 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`. + type: string + enum: ["in_progress", "completed", "cancelled", "failed"] + x-ms-enum: + name: VectorStoreFileBatchObjectStatus + modelAsString: true + values: + - value: in_progress + - value: completed + - value: cancelled + - value: failed + file_counts: + type: object + properties: + in_progress: + description: The number of files that are currently being processed. + type: integer + completed: + description: The number of files that have been processed. + type: integer + failed: + description: The number of files that have failed to process. + type: integer + cancelled: + description: The number of files that where cancelled. + type: integer + total: + description: The total number of files. + type: integer + required: + - in_progress + - completed + - cancelled + - failed + - total + required: + - id + - object + - created_at + - vector_store_id + - status + - file_counts + + createVectorStoreFileBatchRequest: + type: object + additionalProperties: false + properties: + file_ids: + description: A list of File IDs that the vector store should use. Useful for tools like `file_search` that can access files. + type: array + minItems: 1 + maxItems: 500 + items: + type: string + chunking_strategy: + $ref: "#/components/schemas/chunkingStrategyRequestParam" + required: + - file_ids + + assistantStreamEvent: + description: | + Represents an event emitted when streaming a Run. + + Each event in a server-sent events stream has an `event` and `data` property: + + ``` + event: thread.created + data: {"id": "thread_123", "object": "thread", ...} + ``` + + We emit events whenever a new object is created, transitions to a new state, or is being + streamed in parts (deltas). For example, we emit `thread.run.created` when a new run + is created, `thread.run.completed` when a run completes, and so on. When an Assistant chooses + to create a message during a run, we emit a `thread.message.created event`, a + `thread.message.in_progress` event, many `thread.message.delta` events, and finally a + `thread.message.completed` event. + + We may add additional events over time, so we recommend handling unknown events gracefully + in your code. + oneOf: + - $ref: "#/components/schemas/threadStreamEvent" + - $ref: "#/components/schemas/runStreamEvent" + - $ref: "#/components/schemas/runStepStreamEvent" + - $ref: "#/components/schemas/messageStreamEvent" + - $ref: "#/components/schemas/errorEvent" + - $ref: "#/components/schemas/doneEvent" + + threadStreamEvent: + oneOf: + - type: object + properties: + event: + type: string + enum: ["thread.created"] + x-ms-enum: + name: ThreadStreamEventEnum + modelAsString: true + values: + - value: thread.created + description: The thread created event + data: + $ref: "#/components/schemas/threadObject" + required: + - event + - data + description: Occurs when a new thread is created. + + runStreamEvent: + oneOf: + - type: object + properties: + event: + type: string + enum: ["thread.run.created"] + x-ms-enum: + name: RunStreamEventCreated + modelAsString: true + values: + - value: thread.run.created + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a new run is created. + - type: object + properties: + event: + type: string + enum: ["thread.run.queued"] + x-ms-enum: + name: RunStreamEventQueued + modelAsString: true + values: + - value: thread.run.queued + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run moves to a `queued` status. + - type: object + properties: + event: + type: string + enum: ["thread.run.in_progress"] + x-ms-enum: + name: RunStreamEventInProgress + modelAsString: true + values: + - value: thread.run.in_progress + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run moves to an `in_progress` status. + - type: object + properties: + event: + type: string + enum: ["thread.run.requires_action"] + x-ms-enum: + name: RunStreamEventRequiresAction + modelAsString: true + values: + - value: thread.run.requires_action + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run moves to a `requires_action` status. + - type: object + properties: + event: + type: string + enum: ["thread.run.completed"] + x-ms-enum: + name: RunStreamEventCompleted + modelAsString: true + values: + - value: thread.run.completed + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run is completed. + - type: object + properties: + event: + type: string + enum: ["thread.run.failed"] + x-ms-enum: + name: RunStreamEventFailed + modelAsString: true + values: + - value: thread.run.failed + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run fails. + - type: object + properties: + event: + type: string + enum: ["thread.run.cancelling"] + x-ms-enum: + name: RunStreamEventCancelling + modelAsString: true + values: + - value: thread.run.cancelling + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run moves to a `cancelling` status. + - type: object + properties: + event: + type: string + enum: ["thread.run.cancelled"] + x-ms-enum: + name: RunStreamEventCancelled + modelAsString: true + values: + - value: thread.run.cancelled + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run is cancelled. + - type: object + properties: + event: + type: string + enum: ["thread.run.expired"] + x-ms-enum: + name: RunStreamEventExpired + modelAsString: true + values: + - value: thread.run.expired + data: + $ref: "#/components/schemas/runObject" + required: + - event + - data + description: Occurs when a run expires. + + runStepStreamEvent: + oneOf: + - type: object + properties: + event: + type: string + enum: ["thread.run.step.created"] + x-ms-enum: + name: RunStepStreamEventCreated + modelAsString: true + values: + - value: thread.run.step.created + data: + $ref: "#/components/schemas/runStepObject" + required: + - event + - data + description: Occurs when a run step is created. + + - type: object + properties: + event: + type: string + enum: ["thread.run.step.in_progress"] + x-ms-enum: + name: RunStepStreamEventInProgress + modelAsString: true + values: + - value: thread.run.step.in_progress + data: + $ref: "#/components/schemas/runStepObject" + required: + - event + - data + description: Occurs when a run step moves to an `in_progress` state. + - type: object + properties: + event: + type: string + enum: ["thread.run.step.delta"] + x-ms-enum: + name: RunStepStreamEventDelta + modelAsString: true + values: + - value: thread.run.step.delta + data: + $ref: "#/components/schemas/runStepDeltaObject" + required: + - event + - data + description: Occurs when parts of a run step are being streamed. + - type: object + properties: + event: + type: string + enum: ["thread.run.step.completed"] + x-ms-enum: + name: RunStepStreamEventCompleted + modelAsString: true + values: + - value: thread.run.step.completed + data: + $ref: "#/components/schemas/runStepObject" + required: + - event + - data + description: Occurs when a run step is completed. + - type: object + properties: + event: + type: string + enum: ["thread.run.step.failed"] + x-ms-enum: + name: RunStepStreamEventFailed + modelAsString: true + values: + - value: thread.run.step.failed + data: + $ref: "#/components/schemas/runStepObject" + required: + - event + - data + description: Occurs when a run step fails. + - type: object + properties: + event: + type: string + enum: ["thread.run.step.cancelled"] + x-ms-enum: + name: RunStepStreamEventCancelled + modelAsString: true + values: + - value: thread.run.step.cancelled + data: + $ref: "#/components/schemas/runStepObject" + required: + - event + - data + description: Occurs when a run step is cancelled. + - type: object + properties: + event: + type: string + enum: ["thread.run.step.expired"] + x-ms-enum: + name: RunStepStreamEventExpired + modelAsString: true + values: + - value: thread.run.step.expired + data: + $ref: "#/components/schemas/runStepObject" + required: + - event + - data + description: Occurs when a run step expires. + + messageStreamEvent: + oneOf: + - type: object + properties: + event: + type: string + enum: ["thread.message.created"] + x-ms-enum: + name: MessageStreamEventCreated + modelAsString: true + values: + - value: thread.message.created + data: + $ref: "#/components/schemas/messageObject" + required: + - event + - data + description: Occurs when a message is created. + - type: object + properties: + event: + type: string + enum: ["thread.message.in_progress"] + x-ms-enum: + name: MessageStreamEventInProgress + modelAsString: true + values: + - value: thread.message.in_progress + data: + $ref: "#/components/schemas/messageObject" + required: + - event + - data + description: Occurs when a message moves to an `in_progress` state. + - type: object + properties: + event: + type: string + enum: ["thread.message.delta"] + x-ms-enum: + name: MessageStreamEventDelta + modelAsString: true + values: + - value: thread.message.delta + data: + $ref: "#/components/schemas/messageDeltaObject" + required: + - event + - data + description: Occurs when parts of a message are being streamed. + - type: object + properties: + event: + type: string + enum: ["thread.message.completed"] + x-ms-enum: + name: MessageStreamEventCompleted + modelAsString: true + values: + - value: thread.message.completed + data: + $ref: "#/components/schemas/messageObject" + required: + - event + - data + description: Occurs when a message is completed. + - type: object + properties: + event: + type: string + enum: ["thread.message.incomplete"] + x-ms-enum: + name: MessageStreamEventIncomplete + modelAsString: true + values: + - value: thread.message.incomplete + data: + $ref: "#/components/schemas/messageObject" + required: + - event + - data + description: Occurs when a message ends before it is completed. + + errorEvent: + type: object + properties: + event: + type: string + enum: ["error"] + x-ms-enum: + name: ErrorEventEnum + modelAsString: true + values: + - value: error + data: + $ref: "#/components/schemas/error" + required: + - event + - data + description: Occurs when an error occurs. This can happen due to an internal server error or a timeout. + + doneEvent: + type: object + properties: + event: + type: string + enum: ["done"] + x-ms-enum: + name: DoneEventEnum + modelAsString: true + values: + - value: done + data: + type: string + enum: ["[DONE]"] + x-ms-enum: + name: DoneEventDataEnum + modelAsString: true + values: + - value: "[DONE]" + required: + - event + - data + description: Occurs when a stream ends. + securitySchemes: + bearer: + type: oauth2 + flows: + implicit: + authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize + scopes: {} + x-tokenInfoFunc: api.middleware.auth.bearer_auth + x-scopeValidateFunc: api.middleware.auth.validate_scopes + apiKey: + type: apiKey + name: api-key + in: header diff --git a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md index 7fe18c7a24ec..3f37a5c7bbc2 100644 --- a/specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md +++ b/specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md @@ -285,7 +285,7 @@ input-file: preview/2024-09-01-preview/generated.json These settings apply only when `--tag=release_2024_10_01_preview` is specified on the command line. ``` yaml $(tag) == 'release_2024_10_01_preview' -input-file: preview/2024-09-01-preview/inference.json +input-file: preview/2024-10-01-preview/inference.json ``` ## AzureOpenAI 2024-10-01-preview (generated) @@ -301,3 +301,10 @@ These settings apply only when `--tag=release_2024_10_21` is specified on the co ``` yaml $(tag) == 'release_2024_10_21' input-file: stable/2024-10-21/inference.json ``` + +## AzureOpenAI 2024-12-01-preview +These settings apply only when `--tag=release_2024_12_01_preview` is specified on the command line. + +``` yaml $(tag) == 'release_2024_12_01_preview' +input-file: preview/2024-12-01-preview/inference.json +```