specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2025-01-01-preview/azureopenai.yaml [1182:2019]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  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
  DpoHyperparamsRequest:
    title: DpoHyperparamsRequest
    type: object
    properties:
      n_epochs:
        type: integer
        description: The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
        format: int32
      batch_size:
        type: integer
        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."
        format: int32
      learning_rate_multiplier:
        type: number
        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."
        format: double
      beta:
        type: number
        description: Dpo beta value.
        format: double
      l2_multiplier:
        type: number
        description: L2 regularization multiplier
        format: double
    description: Hyperparameters for DPO method of finetuning      
  DpoMethod:
    title: DpoMethod
    required:
      - dpo
      - type
    type: object
    allOf:
      - $ref: '#/definitions/FineTuneMethod'
    properties:
      type:
        $ref: '#/definitions/FineTuningMethodType'
      dpo:
        $ref: '#/definitions/DpoMethodConfigRequest'
    description: Request for DPO method finetuning  
  DpoMethodConfigRequest:
    title: DpoMethodConfigRequest
    type: object
    properties:
      hyperparameters:
        $ref: '#/definitions/DpoHyperparamsRequest'
    description: Configuration for dpo finetuning method. Includes DPO specific hyperparameters  
  DpoMethodRequest:
    title: DpoMethodRequest
    required:
      - dpo
      - type
    type: object
    allOf:
      - $ref: '#/definitions/FineTuneMethodRequest'
    properties:
      type:
        $ref: '#/definitions/FineTuningMethodType'
      dpo:
        $ref: '#/definitions/DpoMethodConfigRequest'
    description: Request for DPO method finetuning  
  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.
  FineTuneMethod:
    title: FineTuneMethod
    required:
      - kind
    type: object
    properties:
      kind:
        $ref: '#/definitions/FineTuningMethodType'
    discriminator: kind
  FineTuneMethodRequest:
    title: FineTuneMethodRequest
    required:
      - kind
    type: object
    properties:
      kind:
        $ref: '#/definitions/FineTuningMethodType'
    discriminator: kind
  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."
      method:
        title: FineTuneMethod
        enum:
          - $ref: '#/definitions/SupervisedMethod'
          - $ref: '#/definitions/DpoMethod'
        description: A configuration for finetuning method for the finetuning job. Currently 'dpo' and 'supervised' methods are supported.
  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:
        type: string
        description: The identity of this checkpoint.
        readOnly: true
      created_at:
        type: integer
        description: The Unix timestamp (in seconds) for when the checkpoint was created.
        format: unixtime
      fine_tuned_model_checkpoint:
        minLength: 1
        type: string
        description: The name of the fine-tuned checkpoint model that is created.
      step_number:
        type: integer
        description: The step number that the checkpoint was created at.
        format: int32
      metrics:
        title: Dictionary`2
        type: object
        additionalProperties:
          type: number
          format: double
        description: The metrics at the step number during the fine-tuning job.
      fine_tuning_job_id:
        minLength: 1
        type: string
        description: The name of the fine-tuning job that this checkpoint was created from..      
  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."
      method:
        title: FineTuneMethodRequest
        enum:
          - $ref: '#/definitions/SupervisedMethodRequest'
          - $ref: '#/definitions/DpoMethodRequest'
        description: A configuration for finetuning method for the finetuning job. Currently 'dpo' and 'supervised' methods are supported.   
  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.
  FineTuningMethodType:
    title: FineTuningMethodType
    enum:
      - dpo
      - supervised
    type: string
    x-ms-enum:
      name: FineTuningMethodType
      modelAsString: true
      values:
        - value: dpo
          description: Finetunes using Dpo algorithm
        - value: supervised
          description: Finetunes using Supervised algorithm
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



specification/cognitiveservices/data-plane/AzureOpenAI/authoring/preview/2025-02-01-preview/azureopenai.yaml [1388:2225]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  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
  DpoHyperparamsRequest:
    title: DpoHyperparamsRequest
    type: object
    properties:
      n_epochs:
        type: integer
        description: The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
        format: int32
      batch_size:
        type: integer
        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."
        format: int32
      learning_rate_multiplier:
        type: number
        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."
        format: double
      beta:
        type: number
        description: Dpo beta value.
        format: double
      l2_multiplier:
        type: number
        description: L2 regularization multiplier
        format: double
    description: Hyperparameters for DPO method of finetuning      
  DpoMethod:
    title: DpoMethod
    required:
      - dpo
      - type
    type: object
    allOf:
      - $ref: '#/definitions/FineTuneMethod'
    properties:
      type:
        $ref: '#/definitions/FineTuningMethodType'
      dpo:
        $ref: '#/definitions/DpoMethodConfigRequest'
    description: Request for DPO method finetuning  
  DpoMethodConfigRequest:
    title: DpoMethodConfigRequest
    type: object
    properties:
      hyperparameters:
        $ref: '#/definitions/DpoHyperparamsRequest'
    description: Configuration for dpo finetuning method. Includes DPO specific hyperparameters  
  DpoMethodRequest:
    title: DpoMethodRequest
    required:
      - dpo
      - type
    type: object
    allOf:
      - $ref: '#/definitions/FineTuneMethodRequest'
    properties:
      type:
        $ref: '#/definitions/FineTuningMethodType'
      dpo:
        $ref: '#/definitions/DpoMethodConfigRequest'
    description: Request for DPO method finetuning  
  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.
  FineTuneMethod:
    title: FineTuneMethod
    required:
      - kind
    type: object
    properties:
      kind:
        $ref: '#/definitions/FineTuningMethodType'
    discriminator: kind
  FineTuneMethodRequest:
    title: FineTuneMethodRequest
    required:
      - kind
    type: object
    properties:
      kind:
        $ref: '#/definitions/FineTuningMethodType'
    discriminator: kind
  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."
      method:
        title: FineTuneMethod
        enum:
          - $ref: '#/definitions/SupervisedMethod'
          - $ref: '#/definitions/DpoMethod'
        description: A configuration for finetuning method for the finetuning job. Currently 'dpo' and 'supervised' methods are supported.
  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:
        type: string
        description: The identity of this checkpoint.
        readOnly: true
      created_at:
        type: integer
        description: The Unix timestamp (in seconds) for when the checkpoint was created.
        format: unixtime
      fine_tuned_model_checkpoint:
        minLength: 1
        type: string
        description: The name of the fine-tuned checkpoint model that is created.
      step_number:
        type: integer
        description: The step number that the checkpoint was created at.
        format: int32
      metrics:
        title: Dictionary`2
        type: object
        additionalProperties:
          type: number
          format: double
        description: The metrics at the step number during the fine-tuning job.
      fine_tuning_job_id:
        minLength: 1
        type: string
        description: The name of the fine-tuning job that this checkpoint was created from..      
  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."
      method:
        title: FineTuneMethodRequest
        enum:
          - $ref: '#/definitions/SupervisedMethodRequest'
          - $ref: '#/definitions/DpoMethodRequest'
        description: A configuration for finetuning method for the finetuning job. Currently 'dpo' and 'supervised' methods are supported.   
  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.
  FineTuningMethodType:
    title: FineTuningMethodType
    enum:
      - dpo
      - supervised
    type: string
    x-ms-enum:
      name: FineTuningMethodType
      modelAsString: true
      values:
        - value: dpo
          description: Finetunes using Dpo algorithm
        - value: supervised
          description: Finetunes using Supervised algorithm
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



