specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-08-01-preview/azureopenai.yaml [880:1629]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      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
      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
    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"
  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"
  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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-09-01-preview/azureopenai.yaml [880:1629]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      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
      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
    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"
  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"
  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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



