specification/cognitiveservices/data-plane/AzureOpenAI/inference/preview/2024-07-01-preview/inference.yaml [2278:2627]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    chatCompletionsRequestCommon:
      type: object
      properties:
        temperature:
          description: |-
            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
            We generally recommend altering this or `top_p` but not both.
          type: number
          minimum: 0
          maximum: 2
          default: 1
          example: 1
          nullable: true
        top_p:
          description: |-
            An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
            We generally recommend altering this or `temperature` but not both.
          type: number
          minimum: 0
          maximum: 1
          default: 1
          example: 1
          nullable: true
        stream:
          description: 'If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message.'
          type: boolean
          nullable: true
          default: false
        stop:
          description: Up to 4 sequences where the API will stop generating further tokens.
          oneOf:
            - type: string
              nullable: true
            - type: array
              items:
                type: string
                nullable: false
              minItems: 1
              maxItems: 4
              description: Array minimum size of 1 and maximum of 4
          default: null
        max_tokens:
          description: The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens).
          type: integer
          default: 4096
        presence_penalty:
          description: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
          type: number
          default: 0
          minimum: -2
          maximum: 2
        frequency_penalty:
          description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
          type: number
          default: 0
          minimum: -2
          maximum: 2
        logit_bias:
          description: Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
          type: object
          nullable: true
        user:
          description: A unique identifier representing your end-user, which can help Azure OpenAI to monitor and detect abuse.
          type: string
          example: user-1234
          nullable: false
    createChatCompletionRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/chatCompletionsRequestCommon'
        - properties:
            messages:
              description: A list of messages comprising the conversation so far. [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/chatCompletionRequestMessage'
            data_sources:
              type: array
              description: |2-
                  The configuration entries for Azure OpenAI chat extensions that use them.
                  This additional specification is only compatible with Azure OpenAI.
              items:
                $ref: '#/components/schemas/azureChatExtensionConfiguration'
            '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'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



specification/cognitiveservices/data-plane/AzureOpenAI/inference/stable/2024-06-01/inference.yaml [747:1096]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    chatCompletionsRequestCommon:
      type: object
      properties:
        temperature:
          description: |-
            What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
            We generally recommend altering this or `top_p` but not both.
          type: number
          minimum: 0
          maximum: 2
          default: 1
          example: 1
          nullable: true
        top_p:
          description: |-
            An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.
            We generally recommend altering this or `temperature` but not both.
          type: number
          minimum: 0
          maximum: 1
          default: 1
          example: 1
          nullable: true
        stream:
          description: 'If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a `data: [DONE]` message.'
          type: boolean
          nullable: true
          default: false
        stop:
          description: Up to 4 sequences where the API will stop generating further tokens.
          oneOf:
            - type: string
              nullable: true
            - type: array
              items:
                type: string
                nullable: false
              minItems: 1
              maxItems: 4
              description: Array minimum size of 1 and maximum of 4
          default: null
        max_tokens:
          description: The maximum number of tokens allowed for the generated answer. By default, the number of tokens the model can return will be (4096 - prompt tokens).
          type: integer
          default: 4096
        presence_penalty:
          description: Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
          type: number
          default: 0
          minimum: -2
          maximum: 2
        frequency_penalty:
          description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
          type: number
          default: 0
          minimum: -2
          maximum: 2
        logit_bias:
          description: Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
          type: object
          nullable: true
        user:
          description: A unique identifier representing your end-user, which can help Azure OpenAI to monitor and detect abuse.
          type: string
          example: user-1234
          nullable: false
    createChatCompletionRequest:
      type: object
      allOf:
        - $ref: '#/components/schemas/chatCompletionsRequestCommon'
        - properties:
            messages:
              description: A list of messages comprising the conversation so far. [Example Python code](https://github.com/openai/openai-cookbook/blob/main/examples/How_to_format_inputs_to_ChatGPT_models.ipynb).
              type: array
              minItems: 1
              items:
                $ref: '#/components/schemas/chatCompletionRequestMessage'
            data_sources:
              type: array
              description: |2-
                  The configuration entries for Azure OpenAI chat extensions that use them.
                  This additional specification is only compatible with Azure OpenAI.
              items:
                $ref: '#/components/schemas/azureChatExtensionConfiguration'
            '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'
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



