specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-05-01-preview/azureopenai.yaml [680:1020]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  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
  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
  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
  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
        readOnly: true
      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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2024-07-01-preview/azureopenai.yaml [1030:1370]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  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
  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
  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
  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
        readOnly: true
      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
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



