specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-02-15-preview/inference.yaml [2089:2413]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            'n':
              type: integer
              minimum: 1
              maximum: 128
              default: 1
              example: 1
              nullable: true
              description: How many chat completion choices to generate for each input message.
            seed:
              type: integer
              minimum: -9223372036854775808
              maximum: 9223372036854775807
              default: 0
              example: 1
              nullable: true
              description: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
            logprobs:
              description: Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`. This option is currently not available on the `gpt-4-vision-preview` model.
              type: boolean
              default: false
              nullable: true
            top_logprobs:
              description: An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.
              type: integer
              minimum: 0
              maximum: 5
              nullable: true
            response_format:
              type: object
              description: An object specifying the format that the model must output. Used to enable JSON mode.
              properties:
                type:
                  $ref: '#/components/schemas/chatCompletionResponseFormat'
            tools:
              description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/chatCompletionTool'
            tool_choice:
              $ref: '#/components/schemas/chatCompletionToolChoiceOption'
            functions:
              description: Deprecated in favor of `tools`. A list of functions the model may generate JSON inputs for.
              type: array
              minItems: 1
              maxItems: 128
              items:
                $ref: '#/components/schemas/chatCompletionFunction'
            function_call:
              description: Deprecated in favor of `tool_choice`. Controls how the model responds to function calls. "none" means the model does not call a function, and responds to the end-user. "auto" means the model can pick between an end-user or calling a function.  Specifying a particular function via `{"name":\ "my_function"}` forces the model to call that function. "none" is the default when no functions are present. "auto" is the default if functions are present.
              oneOf:
                - type: string
                  enum:
                    - none
                    - auto
                  description: '`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.'
                - type: object
                  description: 'Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.'
                  properties:
                    name:
                      type: string
                      description: The name of the function to call.
                  required:
                    - name
      required:
        - messages
    chatCompletionResponseFormat:
      type: string
      enum:
        - text
        - json_object
      default: text
      example: json_object
      nullable: true
      description: Setting to `json_object` enables JSON mode. This guarantees that the message the model generates is valid JSON.
      x-ms-enum:
        name: ChatCompletionResponseFormat
        modelAsString: true
        values:
          - value: text
            description: Response format is a plain text string.
          - value: json_object
            description: Response format is a JSON object.
    chatCompletionFunction:
      type: object
      properties:
        name:
          type: string
          description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
        description:
          type: string
          description: The description of what the function does.
        parameters:
          $ref: '#/components/schemas/chatCompletionFunctionParameters'
      required:
        - name
    chatCompletionFunctionParameters:
      type: object
      description: The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/gpt/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
      additionalProperties: true
    chatCompletionRequestMessage:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/chatCompletionRequestMessageRole'
      discriminator:
        propertyName: role
        mapping:
          system: '#/components/schemas/chatCompletionRequestMessageSystem'
          user: '#/components/schemas/chatCompletionRequestMessageUser'
          assistant: '#/components/schemas/chatCompletionRequestMessageAssistant'
          tool: '#/components/schemas/chatCompletionRequestMessageTool'
          function: '#/components/schemas/chatCompletionRequestMessageFunction'
      required:
        - role
    chatCompletionRequestMessageRole:
      type: string
      enum:
        - system
        - user
        - assistant
        - tool
        - function
      description: The role of the messages author.
      x-ms-enum:
        name: ChatCompletionRequestMessageRole
        modelAsString: true
        values:
          - value: system
            description: The message author role is system.
          - value: user
            description: The message author role is user.
          - value: assistant
            description: The message author role is assistant.
          - value: tool
            description: The message author role is tool.
          - value: function
            description: Deprecated. The message author role is function.
    chatCompletionRequestMessageSystem:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessage'
        - type: object
          properties:
            content:
              type: string
              description: The contents of the message.
              nullable: true
      required:
        - content
    chatCompletionRequestMessageUser:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessage'
        - type: object
          properties:
            content:
              oneOf:
                - type: string
                  description: The contents of the message.
                - type: array
                  description: An array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4-visual-preview` model.
                  minimum: 1
                  items:
                    $ref: '#/components/schemas/chatCompletionRequestMessageContentPart'
              nullable: true
      required:
        - content
    chatCompletionRequestMessageContentPart:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/chatCompletionRequestMessageContentPartType'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/chatCompletionRequestMessageContentPartText'
          image_url: '#/components/schemas/chatCompletionRequestMessageContentPartImage'
      required:
        - type
    chatCompletionRequestMessageContentPartType:
      type: string
      enum:
        - text
        - image_url
      description: The type of the content part.
      x-ms-enum:
        name: ChatCompletionRequestMessageContentPartType
        modelAsString: true
        values:
          - value: text
            description: The content part type is text.
          - value: image_url
            description: The content part type is image_url.
    chatCompletionRequestMessageContentPartText:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessageContentPart'
        - type: object
          properties:
            text:
              type: string
              description: The text content.
      required:
        - text
    chatCompletionRequestMessageContentPartImage:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessageContentPart'
        - type: object
          properties:
            url:
              type: string
              description: Either a URL of the image or the base64 encoded image data.
              format: uri
            detail:
              $ref: '#/components/schemas/imageDetailLevel'
      required:
        - url
    imageDetailLevel:
      type: string
      description: Specifies the detail level of the image.
      enum:
        - auto
        - low
        - high
      default: auto
      x-ms-enum:
        name: ImageDetailLevel
        modelAsString: true
        values:
          - value: auto
            description: The image detail level is auto.
          - value: low
            description: The image detail level is low.
          - value: high
            description: The image detail level is high.
    chatCompletionRequestMessageAssistant:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessage'
        - type: object
          properties:
            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'
            context:
              $ref: '#/components/schemas/azureChatExtensionsMessageContext'
      required:
        - content
    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_ml_index: '#/components/schemas/azureMachineLearningIndexChatExtensionConfiguration'
          azure_cosmos_db: '#/components/schemas/azureCosmosDBChatExtensionConfiguration'
          elasticsearch: '#/components/schemas/elasticsearchChatExtensionConfiguration'
          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_ml_index
        - azure_cosmos_db
        - elasticsearch
        - 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: azureMachineLearningIndex
            value: azure_ml_index
            description: Represents the use of Azure Machine Learning index 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: 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'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-05-01-preview/inference.yaml [2362:2686]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            'n':
              type: integer
              minimum: 1
              maximum: 128
              default: 1
              example: 1
              nullable: true
              description: How many chat completion choices to generate for each input message.
            seed:
              type: integer
              minimum: -9223372036854775808
              maximum: 9223372036854775807
              default: 0
              example: 1
              nullable: true
              description: If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result.Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
            logprobs:
              description: Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`. This option is currently not available on the `gpt-4-vision-preview` model.
              type: boolean
              default: false
              nullable: true
            top_logprobs:
              description: An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.
              type: integer
              minimum: 0
              maximum: 5
              nullable: true
            response_format:
              type: object
              description: An object specifying the format that the model must output. Used to enable JSON mode.
              properties:
                type:
                  $ref: '#/components/schemas/chatCompletionResponseFormat'
            tools:
              description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for.
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/chatCompletionTool'
            tool_choice:
              $ref: '#/components/schemas/chatCompletionToolChoiceOption'
            functions:
              description: Deprecated in favor of `tools`. A list of functions the model may generate JSON inputs for.
              type: array
              minItems: 1
              maxItems: 128
              items:
                $ref: '#/components/schemas/chatCompletionFunction'
            function_call:
              description: Deprecated in favor of `tool_choice`. Controls how the model responds to function calls. "none" means the model does not call a function, and responds to the end-user. "auto" means the model can pick between an end-user or calling a function.  Specifying a particular function via `{"name":\ "my_function"}` forces the model to call that function. "none" is the default when no functions are present. "auto" is the default if functions are present.
              oneOf:
                - type: string
                  enum:
                    - none
                    - auto
                  description: '`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.'
                - type: object
                  description: 'Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.'
                  properties:
                    name:
                      type: string
                      description: The name of the function to call.
                  required:
                    - name
      required:
        - messages
    chatCompletionResponseFormat:
      type: string
      enum:
        - text
        - json_object
      default: text
      example: json_object
      nullable: true
      description: Setting to `json_object` enables JSON mode. This guarantees that the message the model generates is valid JSON.
      x-ms-enum:
        name: ChatCompletionResponseFormat
        modelAsString: true
        values:
          - value: text
            description: Response format is a plain text string.
          - value: json_object
            description: Response format is a JSON object.
    chatCompletionFunction:
      type: object
      properties:
        name:
          type: string
          description: The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
        description:
          type: string
          description: The description of what the function does.
        parameters:
          $ref: '#/components/schemas/chatCompletionFunctionParameters'
      required:
        - name
    chatCompletionFunctionParameters:
      type: object
      description: The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/gpt/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
      additionalProperties: true
    chatCompletionRequestMessage:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/chatCompletionRequestMessageRole'
      discriminator:
        propertyName: role
        mapping:
          system: '#/components/schemas/chatCompletionRequestMessageSystem'
          user: '#/components/schemas/chatCompletionRequestMessageUser'
          assistant: '#/components/schemas/chatCompletionRequestMessageAssistant'
          tool: '#/components/schemas/chatCompletionRequestMessageTool'
          function: '#/components/schemas/chatCompletionRequestMessageFunction'
      required:
        - role
    chatCompletionRequestMessageRole:
      type: string
      enum:
        - system
        - user
        - assistant
        - tool
        - function
      description: The role of the messages author.
      x-ms-enum:
        name: ChatCompletionRequestMessageRole
        modelAsString: true
        values:
          - value: system
            description: The message author role is system.
          - value: user
            description: The message author role is user.
          - value: assistant
            description: The message author role is assistant.
          - value: tool
            description: The message author role is tool.
          - value: function
            description: Deprecated. The message author role is function.
    chatCompletionRequestMessageSystem:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessage'
        - type: object
          properties:
            content:
              type: string
              description: The contents of the message.
              nullable: true
      required:
        - content
    chatCompletionRequestMessageUser:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessage'
        - type: object
          properties:
            content:
              oneOf:
                - type: string
                  description: The contents of the message.
                - type: array
                  description: An array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4-visual-preview` model.
                  minimum: 1
                  items:
                    $ref: '#/components/schemas/chatCompletionRequestMessageContentPart'
              nullable: true
      required:
        - content
    chatCompletionRequestMessageContentPart:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/chatCompletionRequestMessageContentPartType'
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/chatCompletionRequestMessageContentPartText'
          image_url: '#/components/schemas/chatCompletionRequestMessageContentPartImage'
      required:
        - type
    chatCompletionRequestMessageContentPartType:
      type: string
      enum:
        - text
        - image_url
      description: The type of the content part.
      x-ms-enum:
        name: ChatCompletionRequestMessageContentPartType
        modelAsString: true
        values:
          - value: text
            description: The content part type is text.
          - value: image_url
            description: The content part type is image_url.
    chatCompletionRequestMessageContentPartText:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessageContentPart'
        - type: object
          properties:
            text:
              type: string
              description: The text content.
      required:
        - text
    chatCompletionRequestMessageContentPartImage:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessageContentPart'
        - type: object
          properties:
            url:
              type: string
              description: Either a URL of the image or the base64 encoded image data.
              format: uri
            detail:
              $ref: '#/components/schemas/imageDetailLevel'
      required:
        - url
    imageDetailLevel:
      type: string
      description: Specifies the detail level of the image.
      enum:
        - auto
        - low
        - high
      default: auto
      x-ms-enum:
        name: ImageDetailLevel
        modelAsString: true
        values:
          - value: auto
            description: The image detail level is auto.
          - value: low
            description: The image detail level is low.
          - value: high
            description: The image detail level is high.
    chatCompletionRequestMessageAssistant:
      allOf:
        - $ref: '#/components/schemas/chatCompletionRequestMessage'
        - type: object
          properties:
            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'
            context:
              $ref: '#/components/schemas/azureChatExtensionsMessageContext'
      required:
        - content
    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_ml_index: '#/components/schemas/azureMachineLearningIndexChatExtensionConfiguration'
          azure_cosmos_db: '#/components/schemas/azureCosmosDBChatExtensionConfiguration'
          elasticsearch: '#/components/schemas/elasticsearchChatExtensionConfiguration'
          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_ml_index
        - azure_cosmos_db
        - elasticsearch
        - 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: azureMachineLearningIndex
            value: azure_ml_index
            description: Represents the use of Azure Machine Learning index 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: 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'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



