specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-12-01-preview/inference.yaml [3013:4367]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    chatCompletionRequestMessageContentPartImage:
      type: object
      title: Image content part
      properties:
        type:
          type: string
          enum: ["image_url"]
          description: The type of the content part.
        image_url:
          type: object
          properties:
            url:
              type: string
              description: Either a URL of the image or the base64 encoded image data.
              format: uri
            detail:
              type: string
              description: Specifies the detail level of the image. Learn more in the [Vision guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision?tabs=rest%2Csystem-assigned%2Cresource#detail-parameter-settings-in-image-processing-low-high-auto).
              enum: ["auto", "low", "high"]
              default: "auto"
          required:
            - url
      required:
        - type
        - image_url

    chatCompletionRequestMessageContentPartRefusal:
      type: object
      title: Refusal content part
      properties:
        type:
          type: string
          enum: ["refusal"]
          description: The type of the content part.
        refusal:
          type: string
          description: The refusal message generated by the model.
      required:
        - type
        - refusal
    azureChatExtensionConfiguration:
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/azureChatExtensionType"
      description: |2-
          A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat
          completions request that should use Azure OpenAI chat extensions to augment the response behavior.
          The use of this configuration is compatible only with Azure OpenAI.
      discriminator:
        propertyName: type
        mapping:
          azure_search: "#/components/schemas/azureSearchChatExtensionConfiguration"
          azure_cosmos_db: "#/components/schemas/azureCosmosDBChatExtensionConfiguration"
          elasticsearch: "#/components/schemas/elasticsearchChatExtensionConfiguration"
          mongo_db: "#/components/schemas/mongoDBChatExtensionConfiguration"
          pinecone: "#/components/schemas/pineconeChatExtensionConfiguration"
    azureChatExtensionType:
      type: string
      description: |2-
          A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat
          completions request that should use Azure OpenAI chat extensions to augment the response behavior.
          The use of this configuration is compatible only with Azure OpenAI.
      enum:
        - azure_search
        - azure_cosmos_db
        - elasticsearch
        - mongo_db
        - pinecone
      x-ms-enum:
        name: AzureChatExtensionType
        modelAsString: true
        values:
          - name: azureSearch
            value: azure_search
            description: Represents the use of Azure Search as an Azure OpenAI chat extension.
          - name: azureCosmosDB
            value: azure_cosmos_db
            description: Represents the use of Azure Cosmos DB as an Azure OpenAI chat extension.
          - name: elasticsearch
            value: elasticsearch
            description: Represents the use of Elasticsearch® index as an Azure OpenAI chat extension.
          - name: mongoDB
            value: mongo_db
            description: Represents the use of Mongo DB as an Azure OpenAI chat extension.
          - name: pinecone
            value: pinecone
            description: Represents the use of Pinecone index as an Azure OpenAI chat extension.
    azureSearchChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Azure Search when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/azureSearchChatExtensionParameters"
      x-ms-discriminator-value: azure_search
    azureSearchChatExtensionParameters:
      required:
        - authentication
        - endpoint
        - index_name
      type: object
      properties:
        authentication:
          oneOf:
            - $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        endpoint:
          type: string
          description: The absolute endpoint path for the Azure Search resource to use.
          format: uri
        index_name:
          type: string
          description: The name of the index to use as available in the referenced Azure Search resource.
        fields_mapping:
          $ref: "#/components/schemas/azureSearchIndexFieldMappingOptions"
        query_type:
          $ref: "#/components/schemas/azureSearchQueryType"
        semantic_configuration:
          type: string
          description: The additional semantic configuration for the query.
        filter:
          type: string
          description: Search filter.
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
            - $ref: "#/components/schemas/onYourDataIntegratedVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: Parameters for Azure Search when used as an Azure OpenAI chat extension.
    azureSearchIndexFieldMappingOptions:
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
        image_vector_fields:
          type: array
          description: The names of fields that represent image vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Azure Search resource.
    azureSearchQueryType:
      type: string
      description: The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension.
      enum:
        - simple
        - semantic
        - vector
        - vector_simple_hybrid
        - vector_semantic_hybrid
      x-ms-enum:
        name: AzureSearchQueryType
        modelAsString: true
        values:
          - name: simple
            value: simple
            description: Represents the default, simple query parser.
          - name: semantic
            value: semantic
            description: Represents the semantic query parser for advanced semantic modeling.
          - name: vector
            value: vector
            description: Represents vector search over computed data.
          - name: vectorSimpleHybrid
            value: vector_simple_hybrid
            description: Represents a combination of the simple query strategy with vector data.
          - name: vectorSemanticHybrid
            value: vector_semantic_hybrid
            description: Represents a combination of semantic search and vector data querying.
    azureCosmosDBChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Azure Cosmos DB when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/azureCosmosDBChatExtensionParameters"
      x-ms-discriminator-value: azure_cosmos_db
    azureCosmosDBChatExtensionParameters:
      required:
        - authentication
        - container_name
        - database_name
        - embedding_dependency
        - fields_mapping
        - index_name
      type: object
      properties:
        authentication:
          $ref: "#/components/schemas/onYourDataConnectionStringAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        database_name:
          type: string
          description: The MongoDB vCore database name to use with Azure Cosmos DB.
        container_name:
          type: string
          description: The name of the Azure Cosmos DB resource container.
        index_name:
          type: string
          description: The MongoDB vCore index name to use with Azure Cosmos DB.
        fields_mapping:
          $ref: "#/components/schemas/azureCosmosDBFieldMappingOptions"
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: |-
        Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Azure Cosmos DB for
        MongoDB vCore.
    azureCosmosDBFieldMappingOptions:
      required:
        - content_fields
        - vector_fields
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Azure Cosmos DB resource.
    elasticsearchChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Elasticsearch when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/elasticsearchChatExtensionParameters"
      x-ms-discriminator-value: elasticsearch
    elasticsearchChatExtensionParameters:
      required:
        - authentication
        - endpoint
        - index_name
      type: object
      properties:
        authentication:
          oneOf:
            - $ref: "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        endpoint:
          type: string
          description: The endpoint of Elasticsearch®.
          format: uri
        index_name:
          type: string
          description: The index name of Elasticsearch®.
        fields_mapping:
          $ref: "#/components/schemas/elasticsearchIndexFieldMappingOptions"
        query_type:
          $ref: "#/components/schemas/elasticsearchQueryType"
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
            - $ref: "#/components/schemas/onYourDataModelIdVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: "Parameters to use when configuring Elasticsearch® as an Azure OpenAI chat extension. "
    elasticsearchIndexFieldMappingOptions:
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Elasticsearch® resource.
    elasticsearchQueryType:
      type: string
      description: The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension.
      enum:
        - simple
        - vector
      x-ms-enum:
        name: ElasticsearchQueryType
        modelAsString: true
        values:
          - name: simple
            value: simple
            description: Represents the default, simple query parser.
          - name: vector
            value: vector
            description: Represents vector search over computed data.
    mongoDBChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Mongo DB when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/mongoDBChatExtensionParameters"
      x-ms-discriminator-value: mongo_db
    mongoDBChatExtensionParameters:
      required:
        - authentication
        - app_name
        - collection_name
        - database_name
        - endpoint
        - embedding_dependency
        - fields_mapping
        - index_name
      type: object
      properties:
        authentication:
          $ref: "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        endpoint:
          type: string
          description: The name of the Mongo DB cluster endpoint.
        database_name:
          type: string
          description: The name of the Mongo DB database.
        collection_name:
          type: string
          description: The name of the Mongo DB Collection.
        app_name:
          type: string
          description: The name of the Mongo DB Application.
        index_name:
          type: string
          description: The The name of the Mongo DB index.
        fields_mapping:
          $ref: "#/components/schemas/mongoDBFieldMappingOptions"
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: |-
        Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Mongo DB.

    mongoDBFieldMappingOptions:
      required:
        - content_fields
        - vector_fields
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Mongo DB resource.

    pineconeChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Pinecone when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/pineconeChatExtensionParameters"
      x-ms-discriminator-value: pinecone
    pineconeChatExtensionParameters:
      required:
        - authentication
        - embedding_dependency
        - environment
        - fields_mapping
        - index_name
      type: object
      properties:
        authentication:
          $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        environment:
          type: string
          description: The environment name of Pinecone.
        index_name:
          type: string
          description: The name of the Pinecone database index.
        fields_mapping:
          $ref: "#/components/schemas/pineconeFieldMappingOptions"
        embedding_dependency:
          $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: Parameters for configuring Azure OpenAI Pinecone chat extensions.
    pineconeFieldMappingOptions:
      required:
        - content_fields
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
      description: Optional settings to control how fields are processed when using a configured Pinecone resource.
    onYourDataAuthenticationOptions:
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/onYourDataAuthenticationType"
      description: The authentication options for Azure OpenAI On Your Data.
      discriminator:
        propertyName: type
        mapping:
          api_key: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
          connection_string: "#/components/schemas/onYourDataConnectionStringAuthenticationOptions"
          key_and_key_id: "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions"
          encoded_api_key: "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions"
          access_token: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions"
          system_assigned_managed_identity: "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions"
          user_assigned_managed_identity: "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions"
          username_and_password: "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions"
    onYourDataContextProperty:
      type: string
      description: The context property.
      enum:
        - citations
        - intent
        - all_retrieved_documents
      x-ms-enum:
        name: OnYourDataContextProperty
        modelAsString: true
        values:
          - name: citations
            value: citations
            description: The `citations` property.
          - name: intent
            value: intent
            description: The `intent` property.
          - name: allRetrievedDocuments
            value: all_retrieved_documents
            description: The `all_retrieved_documents` property.
    onYourDataAuthenticationType:
      type: string
      description: The authentication types supported with Azure OpenAI On Your Data.
      enum:
        - api_key
        - connection_string
        - key_and_key_id
        - encoded_api_key
        - access_token
        - system_assigned_managed_identity
        - user_assigned_managed_identity
        - username_and_password
      x-ms-enum:
        name: OnYourDataAuthenticationType
        modelAsString: true
        values:
          - name: apiKey
            value: api_key
            description: Authentication via API key.
          - name: connectionString
            value: connection_string
            description: Authentication via connection string.
          - name: keyAndKeyId
            value: key_and_key_id
            description: Authentication via key and key ID pair.
          - name: encodedApiKey
            value: encoded_api_key
            description: Authentication via encoded API key.
          - name: accessToken
            value: access_token
            description: Authentication via access token.
          - name: systemAssignedManagedIdentity
            value: system_assigned_managed_identity
            description: Authentication via system-assigned managed identity.
          - name: userAssignedManagedIdentity
            value: user_assigned_managed_identity
            description: Authentication via user-assigned managed identity.
          - name: usernameAndPassword
            value: username_and_password
            description: Authentication via username and password.
    onYourDataApiKeyAuthenticationOptions:
      required:
        - key
      description: The authentication options for Azure OpenAI On Your Data when using an API key.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            key:
              type: string
              description: The API key to use for authentication.
      x-ms-discriminator-value: api_key
    onYourDataConnectionStringAuthenticationOptions:
      required:
        - connection_string
      description: The authentication options for Azure OpenAI On Your Data when using a connection string.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            connection_string:
              type: string
              description: The connection string to use for authentication.
      x-ms-discriminator-value: connection_string
    onYourDataKeyAndKeyIdAuthenticationOptions:
      required:
        - key
        - key_id
      description: The authentication options for Azure OpenAI On Your Data when using an Elasticsearch key and key ID pair.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            key:
              type: string
              description: The Elasticsearch key to use for authentication.
            key_id:
              type: string
              description: The Elasticsearch key ID to use for authentication.
      x-ms-discriminator-value: key_and_key_id
    onYourDataEncodedApiKeyAuthenticationOptions:
      required:
        - encoded_api_key
      description: The authentication options for Azure OpenAI On Your Data when using an Elasticsearch encoded API key.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            encoded_api_key:
              type: string
              description: The Elasticsearch encoded API key to use for authentication.
      x-ms-discriminator-value: encoded_api_key
    onYourDataAccessTokenAuthenticationOptions:
      required:
        - access_token
      description: The authentication options for Azure OpenAI On Your Data when using access token.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            access_token:
              type: string
              description: The access token to use for authentication.
      x-ms-discriminator-value: access_token
    onYourDataSystemAssignedManagedIdentityAuthenticationOptions:
      description: The authentication options for Azure OpenAI On Your Data when using a system-assigned managed identity.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
      x-ms-discriminator-value: system_assigned_managed_identity
    onYourDataUserAssignedManagedIdentityAuthenticationOptions:
      required:
        - managed_identity_resource_id
      description: The authentication options for Azure OpenAI On Your Data when using a user-assigned managed identity.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            managed_identity_resource_id:
              type: string
              description: The resource ID of the user-assigned managed identity to use for authentication.
      x-ms-discriminator-value: user_assigned_managed_identity
    onYourDataUsernameAndPasswordAuthenticationOptions:
      required:
        - username
        - password
      description: The authentication options for Azure OpenAI On Your Data when using a username and a password.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            username:
              type: string
              description: The username to use for authentication.
            password:
              type: string
              description: The password. to use for authentication.
      x-ms-discriminator-value: username_and_password
    onYourDataVectorizationSource:
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/onYourDataVectorizationSourceType"
      description: An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search.
      discriminator:
        propertyName: type
        mapping:
          endpoint: "#/components/schemas/onYourDataEndpointVectorizationSource"
          deployment_name: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
          integrated: "#/components/schemas/onYourDataIntegratedVectorizationSource"
          model_id: "#/components/schemas/onYourDataModelIdVectorizationSource"
    onYourDataVectorizationSourceType:
      type: string
      description: |-
        Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with
        vector search.
      enum:
        - endpoint
        - deployment_name
        - integrated
        - model_id
      x-ms-enum:
        name: OnYourDataVectorizationSourceType
        modelAsString: true
        values:
          - name: endpoint
            value: endpoint
            description: Represents vectorization performed by public service calls to an Azure OpenAI embedding model.
          - name: deploymentName
            value: deployment_name
            description: |-
              Represents an Ada model deployment name to use. This model deployment must be in the same Azure OpenAI resource, but
              On Your Data will use this model deployment via an internal call rather than a public one, which enables vector
              search even in private networks.
          - name: integrated
            value: integrated
            description: Represents the integrated vectorizer defined within the search resource.
          - name: modelId
            value: model_id
            description: |-
              Represents a specific embedding model ID as defined in the search service.
              Currently only supported by Elasticsearch®.
    onYourDataEndpointVectorizationSource:
      required:
        - authentication
        - endpoint
      description: |-
        The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based
        on a public Azure OpenAI endpoint call for embeddings.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
        - properties:
            endpoint:
              type: string
              description: Specifies the resource endpoint URL from which embeddings should be retrieved. It should be in the format of https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/embeddings. The api-version query parameter is not allowed.
              format: uri
            authentication:
              oneOf:
                - $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
                - $ref: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions"
            dimensions:
              type: integer
              description: The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models.
              format: int32
      x-ms-discriminator-value: endpoint
    onYourDataDeploymentNameVectorizationSource:
      required:
        - deployment_name
      description: |-
        The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based
        on an internal embeddings model deployment name in the same Azure OpenAI resource.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
        - properties:
            deployment_name:
              type: string
              description: Specifies the name of the model deployment to use for vectorization. This model deployment must be in the same Azure OpenAI resource, but On Your Data will use this model deployment via an internal call rather than a public one, which enables vector search even in private networks.
            dimensions:
              type: integer
              description: The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models.
              format: int32
      x-ms-discriminator-value: deployment_name
    onYourDataIntegratedVectorizationSource:
      description: |-
        Represents the integrated vectorizer defined within the search resource.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
      x-ms-discriminator-value: integrated
    onYourDataModelIdVectorizationSource:
      required:
        - model_id
      description: |-
        The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based
        on a search service model ID. Currently only supported by Elasticsearch®.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
        - properties:
            model_id:
              type: string
              description: Specifies the model ID to use for vectorization. This model ID must be defined in the search service.
      x-ms-discriminator-value: model_id
    azureChatExtensionsMessageContext:
      type: object
      properties:
        citations:
          type: array
          description: The data source retrieval result, used to generate the assistant message in the response.
          items:
            $ref: "#/components/schemas/citation"
          x-ms-identifiers: []
        intent:
          type: string
          description: The detected intent from the chat history, used to pass to the next turn to carry over the context.
        all_retrieved_documents:
          type: array
          description: All the retrieved documents.
          items:
            $ref: "#/components/schemas/retrievedDocument"

      description: |2-
          A representation of the additional context information available when Azure OpenAI chat extensions are involved
          in the generation of a corresponding chat completions response. This context information is only populated when
          using an Azure OpenAI request configured to use a matching extension.
    citation:
      required:
        - content
      type: object
      properties:
        content:
          type: string
          description: The content of the citation.
        title:
          type: string
          description: The title of the citation.
        url:
          type: string
          description: The URL of the citation.
        filepath:
          type: string
          description: The file path of the citation.
        chunk_id:
          type: string
          description: The chunk ID of the citation.
        rerank_score:
          type: number
          description: The rerank score of the retrieved document.
          format: double
      description: citation information for a chat completions response message.
    retrievedDocument:
      type: object
      description: The retrieved document.
      required:
        - search_queries
        - data_source_index
      allOf:
        - $ref: "#/components/schemas/citation"
        - properties:
            search_queries:
              type: array
              description: The search queries used to retrieve the document.
              items:
                type: string
            data_source_index:
              type: integer
              description: The index of the data source.
              format: int32
            original_search_score:
              type: number
              description: The original search score of the retrieved document.
              format: double
            filter_reason:
              $ref: "#/components/schemas/filterReason"
              description: Represents the rationale for filtering the document. If the document does not undergo filtering, this field will remain unset.

    filterReason:
      type: string
      description: The filtering reason of the retrieved document.
      enum:
        - score
        - rerank
      x-ms-enum:
        name: FilterReason
        modelAsString: true
        values:
          - name: score
            value: score
            description: The document is filtered by original search score threshold defined by `strictness` configure.
          - name: rerank
            value: rerank
            description: The document is not filtered by original search score threshold, but is filtered by rerank score and `top_n_documents` configure.

    chatCompletionMessageToolCall:
      type: object
      properties:
        id:
          type: string
          description: The ID of the tool call.
        type:
          $ref: "#/components/schemas/toolCallType"
        function:
          type: object
          description: The function that the model called.
          properties:
            name:
              type: string
              description: The name of the function to call.
            arguments:
              type: string
              description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
          required:
            - name
            - arguments
      required:
        - id
        - type
        - function
    toolCallType:
      type: string
      enum:
        - function
      description: The type of the tool call, in this case `function`.
      x-ms-enum:
        name: ToolCallType
        modelAsString: true
        values:
          - value: function
            description: The tool call type is function.
    chatCompletionRequestMessageTool:
      allOf:
        - $ref: "#/components/schemas/chatCompletionRequestMessage"
        - type: object
          nullable: true
          properties:
            tool_call_id:
              type: string
              description: Tool call that this message is responding to.
            content:
              type: string
              description: The contents of the message.
              nullable: true
      required:
        - tool_call_id
        - content
    chatCompletionRequestMessageFunction:
      allOf:
        - $ref: "#/components/schemas/chatCompletionRequestMessage"
        - type: object
          description: Deprecated. Message that represents a function.
          nullable: true
          properties:
            role:
              type: string
              enum:
                - function
              description: The role of the messages author, in this case `function`.
            name:
              type: string
              description: The contents of the message.
            content:
              type: string
              description: The contents of the message.
              nullable: true
      required:
        - function_call_id
        - content
    createChatCompletionResponse:
      type: object
      description: Represents a chat completion response returned by model, based on the provided input.
      properties:
        id:
          type: string
          description: A unique identifier for the chat completion.
        prompt_filter_results:
          $ref: "#/components/schemas/promptFilterResults"
        choices:
          type: array
          description: A list of chat completion choices. Can be more than one if `n` is greater than 1.
          items:
            type: object
            required:
              - finish_reason
              - index
              - message
              - logprobs
            properties:
              finish_reason:
                type: string
                description: &chat_completion_finish_reason_description |
                  The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
                  `length` if the maximum number of tokens specified in the request was reached,
                  `content_filter` if content was omitted due to a flag from our content filters,
                  `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.
                enum:
                  [
                    "stop",
                    "length",
                    "tool_calls",
                    "content_filter",
                    "function_call",
                  ]
              index:
                type: integer
                description: The index of the choice in the list of choices.
              message:
                $ref: "#/components/schemas/chatCompletionResponseMessage"
              content_filter_results:
                $ref: "#/components/schemas/contentFilterChoiceResults"
              logprobs: &chat_completion_response_logprobs
                description: Log probability information for the choice.
                type: object
                nullable: true
                properties:
                  content:
                    description: A list of message content tokens with log probability information.
                    type: array
                    items:
                      $ref: "#/components/schemas/chatCompletionTokenLogprob"
                    nullable: true
                  refusal:
                    description: A list of message refusal tokens with log probability information.
                    type: array
                    items:
                      $ref: "#/components/schemas/chatCompletionTokenLogprob"
                    nullable: true
                required:
                  - content
                  - refusal
        created:
          type: integer
          description: The Unix timestamp (in seconds) of when the chat completion was created.
        model:
          type: string
          description: The model used for the chat completion.
        system_fingerprint:
          type: string
          description: |
            This fingerprint represents the backend configuration that the model runs with.

            Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
        object:
          type: string
          description: The object type, which is always `chat.completion`.
          enum: [chat.completion]
        usage:
          $ref: "#/components/schemas/completionUsage"
      required:
        - choices
        - created
        - id
        - model
        - object

    createChatCompletionStreamResponse:
      type: object
      description: Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
      properties:
        id:
          type: string
          description: A unique identifier for the chat completion. Each chunk has the same ID.
        choices:
          type: array
          description: |
            A list of chat completion choices. Can contain more than one elements if `n` is greater than 1.
          items:
            type: object
            required:
              - delta
              - finish_reason
              - index
            properties:
              delta:
                $ref: "#/components/schemas/chatCompletionStreamResponseDelta"
              logprobs: *chat_completion_response_logprobs
              finish_reason:
                type: string
                description: *chat_completion_finish_reason_description
                enum:
                  [
                    "stop",
                    "length",
                    "tool_calls",
                    "content_filter",
                    "function_call",
                  ]
                nullable: true
              index:
                type: integer
                description: The index of the choice in the list of choices.
        created:
          type: integer
          description: The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
        model:
          type: string
          description: The model to generate the completion.
        system_fingerprint:
          type: string
          description: |
            This fingerprint represents the backend configuration that the model runs with.
            Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
        object:
          type: string
          description: The object type, which is always `chat.completion.chunk`.
          enum: [chat.completion.chunk]
          required:
            - prompt_tokens
            - completion_tokens
            - total_tokens
      required:
        - choices
        - created
        - id
        - model
        - object

    chatCompletionStreamResponseDelta:
      type: object
      description: A chat completion delta generated by streamed model responses.
      properties:
        content:
          type: string
          description: The contents of the chunk message.
          nullable: true
        function_call:
          deprecated: true
          type: object
          description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."
          properties:
            arguments:
              type: string
              description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
            name:
              type: string
              description: The name of the function to call.
        tool_calls:
          type: array
          items:
            $ref: "#/components/schemas/chatCompletionMessageToolCallChunk"
        role:
          type: string
          enum: ["system", "user", "assistant", "tool"]
          description: The role of the author of this message.
        refusal:
          type: string
          description: The refusal message generated by the model.
          nullable: true

    chatCompletionMessageToolCallChunk:
      type: object
      properties:
        index:
          type: integer
        id:
          type: string
          description: The ID of the tool call.
        type:
          type: string
          enum: ["function"]
          description: The type of the tool. Currently, only `function` is supported.
        function:
          type: object
          properties:
            name:
              type: string
              description: The name of the function to call.
            arguments:
              type: string
              description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
      required:
        - index

    chatCompletionStreamOptions:
      description: |
        Options for streaming response. Only set this when you set `stream: true`.
      type: object
      nullable: true
      default: null
      properties:
        include_usage:
          type: boolean
          description: |
            If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.

    chatCompletionChoiceLogProbs:
      description: Log probability information for the choice.
      type: object
      nullable: true
      properties:
        content:
          description: A list of message content tokens with log probability information.
          type: array
          items:
            $ref: "#/components/schemas/chatCompletionTokenLogprob"
          nullable: true
        refusal:
          description: A list of message refusal tokens with log probability information.
          type: array
          items:
            $ref: "#/components/schemas/chatCompletionTokenLogprob"
          nullable: true
      required:
        - content
    chatCompletionTokenLogprob:
      type: object
      properties:
        token:
          description: The token.
          type: string
        logprob:
          description: The log probability of this token.
          type: number
        bytes:
          description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
          type: array
          items:
            type: integer
          nullable: true
        top_logprobs:
          description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
          type: array
          items:
            type: object
            properties:
              token:
                description: The token.
                type: string
              logprob:
                description: The log probability of this token.
                type: number
              bytes:
                description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
                type: array
                items:
                  type: integer
                nullable: true
            required:
              - token
              - logprob
              - bytes
      required:
        - token
        - logprob
        - bytes
        - top_logprobs

    chatCompletionResponseMessage:
      type: object
      description: A chat completion message generated by the model.
      properties:
        role:
          $ref: "#/components/schemas/chatCompletionResponseMessageRole"
        refusal:
          type: string
          description: The refusal message generated by the model.
          nullable: true
        content:
          type: string
          description: The contents of the message.
          nullable: true
        tool_calls:
          type: array
          description: The tool calls generated by the model, such as function calls.
          items:
            $ref: "#/components/schemas/chatCompletionMessageToolCall"
        function_call:
          $ref: "#/components/schemas/chatCompletionFunctionCall"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2025-02-01-preview/inference.yaml [3097:4451]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    chatCompletionRequestMessageContentPartImage:
      type: object
      title: Image content part
      properties:
        type:
          type: string
          enum: ["image_url"]
          description: The type of the content part.
        image_url:
          type: object
          properties:
            url:
              type: string
              description: Either a URL of the image or the base64 encoded image data.
              format: uri
            detail:
              type: string
              description: Specifies the detail level of the image. Learn more in the [Vision guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision?tabs=rest%2Csystem-assigned%2Cresource#detail-parameter-settings-in-image-processing-low-high-auto).
              enum: ["auto", "low", "high"]
              default: "auto"
          required:
            - url
      required:
        - type
        - image_url

    chatCompletionRequestMessageContentPartRefusal:
      type: object
      title: Refusal content part
      properties:
        type:
          type: string
          enum: ["refusal"]
          description: The type of the content part.
        refusal:
          type: string
          description: The refusal message generated by the model.
      required:
        - type
        - refusal
    azureChatExtensionConfiguration:
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/azureChatExtensionType"
      description: |2-
          A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat
          completions request that should use Azure OpenAI chat extensions to augment the response behavior.
          The use of this configuration is compatible only with Azure OpenAI.
      discriminator:
        propertyName: type
        mapping:
          azure_search: "#/components/schemas/azureSearchChatExtensionConfiguration"
          azure_cosmos_db: "#/components/schemas/azureCosmosDBChatExtensionConfiguration"
          elasticsearch: "#/components/schemas/elasticsearchChatExtensionConfiguration"
          mongo_db: "#/components/schemas/mongoDBChatExtensionConfiguration"
          pinecone: "#/components/schemas/pineconeChatExtensionConfiguration"
    azureChatExtensionType:
      type: string
      description: |2-
          A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat
          completions request that should use Azure OpenAI chat extensions to augment the response behavior.
          The use of this configuration is compatible only with Azure OpenAI.
      enum:
        - azure_search
        - azure_cosmos_db
        - elasticsearch
        - mongo_db
        - pinecone
      x-ms-enum:
        name: AzureChatExtensionType
        modelAsString: true
        values:
          - name: azureSearch
            value: azure_search
            description: Represents the use of Azure Search as an Azure OpenAI chat extension.
          - name: azureCosmosDB
            value: azure_cosmos_db
            description: Represents the use of Azure Cosmos DB as an Azure OpenAI chat extension.
          - name: elasticsearch
            value: elasticsearch
            description: Represents the use of Elasticsearch® index as an Azure OpenAI chat extension.
          - name: mongoDB
            value: mongo_db
            description: Represents the use of Mongo DB as an Azure OpenAI chat extension.
          - name: pinecone
            value: pinecone
            description: Represents the use of Pinecone index as an Azure OpenAI chat extension.
    azureSearchChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Azure Search when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/azureSearchChatExtensionParameters"
      x-ms-discriminator-value: azure_search
    azureSearchChatExtensionParameters:
      required:
        - authentication
        - endpoint
        - index_name
      type: object
      properties:
        authentication:
          oneOf:
            - $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        endpoint:
          type: string
          description: The absolute endpoint path for the Azure Search resource to use.
          format: uri
        index_name:
          type: string
          description: The name of the index to use as available in the referenced Azure Search resource.
        fields_mapping:
          $ref: "#/components/schemas/azureSearchIndexFieldMappingOptions"
        query_type:
          $ref: "#/components/schemas/azureSearchQueryType"
        semantic_configuration:
          type: string
          description: The additional semantic configuration for the query.
        filter:
          type: string
          description: Search filter.
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
            - $ref: "#/components/schemas/onYourDataIntegratedVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: Parameters for Azure Search when used as an Azure OpenAI chat extension.
    azureSearchIndexFieldMappingOptions:
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
        image_vector_fields:
          type: array
          description: The names of fields that represent image vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Azure Search resource.
    azureSearchQueryType:
      type: string
      description: The type of Azure Search retrieval query that should be executed when using it as an Azure OpenAI chat extension.
      enum:
        - simple
        - semantic
        - vector
        - vector_simple_hybrid
        - vector_semantic_hybrid
      x-ms-enum:
        name: AzureSearchQueryType
        modelAsString: true
        values:
          - name: simple
            value: simple
            description: Represents the default, simple query parser.
          - name: semantic
            value: semantic
            description: Represents the semantic query parser for advanced semantic modeling.
          - name: vector
            value: vector
            description: Represents vector search over computed data.
          - name: vectorSimpleHybrid
            value: vector_simple_hybrid
            description: Represents a combination of the simple query strategy with vector data.
          - name: vectorSemanticHybrid
            value: vector_semantic_hybrid
            description: Represents a combination of semantic search and vector data querying.
    azureCosmosDBChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Azure Cosmos DB when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/azureCosmosDBChatExtensionParameters"
      x-ms-discriminator-value: azure_cosmos_db
    azureCosmosDBChatExtensionParameters:
      required:
        - authentication
        - container_name
        - database_name
        - embedding_dependency
        - fields_mapping
        - index_name
      type: object
      properties:
        authentication:
          $ref: "#/components/schemas/onYourDataConnectionStringAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        database_name:
          type: string
          description: The MongoDB vCore database name to use with Azure Cosmos DB.
        container_name:
          type: string
          description: The name of the Azure Cosmos DB resource container.
        index_name:
          type: string
          description: The MongoDB vCore index name to use with Azure Cosmos DB.
        fields_mapping:
          $ref: "#/components/schemas/azureCosmosDBFieldMappingOptions"
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: |-
        Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Azure Cosmos DB for
        MongoDB vCore.
    azureCosmosDBFieldMappingOptions:
      required:
        - content_fields
        - vector_fields
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Azure Cosmos DB resource.
    elasticsearchChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Elasticsearch when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/elasticsearchChatExtensionParameters"
      x-ms-discriminator-value: elasticsearch
    elasticsearchChatExtensionParameters:
      required:
        - authentication
        - endpoint
        - index_name
      type: object
      properties:
        authentication:
          oneOf:
            - $ref: "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions"
            - $ref: "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        endpoint:
          type: string
          description: The endpoint of Elasticsearch®.
          format: uri
        index_name:
          type: string
          description: The index name of Elasticsearch®.
        fields_mapping:
          $ref: "#/components/schemas/elasticsearchIndexFieldMappingOptions"
        query_type:
          $ref: "#/components/schemas/elasticsearchQueryType"
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
            - $ref: "#/components/schemas/onYourDataModelIdVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: "Parameters to use when configuring Elasticsearch® as an Azure OpenAI chat extension. "
    elasticsearchIndexFieldMappingOptions:
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Elasticsearch® resource.
    elasticsearchQueryType:
      type: string
      description: The type of Elasticsearch® retrieval query that should be executed when using it as an Azure OpenAI chat extension.
      enum:
        - simple
        - vector
      x-ms-enum:
        name: ElasticsearchQueryType
        modelAsString: true
        values:
          - name: simple
            value: simple
            description: Represents the default, simple query parser.
          - name: vector
            value: vector
            description: Represents vector search over computed data.
    mongoDBChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Mongo DB when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/mongoDBChatExtensionParameters"
      x-ms-discriminator-value: mongo_db
    mongoDBChatExtensionParameters:
      required:
        - authentication
        - app_name
        - collection_name
        - database_name
        - endpoint
        - embedding_dependency
        - fields_mapping
        - index_name
      type: object
      properties:
        authentication:
          $ref: "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        endpoint:
          type: string
          description: The name of the Mongo DB cluster endpoint.
        database_name:
          type: string
          description: The name of the Mongo DB database.
        collection_name:
          type: string
          description: The name of the Mongo DB Collection.
        app_name:
          type: string
          description: The name of the Mongo DB Application.
        index_name:
          type: string
          description: The The name of the Mongo DB index.
        fields_mapping:
          $ref: "#/components/schemas/mongoDBFieldMappingOptions"
        embedding_dependency:
          oneOf:
            - $ref: "#/components/schemas/onYourDataEndpointVectorizationSource"
            - $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: |-
        Parameters to use when configuring Azure OpenAI On Your Data chat extensions when using Mongo DB.

    mongoDBFieldMappingOptions:
      required:
        - content_fields
        - vector_fields
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
        vector_fields:
          type: array
          description: The names of fields that represent vector data.
          items:
            type: string
      description: Optional settings to control how fields are processed when using a configured Mongo DB resource.

    pineconeChatExtensionConfiguration:
      required:
        - parameters
      description: |-
        A specific representation of configurable options for Pinecone when using it as an Azure OpenAI chat
        extension.
      allOf:
        - $ref: "#/components/schemas/azureChatExtensionConfiguration"
        - properties:
            parameters:
              $ref: "#/components/schemas/pineconeChatExtensionParameters"
      x-ms-discriminator-value: pinecone
    pineconeChatExtensionParameters:
      required:
        - authentication
        - embedding_dependency
        - environment
        - fields_mapping
        - index_name
      type: object
      properties:
        authentication:
          $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
        top_n_documents:
          type: integer
          description: The configured top number of documents to feature for the configured query.
          format: int32
        max_search_queries:
          type: integer
          description: The max number of rewritten queries should be send to search provider for one user message. If not specified, the system will decide the number of queries to send.
          format: int32
        allow_partial_result:
          type: boolean
          default: false
          description: If specified as true, the system will allow partial search results to be used and the request fails if all the queries fail. If not specified, or specified as false, the request will fail if any search query fails.
        in_scope:
          type: boolean
          description: Whether queries should be restricted to use of indexed data.
        strictness:
          maximum: 5
          minimum: 1
          type: integer
          description: The configured strictness of the search relevance filtering. The higher of strictness, the higher of the precision but lower recall of the answer.
          format: int32
        environment:
          type: string
          description: The environment name of Pinecone.
        index_name:
          type: string
          description: The name of the Pinecone database index.
        fields_mapping:
          $ref: "#/components/schemas/pineconeFieldMappingOptions"
        embedding_dependency:
          $ref: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
        include_contexts:
          type: array
          description: The included properties of the output context. If not specified, the default value is `citations` and `intent`.
          items:
            $ref: "#/components/schemas/onYourDataContextProperty"
      description: Parameters for configuring Azure OpenAI Pinecone chat extensions.
    pineconeFieldMappingOptions:
      required:
        - content_fields
      type: object
      properties:
        title_field:
          type: string
          description: The name of the index field to use as a title.
        url_field:
          type: string
          description: The name of the index field to use as a URL.
        filepath_field:
          type: string
          description: The name of the index field to use as a filepath.
        content_fields:
          type: array
          description: The names of index fields that should be treated as content.
          items:
            type: string
        content_fields_separator:
          type: string
          description: The separator pattern that content fields should use.
      description: Optional settings to control how fields are processed when using a configured Pinecone resource.
    onYourDataAuthenticationOptions:
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/onYourDataAuthenticationType"
      description: The authentication options for Azure OpenAI On Your Data.
      discriminator:
        propertyName: type
        mapping:
          api_key: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
          connection_string: "#/components/schemas/onYourDataConnectionStringAuthenticationOptions"
          key_and_key_id: "#/components/schemas/onYourDataKeyAndKeyIdAuthenticationOptions"
          encoded_api_key: "#/components/schemas/onYourDataEncodedApiKeyAuthenticationOptions"
          access_token: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions"
          system_assigned_managed_identity: "#/components/schemas/onYourDataSystemAssignedManagedIdentityAuthenticationOptions"
          user_assigned_managed_identity: "#/components/schemas/onYourDataUserAssignedManagedIdentityAuthenticationOptions"
          username_and_password: "#/components/schemas/onYourDataUsernameAndPasswordAuthenticationOptions"
    onYourDataContextProperty:
      type: string
      description: The context property.
      enum:
        - citations
        - intent
        - all_retrieved_documents
      x-ms-enum:
        name: OnYourDataContextProperty
        modelAsString: true
        values:
          - name: citations
            value: citations
            description: The `citations` property.
          - name: intent
            value: intent
            description: The `intent` property.
          - name: allRetrievedDocuments
            value: all_retrieved_documents
            description: The `all_retrieved_documents` property.
    onYourDataAuthenticationType:
      type: string
      description: The authentication types supported with Azure OpenAI On Your Data.
      enum:
        - api_key
        - connection_string
        - key_and_key_id
        - encoded_api_key
        - access_token
        - system_assigned_managed_identity
        - user_assigned_managed_identity
        - username_and_password
      x-ms-enum:
        name: OnYourDataAuthenticationType
        modelAsString: true
        values:
          - name: apiKey
            value: api_key
            description: Authentication via API key.
          - name: connectionString
            value: connection_string
            description: Authentication via connection string.
          - name: keyAndKeyId
            value: key_and_key_id
            description: Authentication via key and key ID pair.
          - name: encodedApiKey
            value: encoded_api_key
            description: Authentication via encoded API key.
          - name: accessToken
            value: access_token
            description: Authentication via access token.
          - name: systemAssignedManagedIdentity
            value: system_assigned_managed_identity
            description: Authentication via system-assigned managed identity.
          - name: userAssignedManagedIdentity
            value: user_assigned_managed_identity
            description: Authentication via user-assigned managed identity.
          - name: usernameAndPassword
            value: username_and_password
            description: Authentication via username and password.
    onYourDataApiKeyAuthenticationOptions:
      required:
        - key
      description: The authentication options for Azure OpenAI On Your Data when using an API key.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            key:
              type: string
              description: The API key to use for authentication.
      x-ms-discriminator-value: api_key
    onYourDataConnectionStringAuthenticationOptions:
      required:
        - connection_string
      description: The authentication options for Azure OpenAI On Your Data when using a connection string.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            connection_string:
              type: string
              description: The connection string to use for authentication.
      x-ms-discriminator-value: connection_string
    onYourDataKeyAndKeyIdAuthenticationOptions:
      required:
        - key
        - key_id
      description: The authentication options for Azure OpenAI On Your Data when using an Elasticsearch key and key ID pair.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            key:
              type: string
              description: The Elasticsearch key to use for authentication.
            key_id:
              type: string
              description: The Elasticsearch key ID to use for authentication.
      x-ms-discriminator-value: key_and_key_id
    onYourDataEncodedApiKeyAuthenticationOptions:
      required:
        - encoded_api_key
      description: The authentication options for Azure OpenAI On Your Data when using an Elasticsearch encoded API key.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            encoded_api_key:
              type: string
              description: The Elasticsearch encoded API key to use for authentication.
      x-ms-discriminator-value: encoded_api_key
    onYourDataAccessTokenAuthenticationOptions:
      required:
        - access_token
      description: The authentication options for Azure OpenAI On Your Data when using access token.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            access_token:
              type: string
              description: The access token to use for authentication.
      x-ms-discriminator-value: access_token
    onYourDataSystemAssignedManagedIdentityAuthenticationOptions:
      description: The authentication options for Azure OpenAI On Your Data when using a system-assigned managed identity.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
      x-ms-discriminator-value: system_assigned_managed_identity
    onYourDataUserAssignedManagedIdentityAuthenticationOptions:
      required:
        - managed_identity_resource_id
      description: The authentication options for Azure OpenAI On Your Data when using a user-assigned managed identity.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            managed_identity_resource_id:
              type: string
              description: The resource ID of the user-assigned managed identity to use for authentication.
      x-ms-discriminator-value: user_assigned_managed_identity
    onYourDataUsernameAndPasswordAuthenticationOptions:
      required:
        - username
        - password
      description: The authentication options for Azure OpenAI On Your Data when using a username and a password.
      allOf:
        - $ref: "#/components/schemas/onYourDataAuthenticationOptions"
        - properties:
            username:
              type: string
              description: The username to use for authentication.
            password:
              type: string
              description: The password. to use for authentication.
      x-ms-discriminator-value: username_and_password
    onYourDataVectorizationSource:
      required:
        - type
      type: object
      properties:
        type:
          $ref: "#/components/schemas/onYourDataVectorizationSourceType"
      description: An abstract representation of a vectorization source for Azure OpenAI On Your Data with vector search.
      discriminator:
        propertyName: type
        mapping:
          endpoint: "#/components/schemas/onYourDataEndpointVectorizationSource"
          deployment_name: "#/components/schemas/onYourDataDeploymentNameVectorizationSource"
          integrated: "#/components/schemas/onYourDataIntegratedVectorizationSource"
          model_id: "#/components/schemas/onYourDataModelIdVectorizationSource"
    onYourDataVectorizationSourceType:
      type: string
      description: |-
        Represents the available sources Azure OpenAI On Your Data can use to configure vectorization of data for use with
        vector search.
      enum:
        - endpoint
        - deployment_name
        - integrated
        - model_id
      x-ms-enum:
        name: OnYourDataVectorizationSourceType
        modelAsString: true
        values:
          - name: endpoint
            value: endpoint
            description: Represents vectorization performed by public service calls to an Azure OpenAI embedding model.
          - name: deploymentName
            value: deployment_name
            description: |-
              Represents an Ada model deployment name to use. This model deployment must be in the same Azure OpenAI resource, but
              On Your Data will use this model deployment via an internal call rather than a public one, which enables vector
              search even in private networks.
          - name: integrated
            value: integrated
            description: Represents the integrated vectorizer defined within the search resource.
          - name: modelId
            value: model_id
            description: |-
              Represents a specific embedding model ID as defined in the search service.
              Currently only supported by Elasticsearch®.
    onYourDataEndpointVectorizationSource:
      required:
        - authentication
        - endpoint
      description: |-
        The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based
        on a public Azure OpenAI endpoint call for embeddings.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
        - properties:
            endpoint:
              type: string
              description: Specifies the resource endpoint URL from which embeddings should be retrieved. It should be in the format of https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_DEPLOYMENT_NAME/embeddings. The api-version query parameter is not allowed.
              format: uri
            authentication:
              oneOf:
                - $ref: "#/components/schemas/onYourDataApiKeyAuthenticationOptions"
                - $ref: "#/components/schemas/onYourDataAccessTokenAuthenticationOptions"
            dimensions:
              type: integer
              description: The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models.
              format: int32
      x-ms-discriminator-value: endpoint
    onYourDataDeploymentNameVectorizationSource:
      required:
        - deployment_name
      description: |-
        The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based
        on an internal embeddings model deployment name in the same Azure OpenAI resource.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
        - properties:
            deployment_name:
              type: string
              description: Specifies the name of the model deployment to use for vectorization. This model deployment must be in the same Azure OpenAI resource, but On Your Data will use this model deployment via an internal call rather than a public one, which enables vector search even in private networks.
            dimensions:
              type: integer
              description: The number of dimensions the embeddings should have. Only supported in `text-embedding-3` and later models.
              format: int32
      x-ms-discriminator-value: deployment_name
    onYourDataIntegratedVectorizationSource:
      description: |-
        Represents the integrated vectorizer defined within the search resource.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
      x-ms-discriminator-value: integrated
    onYourDataModelIdVectorizationSource:
      required:
        - model_id
      description: |-
        The details of a a vectorization source, used by Azure OpenAI On Your Data when applying vector search, that is based
        on a search service model ID. Currently only supported by Elasticsearch®.
      allOf:
        - $ref: "#/components/schemas/onYourDataVectorizationSource"
        - properties:
            model_id:
              type: string
              description: Specifies the model ID to use for vectorization. This model ID must be defined in the search service.
      x-ms-discriminator-value: model_id
    azureChatExtensionsMessageContext:
      type: object
      properties:
        citations:
          type: array
          description: The data source retrieval result, used to generate the assistant message in the response.
          items:
            $ref: "#/components/schemas/citation"
          x-ms-identifiers: []
        intent:
          type: string
          description: The detected intent from the chat history, used to pass to the next turn to carry over the context.
        all_retrieved_documents:
          type: array
          description: All the retrieved documents.
          items:
            $ref: "#/components/schemas/retrievedDocument"

      description: |2-
          A representation of the additional context information available when Azure OpenAI chat extensions are involved
          in the generation of a corresponding chat completions response. This context information is only populated when
          using an Azure OpenAI request configured to use a matching extension.
    citation:
      required:
        - content
      type: object
      properties:
        content:
          type: string
          description: The content of the citation.
        title:
          type: string
          description: The title of the citation.
        url:
          type: string
          description: The URL of the citation.
        filepath:
          type: string
          description: The file path of the citation.
        chunk_id:
          type: string
          description: The chunk ID of the citation.
        rerank_score:
          type: number
          description: The rerank score of the retrieved document.
          format: double
      description: citation information for a chat completions response message.
    retrievedDocument:
      type: object
      description: The retrieved document.
      required:
        - search_queries
        - data_source_index
      allOf:
        - $ref: "#/components/schemas/citation"
        - properties:
            search_queries:
              type: array
              description: The search queries used to retrieve the document.
              items:
                type: string
            data_source_index:
              type: integer
              description: The index of the data source.
              format: int32
            original_search_score:
              type: number
              description: The original search score of the retrieved document.
              format: double
            filter_reason:
              $ref: "#/components/schemas/filterReason"
              description: Represents the rationale for filtering the document. If the document does not undergo filtering, this field will remain unset.

    filterReason:
      type: string
      description: The filtering reason of the retrieved document.
      enum:
        - score
        - rerank
      x-ms-enum:
        name: FilterReason
        modelAsString: true
        values:
          - name: score
            value: score
            description: The document is filtered by original search score threshold defined by `strictness` configure.
          - name: rerank
            value: rerank
            description: The document is not filtered by original search score threshold, but is filtered by rerank score and `top_n_documents` configure.

    chatCompletionMessageToolCall:
      type: object
      properties:
        id:
          type: string
          description: The ID of the tool call.
        type:
          $ref: "#/components/schemas/toolCallType"
        function:
          type: object
          description: The function that the model called.
          properties:
            name:
              type: string
              description: The name of the function to call.
            arguments:
              type: string
              description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
          required:
            - name
            - arguments
      required:
        - id
        - type
        - function
    toolCallType:
      type: string
      enum:
        - function
      description: The type of the tool call, in this case `function`.
      x-ms-enum:
        name: ToolCallType
        modelAsString: true
        values:
          - value: function
            description: The tool call type is function.
    chatCompletionRequestMessageTool:
      allOf:
        - $ref: "#/components/schemas/chatCompletionRequestMessage"
        - type: object
          nullable: true
          properties:
            tool_call_id:
              type: string
              description: Tool call that this message is responding to.
            content:
              type: string
              description: The contents of the message.
              nullable: true
      required:
        - tool_call_id
        - content
    chatCompletionRequestMessageFunction:
      allOf:
        - $ref: "#/components/schemas/chatCompletionRequestMessage"
        - type: object
          description: Deprecated. Message that represents a function.
          nullable: true
          properties:
            role:
              type: string
              enum:
                - function
              description: The role of the messages author, in this case `function`.
            name:
              type: string
              description: The contents of the message.
            content:
              type: string
              description: The contents of the message.
              nullable: true
      required:
        - function_call_id
        - content
    createChatCompletionResponse:
      type: object
      description: Represents a chat completion response returned by model, based on the provided input.
      properties:
        id:
          type: string
          description: A unique identifier for the chat completion.
        prompt_filter_results:
          $ref: "#/components/schemas/promptFilterResults"
        choices:
          type: array
          description: A list of chat completion choices. Can be more than one if `n` is greater than 1.
          items:
            type: object
            required:
              - finish_reason
              - index
              - message
              - logprobs
            properties:
              finish_reason:
                type: string
                description: &chat_completion_finish_reason_description |
                  The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence,
                  `length` if the maximum number of tokens specified in the request was reached,
                  `content_filter` if content was omitted due to a flag from our content filters,
                  `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.
                enum:
                  [
                    "stop",
                    "length",
                    "tool_calls",
                    "content_filter",
                    "function_call",
                  ]
              index:
                type: integer
                description: The index of the choice in the list of choices.
              message:
                $ref: "#/components/schemas/chatCompletionResponseMessage"
              content_filter_results:
                $ref: "#/components/schemas/contentFilterChoiceResults"
              logprobs: &chat_completion_response_logprobs
                description: Log probability information for the choice.
                type: object
                nullable: true
                properties:
                  content:
                    description: A list of message content tokens with log probability information.
                    type: array
                    items:
                      $ref: "#/components/schemas/chatCompletionTokenLogprob"
                    nullable: true
                  refusal:
                    description: A list of message refusal tokens with log probability information.
                    type: array
                    items:
                      $ref: "#/components/schemas/chatCompletionTokenLogprob"
                    nullable: true
                required:
                  - content
                  - refusal
        created:
          type: integer
          description: The Unix timestamp (in seconds) of when the chat completion was created.
        model:
          type: string
          description: The model used for the chat completion.
        system_fingerprint:
          type: string
          description: |
            This fingerprint represents the backend configuration that the model runs with.

            Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
        object:
          type: string
          description: The object type, which is always `chat.completion`.
          enum: [chat.completion]
        usage:
          $ref: "#/components/schemas/completionUsage"
      required:
        - choices
        - created
        - id
        - model
        - object

    createChatCompletionStreamResponse:
      type: object
      description: Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
      properties:
        id:
          type: string
          description: A unique identifier for the chat completion. Each chunk has the same ID.
        choices:
          type: array
          description: |
            A list of chat completion choices. Can contain more than one elements if `n` is greater than 1.
          items:
            type: object
            required:
              - delta
              - finish_reason
              - index
            properties:
              delta:
                $ref: "#/components/schemas/chatCompletionStreamResponseDelta"
              logprobs: *chat_completion_response_logprobs
              finish_reason:
                type: string
                description: *chat_completion_finish_reason_description
                enum:
                  [
                    "stop",
                    "length",
                    "tool_calls",
                    "content_filter",
                    "function_call",
                  ]
                nullable: true
              index:
                type: integer
                description: The index of the choice in the list of choices.
        created:
          type: integer
          description: The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
        model:
          type: string
          description: The model to generate the completion.
        system_fingerprint:
          type: string
          description: |
            This fingerprint represents the backend configuration that the model runs with.
            Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
        object:
          type: string
          description: The object type, which is always `chat.completion.chunk`.
          enum: [chat.completion.chunk]
          required:
            - prompt_tokens
            - completion_tokens
            - total_tokens
      required:
        - choices
        - created
        - id
        - model
        - object

    chatCompletionStreamResponseDelta:
      type: object
      description: A chat completion delta generated by streamed model responses.
      properties:
        content:
          type: string
          description: The contents of the chunk message.
          nullable: true
        function_call:
          deprecated: true
          type: object
          description: "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."
          properties:
            arguments:
              type: string
              description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
            name:
              type: string
              description: The name of the function to call.
        tool_calls:
          type: array
          items:
            $ref: "#/components/schemas/chatCompletionMessageToolCallChunk"
        role:
          type: string
          enum: ["system", "user", "assistant", "tool"]
          description: The role of the author of this message.
        refusal:
          type: string
          description: The refusal message generated by the model.
          nullable: true

    chatCompletionMessageToolCallChunk:
      type: object
      properties:
        index:
          type: integer
        id:
          type: string
          description: The ID of the tool call.
        type:
          type: string
          enum: ["function"]
          description: The type of the tool. Currently, only `function` is supported.
        function:
          type: object
          properties:
            name:
              type: string
              description: The name of the function to call.
            arguments:
              type: string
              description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
      required:
        - index

    chatCompletionStreamOptions:
      description: |
        Options for streaming response. Only set this when you set `stream: true`.
      type: object
      nullable: true
      default: null
      properties:
        include_usage:
          type: boolean
          description: |
            If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.

    chatCompletionChoiceLogProbs:
      description: Log probability information for the choice.
      type: object
      nullable: true
      properties:
        content:
          description: A list of message content tokens with log probability information.
          type: array
          items:
            $ref: "#/components/schemas/chatCompletionTokenLogprob"
          nullable: true
        refusal:
          description: A list of message refusal tokens with log probability information.
          type: array
          items:
            $ref: "#/components/schemas/chatCompletionTokenLogprob"
          nullable: true
      required:
        - content
    chatCompletionTokenLogprob:
      type: object
      properties:
        token:
          description: The token.
          type: string
        logprob:
          description: The log probability of this token.
          type: number
        bytes:
          description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
          type: array
          items:
            type: integer
          nullable: true
        top_logprobs:
          description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
          type: array
          items:
            type: object
            properties:
              token:
                description: The token.
                type: string
              logprob:
                description: The log probability of this token.
                type: number
              bytes:
                description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
                type: array
                items:
                  type: integer
                nullable: true
            required:
              - token
              - logprob
              - bytes
      required:
        - token
        - logprob
        - bytes
        - top_logprobs

    chatCompletionResponseMessage:
      type: object
      description: A chat completion message generated by the model.
      properties:
        role:
          $ref: "#/components/schemas/chatCompletionResponseMessageRole"
        refusal:
          type: string
          description: The refusal message generated by the model.
          nullable: true
        content:
          type: string
          description: The contents of the message.
          nullable: true
        tool_calls:
          type: array
          description: The tool calls generated by the model, such as function calls.
          items:
            $ref: "#/components/schemas/chatCompletionMessageToolCall"
        function_call:
          $ref: "#/components/schemas/chatCompletionFunctionCall"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



