> ## Documentation Index
> Fetch the complete documentation index at: https://azure-foundry.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Post chatcompletions

> Creates a chat completion.



## OpenAPI

````yaml api-reference/openai-v1.yaml post /chat/completions
openapi: 3.0.0
info:
  title: Azure AI Foundry Models Service
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
  version: v1
servers:
  - url: '{endpoint}/openai/v1'
    description: Azure AI Foundry Models APIs
    variables:
      endpoint:
        default: ''
        description: >-
          A supported Azure AI Foundry Models APIs endpoint, including protocol
          and hostname.

          For example:

          https://westus.api.cognitive.microsoft.com).
security:
  - ApiKeyAuth: []
  - ApiKeyAuth_: []
  - OAuth2Auth:
      - https://cognitiveservices.azure.com/.default
tags:
  - name: Chat
  - name: Embeddings
  - name: Evals
  - name: Files
  - name: Fine-tuning
  - name: Models
  - name: Responses
  - name: Vector Stores
paths:
  /chat/completions:
    post:
      tags:
        - Chat
      description: Creates a chat completion.
      operationId: createChatCompletion
      parameters:
        - name: api-version
          in: query
          required: false
          description: >-
            The explicit Azure AI Foundry Models API version to use for this
            request.

            `v1` if not otherwise specified.
          schema:
            $ref: '#/components/schemas/AzureAIFoundryModelsApiVersion'
            default: v1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AzureCreateChatCompletionRequest'
      responses:
        '200':
          description: The request has succeeded.
          headers:
            apim-request-id:
              required: false
              description: A request ID used for troubleshooting purposes.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AzureCreateChatCompletionResponse'
            text/event-stream:
              schema:
                $ref: '#/components/schemas/AzureCreateChatCompletionStreamResponse'
        default:
          description: An unexpected error response.
          headers:
            apim-request-id:
              required: false
              description: A request ID used for troubleshooting purposes.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AzureErrorResponse'
components:
  schemas:
    AzureAIFoundryModelsApiVersion:
      type: string
      enum:
        - v1
        - preview
    AzureCreateChatCompletionRequest:
      type: object
      required:
        - messages
        - model
      properties:
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Set of 16 key-value pairs that can be attached to an object. This
            can be

            useful for storing additional information about the object in a
            structured

            format, and querying for objects via API or the dashboard.


            Keys are strings with a maximum length of 64 characters. Values are
            strings

            with a maximum length of 512 characters.
          x-oaiTypeLabel: map
        temperature:
          type: number
          format: float
          nullable: true
          minimum: 0
          maximum: 2
          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.
          default: 1
        top_p:
          type: number
          format: float
          nullable: true
          minimum: 0
          maximum: 1
          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.
          default: 1
        user:
          type: string
          description: |-
            A unique identifier representing your end-user, which can help to
            monitor and detect abuse.
        top_logprobs:
          type: integer
          format: int32
          minimum: 0
          maximum: 20
          description: >-
            An integer between 0 and 20 specifying the number of most likely
            tokens to return at each token position, each with an associated log
            probability.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/OpenAI.ChatCompletionRequestMessage'
          minItems: 1
          description: >-
            A list of messages comprising the conversation so far. Depending on
            the

            model you use, different message types (modalities) are supported,

            like text, images, and audio.
        modalities:
          type: object
          allOf:
            - $ref: '#/components/schemas/ResponseModalities'
          nullable: true
        reasoning_effort:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ReasoningEffort'
          nullable: true
          default: medium
        max_completion_tokens:
          type: integer
          format: int32
          nullable: true
          description: |-
            An upper bound for the number of tokens that can be generated for a
            completion, including visible output tokens and reasoning tokens.
        frequency_penalty:
          type: number
          format: float
          nullable: true
          minimum: -2
          maximum: 2
          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.
          default: 0
        presence_penalty:
          type: number
          format: float
          nullable: true
          minimum: -2
          maximum: 2
          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.
          default: 0
        response_format:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ResponseFormat'
          description: >-
            An object specifying the format that the model must output.


            Setting to `{ "type": "json_schema", "json_schema": {...} }` enables

            Structured Outputs which ensures the model will match your supplied
            JSON

            schema.


            Setting to `{ "type": "json_object" }` enables JSON mode, which
            ensures

            the message the model generates is valid JSON.


            **Important:** when using JSON mode, you **must** also instruct the
            model

            to produce JSON yourself via a system or user message. Without this,
            the

            model may generate an unending stream of whitespace until the
            generation

            reaches the token limit, resulting in a long-running and seemingly
            "stuck"

            request. Also note that the message content may be partially cut off
            if

            `finish_reason="length"`, which indicates the generation exceeded

            `max_tokens` or the conversation exceeded the max context length.
        audio:
          type: object
          properties:
            voice:
              allOf:
                - $ref: '#/components/schemas/OpenAI.VoiceIdsShared'
              description: >-
                The voice the model uses to respond. Supported voices are

                `alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`,
                `onyx`, `sage`, and `shimmer`.
            format:
              type: string
              enum:
                - wav
                - aac
                - mp3
                - flac
                - opus
                - pcm16
              description: >-
                Specifies the output audio format. Must be one of `wav`, `mp3`,
                `flac`,

                `opus`, or `pcm16`.
          required:
            - voice
            - format
          nullable: true
          description: >-
            Parameters for audio output. Required when audio output is requested
            with

            `modalities: ["audio"]`.
        store:
          type: boolean
          nullable: true
          description: >-
            Whether or not to store the output of this chat completion request
            for

            use in model distillation or evals products.
          default: false
        stream:
          type: boolean
          nullable: true
          description: >-
            If set to true, the model response data will be streamed to the
            client

            as it is generated using server-sent events.
          default: false
        stop:
          allOf:
            - $ref: '#/components/schemas/OpenAI.StopConfiguration'
          nullable: true
          default: null
        logit_bias:
          type: object
          additionalProperties:
            type: integer
            format: int32
          nullable: true
          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.
          x-oaiTypeLabel: map
          default: null
        logprobs:
          type: boolean
          nullable: true
          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`.
          default: false
        max_tokens:
          type: integer
          format: int32
          nullable: true
          description: >-
            The maximum number of tokens that can be generated in the chat
            completion.

            This value can be used to control costs for text generated via API.


            This value is now deprecated in favor of `max_completion_tokens`,
            and is

            not compatible with o1 series models.
          deprecated: true
        'n':
          type: integer
          format: int32
          nullable: true
          minimum: 1
          maximum: 128
          description: >-
            How many chat completion choices to generate for each input message.
            Note that you will be charged based on the number of generated
            tokens across all of the choices. Keep `n` as `1` to minimize costs.
          default: 1
        prediction:
          type: object
          allOf:
            - $ref: '#/components/schemas/OpenAI.ChatOutputPrediction'
          nullable: true
          description: |-
            Configuration for a predicted output, which can greatly improve
            response times when large parts of the model response are known
            ahead of time. This is most common when you are regenerating a
            file with only minor changes to most of the content.
        seed:
          type: integer
          format: int64
          nullable: true
          minimum: -9223372036854776000
          maximum: 9223372036854776000
          description: >-
            This feature is in Beta.

            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.
        stream_options:
          type: object
          allOf:
            - $ref: '#/components/schemas/OpenAI.ChatCompletionStreamOptions'
          nullable: true
          default: null
        tools:
          type: array
          items:
            $ref: '#/components/schemas/OpenAI.ChatCompletionTool'
          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. A max of 128 functions are
            supported.
        tool_choice:
          $ref: '#/components/schemas/OpenAI.ChatCompletionToolChoiceOption'
        parallel_tool_calls:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ParallelToolCalls'
          default: true
        function_call:
          anyOf:
            - type: string
              enum:
                - none
                - auto
            - $ref: '#/components/schemas/OpenAI.ChatCompletionFunctionCallOption'
          description: >-
            Deprecated in favor of `tool_choice`.


            Controls which (if any) function is called by the model.


            `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.


            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.
          deprecated: true
        functions:
          type: array
          items:
            $ref: '#/components/schemas/OpenAI.ChatCompletionFunctions'
          minItems: 1
          maxItems: 128
          description: |-
            Deprecated in favor of `tools`.

            A list of functions the model may generate JSON inputs for.
          deprecated: true
        model:
          type: string
          description: >-
            The model deployment identifier to use for the chat completion
            request.
        data_sources:
          type: array
          items:
            $ref: '#/components/schemas/AzureChatDataSource'
          description: >-
            The data sources to use for the On Your Data feature, exclusive to
            Azure OpenAI.
        user_security_context:
          $ref: '#/components/schemas/AzureUserSecurityContext'
      description: >-
        The extended request model for chat completions against the Azure OpenAI
        service.

        This adds the ability to provide data sources for the On Your Data
        feature.
    AzureCreateChatCompletionResponse:
      type: object
      required:
        - id
        - created
        - model
        - object
        - choices
      properties:
        id:
          type: string
          description: A unique identifier for the chat completion.
        created:
          type: integer
          format: unixtime
          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
          enum:
            - chat.completion
          description: The object type, which is always `chat.completion`.
        usage:
          $ref: '#/components/schemas/OpenAI.CompletionUsage'
        choices:
          type: array
          items:
            type: object
            properties:
              finish_reason:
                type: string
                enum:
                  - stop
                  - length
                  - tool_calls
                  - content_filter
                  - function_call
                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.
              index:
                type: integer
                format: int32
                description: The index of the choice in the list of choices.
              logprobs:
                type: object
                properties:
                  content:
                    type: array
                    items:
                      $ref: '#/components/schemas/OpenAI.ChatCompletionTokenLogprob'
                    nullable: true
                    description: >-
                      A list of message content tokens with log probability
                      information.
                    readOnly: true
                  refusal:
                    type: array
                    items:
                      $ref: '#/components/schemas/OpenAI.ChatCompletionTokenLogprob'
                    nullable: true
                    description: >-
                      A list of message refusal tokens with log probability
                      information.
                    readOnly: true
                required:
                  - content
                  - refusal
                nullable: true
                description: Log probability information for the choice.
              content_filter_results:
                $ref: '#/components/schemas/AzureContentFilterResultForChoice'
              message:
                allOf:
                  - $ref: '#/components/schemas/AzureChatCompletionResponseMessage'
                description: The chat completion response message.
            required:
              - finish_reason
              - index
              - logprobs
              - message
        prompt_filter_results:
          type: array
          items:
            type: object
            properties:
              prompt_index:
                type: integer
                format: int32
                description: >-
                  The index of the input prompt that this content filter result
                  corresponds to.
              content_filter_results:
                allOf:
                  - $ref: '#/components/schemas/AzureContentFilterResultForPrompt'
                description: >-
                  The content filter results associated with the indexed input
                  prompt.
            required:
              - prompt_index
              - content_filter_results
          description: >-
            The Responsible AI content filter annotations associated with prompt
            inputs into chat completions.
      description: >-
        The extended top-level chat completion response model for the Azure
        OpenAI service.

        This model adds Responsible AI content filter annotations for prompt
        input.
    AzureCreateChatCompletionStreamResponse:
      type: object
      required:
        - id
        - choices
        - created
        - model
        - object
      properties:
        id:
          type: string
          description: >-
            A unique identifier for the chat completion. Each chunk has the same
            ID.
        choices:
          type: array
          items:
            type: object
            properties:
              delta:
                $ref: '#/components/schemas/OpenAI.ChatCompletionStreamResponseDelta'
              logprobs:
                type: object
                properties:
                  content:
                    type: array
                    items:
                      $ref: '#/components/schemas/OpenAI.ChatCompletionTokenLogprob'
                    nullable: true
                    description: >-
                      A list of message content tokens with log probability
                      information.
                    readOnly: true
                  refusal:
                    type: array
                    items:
                      $ref: '#/components/schemas/OpenAI.ChatCompletionTokenLogprob'
                    nullable: true
                    description: >-
                      A list of message refusal tokens with log probability
                      information.
                    readOnly: true
                required:
                  - content
                  - refusal
                nullable: true
                description: Log probability information for the choice.
              finish_reason:
                type: string
                enum:
                  - stop
                  - length
                  - tool_calls
                  - content_filter
                  - function_call
                nullable: true
                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.
              index:
                type: integer
                format: int32
                description: The index of the choice in the list of choices.
            required:
              - delta
              - finish_reason
              - index
          description: >-
            A list of chat completion choices. Can contain more than one
            elements if `n` is greater than 1. Can also be empty for the

            last chunk if you set `stream_options: {"include_usage": true}`.
        created:
          type: integer
          format: unixtime
          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
          enum:
            - chat.completion.chunk
          description: The object type, which is always `chat.completion.chunk`.
        usage:
          type: object
          allOf:
            - $ref: '#/components/schemas/OpenAI.CompletionUsage'
          nullable: true
          description: >-
            An optional field that will only be present when you set

            `stream_options: {"include_usage": true}` in your request. When
            present, it

            contains a null value **except for the last chunk** which contains
            the

            token usage statistics for the entire request.


            **NOTE:** If the stream is interrupted or cancelled, you may not

            receive the final usage chunk which contains the total token usage
            for

            the request.
        delta:
          $ref: '#/components/schemas/AzureChatCompletionStreamResponseDelta'
        content_filter_results:
          $ref: '#/components/schemas/AzureContentFilterResultForChoice'
    AzureErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: The distinct, machine-generated identifier for the error.
            message:
              type: string
              description: A human-readable message associated with the error.
            param:
              type: string
              description: >-
                If applicable, the request input parameter associated with the
                error
            type:
              type: string
              enum:
                - error
              description: The object type, always 'error.'
            inner_error: {}
          description: The error details.
    OpenAI.ChatCompletionRequestMessage:
      type: object
      required:
        - role
      properties:
        role:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ChatCompletionRole'
          description: The role of the author of this message.
        content:
          anyOf:
            - type: string
            - type: array
              items:
                $ref: >-
                  #/components/schemas/OpenAI.ChatCompletionRequestMessageContentPart
          nullable: true
          description: >-
            The content of the message. Valid content part types vary per
            message role.
      discriminator:
        propertyName: role
        mapping:
          system: '#/components/schemas/OpenAI.ChatCompletionRequestSystemMessage'
          developer: '#/components/schemas/OpenAI.ChatCompletionRequestDeveloperMessage'
          user: '#/components/schemas/OpenAI.ChatCompletionRequestUserMessage'
          assistant: '#/components/schemas/OpenAI.ChatCompletionRequestAssistantMessage'
          tool: '#/components/schemas/OpenAI.ChatCompletionRequestToolMessage'
          function: '#/components/schemas/OpenAI.ChatCompletionRequestFunctionMessage'
    ResponseModalities:
      type: array
      items:
        type: string
        enum:
          - text
          - audio
      description: >-
        Output types that you would like the model to generate.

        Most models are capable of generating text, which is the default:


        `["text"]`


        The `gpt-4o-audio-preview` model can also be used to

        [generate audio](/docs/guides/audio). To request that this model
        generate

        both text and audio responses, you can use:


        `["text", "audio"]`
    OpenAI.ReasoningEffort:
      type: string
      enum:
        - low
        - medium
        - high
      description: |-
        **o-series models only**

        Constrains effort on reasoning for
        [reasoning models](https://platform.openai.com/docs/guides/reasoning).
        Currently supported values are `low`, `medium`, and `high`. Reducing
        reasoning effort can result in faster responses and fewer tokens used
        on reasoning in a response.
    OpenAI.ResponseFormat:
      type: object
      required:
        - type
      properties:
        type:
          type: string
          enum:
            - text
            - json_object
            - json_schema
      discriminator:
        propertyName: type
        mapping:
          text: '#/components/schemas/OpenAI.ResponseFormatText'
          json_object: '#/components/schemas/OpenAI.ResponseFormatJsonObject'
          json_schema: '#/components/schemas/OpenAI.ResponseFormatJsonSchema'
    OpenAI.VoiceIdsShared:
      anyOf:
        - type: string
        - type: string
          enum:
            - alloy
            - ash
            - ballad
            - coral
            - echo
            - fable
            - onyx
            - nova
            - sage
            - shimmer
            - verse
    OpenAI.StopConfiguration:
      anyOf:
        - type: string
        - type: array
          items:
            type: string
      description: |-
        Not supported with latest reasoning models `o3` and `o4-mini`.

        Up to 4 sequences where the API will stop generating further tokens. The
        returned text will not contain the stop sequence.
    OpenAI.ChatOutputPrediction:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/OpenAI.ChatOutputPredictionType'
      discriminator:
        propertyName: type
        mapping:
          content: '#/components/schemas/OpenAI.ChatOutputPredictionContent'
      description: Base representation of predicted output from a model.
    OpenAI.ChatCompletionStreamOptions:
      type: object
      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. **NOTE:** If the stream is interrupted, you may not receive
            the

            final usage chunk which contains the total token usage for the
            request.
      description: >-
        Options for streaming response. Only set this when you set `stream:
        true`.
    OpenAI.ChatCompletionTool:
      type: object
      required:
        - type
        - function
      properties:
        type:
          type: string
          enum:
            - function
          description: The type of the tool. Currently, only `function` is supported.
        function:
          $ref: '#/components/schemas/OpenAI.FunctionObject'
    OpenAI.ChatCompletionToolChoiceOption:
      anyOf:
        - type: string
          enum:
            - none
            - auto
            - required
        - $ref: '#/components/schemas/OpenAI.ChatCompletionNamedToolChoice'
      description: >-
        Controls which (if any) tool is called by the model.

        `none` means the model will not call any tool and instead generates a
        message.

        `auto` means the model can pick between generating a message or calling
        one or more tools.

        `required` means the model must call one or more tools.

        Specifying a particular tool via `{"type": "function", "function":
        {"name": "my_function"}}` forces the model to call that tool.


        `none` is the default when no tools are present. `auto` is the default
        if tools are present.
    OpenAI.ParallelToolCalls:
      type: boolean
      description: >-
        Whether to enable [parallel function
        calling](/docs/guides/function-calling#configuring-parallel-function-calling)
        during tool use.
    OpenAI.ChatCompletionFunctionCallOption:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: The name of the function to call.
      description: >-
        Specifying a particular function via `{"name": "my_function"}` forces
        the model to call that function.
    OpenAI.ChatCompletionFunctions:
      type: object
      required:
        - name
      properties:
        description:
          type: string
          description: >-
            A description of what the function does, used by the model to choose
            when and how to call the function.
        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.
        parameters:
          description: >-
            The parameters the functions accepts, described as a JSON Schema
            object.

            See the [JSON Schema
            reference](https://json-schema.org/understanding-json-schema/)

            for documentation about the format.


            Omitting `parameters` defines a function with an empty parameter
            list.
      deprecated: true
    AzureChatDataSource:
      type: object
      required:
        - type
      properties:
        type:
          allOf:
            - $ref: '#/components/schemas/AzureChatDataSourceType'
          description: The differentiating type identifier for the data source.
      discriminator:
        propertyName: type
        mapping:
          azure_search: '#/components/schemas/AzureSearchChatDataSource'
          azure_cosmos_db: '#/components/schemas/AzureCosmosDBChatDataSource'
          elasticsearch: '#/components/schemas/ElasticsearchChatDataSource'
          pinecone: '#/components/schemas/PineconeChatDataSource'
          mongo_db: '#/components/schemas/MongoDBChatDataSource'
      description: >-
        A representation of configuration data for a single Azure OpenAI chat
        data source.

        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.
    AzureUserSecurityContext:
      type: object
      properties:
        application_name:
          type: string
          description: >-
            The name of the application. Sensitive personal information should
            not be included in this field.
        end_user_id:
          type: string
          description: >-
            This identifier is the Microsoft Entra ID (formerly Azure Active
            Directory) user object ID used to authenticate end-users within the
            generative AI application. Sensitive personal information should not
            be included in this field.
        end_user_tenant_id:
          type: string
          description: >-
            The Microsoft 365 tenant ID the end user belongs to. It's required
            when the generative AI application is multitenant.
        source_ip:
          type: string
          description: Captures the original client's IP address.
      description: >-
        User security context contains several parameters that describe the
        application itself, and the end user that interacts with the
        application. These fields assist your security operations teams to
        investigate and mitigate security incidents by providing a comprehensive
        approach to protecting your AI applications. [Learn
        more](https://aka.ms/TP4AI/Documentation/EndUserContext) about
        protecting AI applications using Microsoft Defender for Cloud.
    OpenAI.CompletionUsage:
      type: object
      required:
        - completion_tokens
        - prompt_tokens
        - total_tokens
      properties:
        completion_tokens:
          type: integer
          format: int32
          description: Number of tokens in the generated completion.
          default: 0
        prompt_tokens:
          type: integer
          format: int32
          description: Number of tokens in the prompt.
          default: 0
        total_tokens:
          type: integer
          format: int32
          description: Total number of tokens used in the request (prompt + completion).
          default: 0
        completion_tokens_details:
          type: object
          properties:
            accepted_prediction_tokens:
              type: integer
              format: int32
              description: |-
                When using Predicted Outputs, the number of tokens in the
                prediction that appeared in the completion.
              default: 0
            audio_tokens:
              type: integer
              format: int32
              description: Audio input tokens generated by the model.
              default: 0
            reasoning_tokens:
              type: integer
              format: int32
              description: Tokens generated by the model for reasoning.
              default: 0
            rejected_prediction_tokens:
              type: integer
              format: int32
              description: >-
                When using Predicted Outputs, the number of tokens in the

                prediction that did not appear in the completion. However, like

                reasoning tokens, these tokens are still counted in the total

                completion tokens for purposes of billing, output, and context
                window

                limits.
              default: 0
          description: Breakdown of tokens used in a completion.
        prompt_tokens_details:
          type: object
          properties:
            audio_tokens:
              type: integer
              format: int32
              description: Audio input tokens present in the prompt.
              default: 0
            cached_tokens:
              type: integer
              format: int32
              description: Cached tokens present in the prompt.
              default: 0
          description: Breakdown of tokens used in the prompt.
      description: Usage statistics for the completion request.
    OpenAI.ChatCompletionTokenLogprob:
      type: object
      required:
        - token
        - logprob
        - bytes
        - top_logprobs
      properties:
        token:
          type: string
          description: The token.
        logprob:
          type: number
          format: float
          description: >-
            The log probability of this token, if it is within the top 20 most
            likely tokens. Otherwise, the value `-9999.0` is used to signify
            that the token is very unlikely.
        bytes:
          type: array
          items:
            type: integer
            format: int32
          nullable: true
          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.
        top_logprobs:
          type: array
          items:
            type: object
            properties:
              token:
                type: string
                description: The token.
              logprob:
                type: number
                format: float
                description: >-
                  The log probability of this token, if it is within the top 20
                  most likely tokens. Otherwise, the value `-9999.0` is used to
                  signify that the token is very unlikely.
              bytes:
                type: array
                items:
                  type: integer
                  format: int32
                nullable: true
                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.
            required:
              - token
              - logprob
              - bytes
          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.
    AzureContentFilterResultForChoice:
      type: object
      properties:
        sexual:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
          description: >-
            A content filter category for language related to anatomical organs
            and genitals, romantic relationships, acts

            portrayed in erotic or affectionate terms, pregnancy, physical
            sexual acts, including those portrayed as an

            assault or a forced sexual violent act against one's will,
            prostitution, pornography, and abuse.
        hate:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
          description: >-
            A content filter category that can refer to any content that attacks
            or uses pejorative or discriminatory

            language with reference to a person or identity group based on
            certain differentiating attributes of these groups

            including but not limited to race, ethnicity, nationality, gender
            identity and expression, sexual orientation,

            religion, immigration status, ability status, personal appearance,
            and body size.
        violence:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
          description: >-
            A content filter category for language related to physical actions
            intended to hurt, injure, damage, or kill

            someone or something; describes weapons, guns and related entities,
            such as manufactures, associations,

            legislation, and so on.
        self_harm:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
          description: >-
            A content filter category that describes language related to
            physical actions intended to purposely hurt, injure,

            damage one's body or kill oneself.
        profanity:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterDetectionResult'
          description: >-
            A detection result that identifies whether crude, vulgar, or
            otherwise objection language is present in the

            content.
        custom_blocklists:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterBlocklistResult'
          description: >-
            A collection of binary filtering outcomes for configured custom
            blocklists.
        custom_topics:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterCustomTopicResult'
          description: >-
            A collection of binary filtering outcomes for configured custom
            topics.
        error:
          type: object
          properties:
            code:
              type: integer
              format: int32
              description: A distinct, machine-readable code associated with the error.
            message:
              type: string
              description: A human-readable message associated with the error.
          required:
            - code
            - message
          description: >-
            If present, details about an error that prevented content filtering
            from completing its evaluation.
        protected_material_text:
          allOf:
            - $ref: '#/components/schemas/AzureContentFilterDetectionResult'
          description: >-
            A detection result that describes a match against text protected
            under copyright or other status.
        protected_material_code:
          type: object
          properties:
            filtered:
              type: boolean
              description: >-
                Whether the content detection resulted in a content filtering
                action.
            detected:
              type: boolean
              description: >-
                Whether the labeled content category was detected in the
                content.
            citation:
              type: object
              properties:
                license:
                  type: string
                  description: >-
                    The name or identifier of the license associated with the
                    detection.
                URL:
                  type: string
                  format: uri
                  description: The URL associated with the license.
              description: >-
                If available, the citation details describing the associated
                license and its location.
          required:
            - filtered
            - detected
          description: >-
            A detection result that describes a match against licensed code or
            other protected source material.
        ungrounded_material:
          $ref: >-
            #/components/schemas/AzureContentFilterCompletionTextSpanDetectionResult
        personally_identifiable_information:
          allOf:
            - $ref: >-
                #/components/schemas/AzureContentFilterPersonallyIdentifiableInformationResult
          description: >-
            A detection result that describes matches against Personal
            Identifiable Information with configurable subcategories.
      description: >-
        A content filter result for a single response item produced by a
        generative AI system.
    AzureChatCompletionResponseMessage:
      type: object
      required:
        - content
        - refusal
        - role
      properties:
        content:
          type: string
          nullable: true
          description: The contents of the message.
        refusal:
          type: string
          nullable: true
          description: The refusal message generated by the model.
        tool_calls:
          $ref: '#/components/schemas/ChatCompletionMessageToolCallsItem'
          readOnly: true
        annotations:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
                enum:
                  - url_citation
                description: The type of the URL citation. Always `url_citation`.
              url_citation:
                type: object
                properties:
                  end_index:
                    type: integer
                    format: int32
                    description: >-
                      The index of the last character of the URL citation in the
                      message.
                  start_index:
                    type: integer
                    format: int32
                    description: >-
                      The index of the first character of the URL citation in
                      the message.
                  url:
                    type: string
                    format: uri
                    description: The URL of the web resource.
                  title:
                    type: string
                    description: The title of the web resource.
                required:
                  - end_index
                  - start_index
                  - url
                  - title
                description: A URL citation when using web search.
            required:
              - type
              - url_citation
          description: |-
            Annotations for the message, when applicable, as when using the
            [web search tool](/docs/guides/tools-web-search?api-mode=chat).
        role:
          type: string
          enum:
            - assistant
          description: The role of the author of this message.
        function_call:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
          required:
            - name
            - arguments
          description: >-
            Deprecated and replaced by `tool_calls`. The name and arguments of a
            function that should be called, as generated by the model.
          deprecated: true
        audio:
          type: object
          properties:
            id:
              type: string
              description: Unique identifier for this audio response.
            expires_at:
              type: integer
              format: unixtime
              description: >-
                The Unix timestamp (in seconds) for when this audio response
                will

                no longer be accessible on the server for use in multi-turn

                conversations.
            data:
              type: string
              format: base64
              description: |-
                Base64 encoded audio bytes generated by the model, in the format
                specified in the request.
            transcript:
              type: string
              description: Transcript of the audio generated by the model.
          required:
            - id
            - expires_at
            - data
            - transcript
          nullable: true
          description: >-
            If the audio output modality is requested, this object contains data

            about the audio response from the model. [Learn
            more](/docs/guides/audio).
        context:
          allOf:
            - $ref: '#/components/schemas/AzureChatMessageContext'
          description: >-
            The Azure-specific context information associated with the chat
            completion response message.
        reasoning_content:
          type: string
          description: >-
            An Azure-specific extension property containing generated reasoning
            content from supported models.
      description: >-
        The extended response model component for chat completion response
        messages on the Azure OpenAI service.

        This model adds support for chat message context, used by the On Your
        Data feature for intent, citations, and other

        information related to retrieval-augmented generation performed.
    AzureContentFilterResultForPrompt:
      type: object
      properties:
        prompt_index:
          type: integer
          format: int32
          description: >-
            The index of the input prompt associated with the accompanying
            content filter result categories.
        content_filter_results:
          type: object
          properties:
            sexual:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
              description: >-
                A content filter category for language related to anatomical
                organs and genitals, romantic relationships, acts

                portrayed in erotic or affectionate terms, pregnancy, physical
                sexual acts, including those portrayed as an

                assault or a forced sexual violent act against one's will,
                prostitution, pornography, and abuse.
            hate:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
              description: >-
                A content filter category that can refer to any content that
                attacks or uses pejorative or discriminatory

                language with reference to a person or identity group based on
                certain differentiating attributes of these groups

                including but not limited to race, ethnicity, nationality,
                gender identity and expression, sexual orientation,

                religion, immigration status, ability status, personal
                appearance, and body size.
            violence:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
              description: >-
                A content filter category for language related to physical
                actions intended to hurt, injure, damage, or kill

                someone or something; describes weapons, guns and related
                entities, such as manufactures, associations,

                legislation, and so on.
            self_harm:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterSeverityResult'
              description: >-
                A content filter category that describes language related to
                physical actions intended to purposely hurt, injure,

                damage one's body or kill oneself.
            profanity:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterDetectionResult'
              description: >-
                A detection result that identifies whether crude, vulgar, or
                otherwise objection language is present in the

                content.
            custom_blocklists:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterBlocklistResult'
              description: >-
                A collection of binary filtering outcomes for configured custom
                blocklists.
            custom_topics:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterCustomTopicResult'
              description: >-
                A collection of binary filtering outcomes for configured custom
                topics.
            error:
              type: object
              properties:
                code:
                  type: integer
                  format: int32
                  description: A distinct, machine-readable code associated with the error.
                message:
                  type: string
                  description: A human-readable message associated with the error.
              required:
                - code
                - message
              description: >-
                If present, details about an error that prevented content
                filtering from completing its evaluation.
            jailbreak:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterDetectionResult'
              description: >-
                A detection result that describes user prompt injection attacks,
                where malicious users deliberately exploit

                system vulnerabilities to elicit unauthorized behavior from the
                LLM. This could lead to inappropriate content

                generation or violations of system-imposed restrictions.
            indirect_attack:
              allOf:
                - $ref: '#/components/schemas/AzureContentFilterDetectionResult'
              description: >-
                A detection result that describes attacks on systems powered by
                Generative AI models that can happen every time

                an application processes information that wasn’t directly
                authored by either the developer of the application or

                the user.
          required:
            - jailbreak
            - indirect_attack
          description: The content filter category details for the result.
      description: >-
        A content filter result associated with a single input prompt item into
        a generative AI system.
    OpenAI.ChatCompletionStreamResponseDelta:
      type: object
      properties:
        audio:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ChatCompletionMessageAudioChunk'
          description: Response audio associated with the streaming chat delta payload.
        content:
          type: string
          nullable: true
          description: The contents of the chunk message.
        function_call:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
          description: >-
            Deprecated and replaced by `tool_calls`. The name and arguments of a
            function that should be called, as generated by the model.
          deprecated: true
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/OpenAI.ChatCompletionMessageToolCallChunk'
          readOnly: true
        role:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ChatCompletionRole'
          description: The role of the author of this message.
        refusal:
          type: string
          nullable: true
          description: The refusal message generated by the model.
      description: A chat completion delta generated by streamed model responses.
    AzureChatCompletionStreamResponseDelta:
      type: object
      properties:
        audio:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ChatCompletionMessageAudioChunk'
          description: Response audio associated with the streaming chat delta payload.
        content:
          type: string
          nullable: true
          description: The contents of the chunk message.
        function_call:
          type: object
          properties:
            name:
              type: string
            arguments:
              type: string
          description: >-
            Deprecated and replaced by `tool_calls`. The name and arguments of a
            function that should be called, as generated by the model.
          deprecated: true
        tool_calls:
          type: array
          items:
            $ref: '#/components/schemas/OpenAI.ChatCompletionMessageToolCallChunk'
          readOnly: true
        role:
          allOf:
            - $ref: '#/components/schemas/OpenAI.ChatCompletionRole'
          description: The role of the author of this message.
        refusal:
          type: string
          nullable: true
          description: The refusal message generated by the model.
        context:
          allOf:
            - $ref: '#/components/schemas/AzureChatMessageContext'
          description: >-
            The Azure-specific context information associated with the chat
            completion response message.
        reasoning_content:
          type: string
          description: >-
            An Azure-specific extension property containing generated reasoning
            content from supported models.
      description: >-
        The extended response model for a streaming chat response message on the
        Azure OpenAI service.

        This model adds support for chat message context, used by the On Your
        Data feature for intent, citations, and other

        information related to retrieval-augmented generation performed.
    OpenAI.ChatCompletionRole:
      type: string
      enum:
        - system
        - developer
        - user
        - assistant
        - tool
        - function
      description: The role of the author of a message
    OpenAI.ChatCompletionRequestMessageContentPart:
      type: object
      required:
        - type
      properties:
        type:
          $ref: >-
            #/components/schemas/OpenAI.ChatCompletionRequestMessageContentPartType
      discriminator:
        propertyName: type
        mapping:
          text: >-
            #/components/schemas/OpenAI.ChatCompletionRequestMessageContentPartText
          image_url: >-
            #/components/schemas/OpenAI.ChatCompletionRequestMessageContentPartImage
          refusal: >-
            #/components/schemas/OpenAI.ChatCompletionRequestMessageContentPartRefusal
          file: >-
            #/components/schemas/OpenAI.ChatCompletionRequestMessageContentPartFile
          input_audio: >-
            #/components/schemas/OpenAI.ChatCompletionRequestMessageContentPartAudio
    OpenAI.ChatOutputPredictionType:
      anyOf:
        - type: string
        - type: string
          enum:
            - content
    OpenAI.FunctionObject:
      type: object
      required:
        - name
      properties:
        description:
          type: string
          description: >-
            A description of what the function does, used by the model to choose
            when and how to call the function.
        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.
        parameters:
          description: >-
            The parameters the functions accepts, described as a JSON Schema
            object. See the [guide](/docs/guides/function-calling) for examples,
            and the [JSON Schema
            reference](https://json-schema.org/understanding-json-schema/) for
            documentation about the format.


            Omitting `parameters` defines a function with an empty parameter
            list.
        strict:
          type: boolean
          nullable: true
          description: >-
            Whether to enable strict schema adherence when generating the
            function call. If set to true, the model will follow the exact
            schema defined in the `parameters` field. Only a subset of JSON
            Schema is supported when `strict` is `true`. Learn more about
            Structured Outputs in the [function calling
            guide](docs/guides/function-calling).
          default: false
    OpenAI.ChatCompletionNamedToolChoice:
      type: object
      required:
        - type
        - function
      properties:
        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.
          required:
            - name
      description: >-
        Specifies a tool the model should use. Use to force the model to call a
        specific function.
    AzureChatDataSourceType:
      type: string
      enum:
        - azure_search
        - azure_cosmos_db
        - elasticsearch
        - pinecone
        - mongo_db
    AzureContentFilterSeverityResult:
      type: object
      required:
        - filtered
        - severity
      properties:
        filtered:
          type: boolean
          description: Whether the content severity resulted in a content filtering action.
        severity:
          type: string
          enum:
            - safe
            - low
            - medium
            - high
          description: The labeled severity of the content.
      description: >-
        A labeled content filter result item that indicates whether the content
        was filtered and what the qualitative

        severity level of the content was, as evaluated against content filter
        configuration for the category.
    AzureContentFilterDetectionResult:
      type: object
      required:
        - filtered
        - detected
      properties:
        filtered:
          type: boolean
          description: >-
            Whether the content detection resulted in a content filtering
            action.
        detected:
          type: boolean
          description: Whether the labeled content category was detected in the content.
      description: >-
        A labeled content filter result item that indicates whether the content
        was detected and whether the content was

        filtered.
    AzureContentFilterBlocklistResult:
      type: object
      required:
        - filtered
      properties:
        filtered:
          type: boolean
          description: >-
            A value indicating whether any of the detailed blocklists resulted
            in a filtering action.
        details:
          type: array
          items:
            type: object
            properties:
              filtered:
                type: boolean
                description: >-
                  A value indicating whether the blocklist produced a filtering
                  action.
              id:
                type: string
                description: The ID of the custom blocklist evaluated.
            required:
              - filtered
              - id
          description: >-
            The pairs of individual blocklist IDs and whether they resulted in a
            filtering action.
      description: >-
        A collection of true/false filtering results for configured custom
        blocklists.
    AzureContentFilterCustomTopicResult:
      type: object
      required:
        - filtered
      properties:
        filtered:
          type: boolean
          description: >-
            A value indicating whether any of the detailed topics resulted in a
            filtering action.
        details:
          type: array
          items:
            type: object
            properties:
              detected:
                type: boolean
                description: A value indicating whether the topic is detected.
              id:
                type: string
                description: The ID of the custom topic evaluated.
            required:
              - detected
              - id
          description: The pairs of individual topic IDs and whether they are detected.
      description: >-
        A collection of true/false filtering results for configured custom
        topics.
    AzureContentFilterCompletionTextSpanDetectionResult:
      type: object
      required:
        - filtered
        - detected
        - details
      properties:
        filtered:
          type: boolean
          description: >-
            Whether the content detection resulted in a content filtering
            action.
        detected:
          type: boolean
          description: Whether the labeled content category was detected in the content.
        details:
          type: array
          items:
            $ref: '#/components/schemas/AzureContentFilterCompletionTextSpan'
          description: Detailed information about the detected completion text spans.
    AzureContentFilterPersonallyIdentifiableInformationResult:
      type: object
      properties:
        redacted_text:
          type: string
          description: The redacted text with PII information removed or masked.
        sub_categories:
          type: array
          items:
            $ref: '#/components/schemas/AzurePiiSubCategoryResult'
          description: Detailed results for individual PIIHarmSubCategory(s).
      allOf:
        - $ref: '#/components/schemas/AzureContentFilterDetectionResult'
      description: >-
        A content filter detection result for Personally Identifiable
        Information that includes harm extensions.
    ChatCompletionMessageToolCallsItem:
      type: array
      items:
        $ref: '#/components/schemas/OpenAI.ChatCompletionMessageToolCall'
      description: The tool calls generated by the model, such as function calls.
    AzureChatMessageContext:
      type: object
      properties:
        intent:
          type: string
          description: >-
            The detected intent from the chat history, which is used to carry
            conversation context between interactions
        citations:
          type: array
          items:
            type: object
            properties:
              content:
                type: string
                description: The content of the citation.
              title:
                type: string
                description: The title for the citation.
              url:
                type: string
                description: The URL of the citation.
              filepath:
                type: string
                description: The file path for the citation.
              chunk_id:
                type: string
                description: The chunk ID for the citation.
              rerank_score:
                type: number
                format: double
                description: The rerank score for the retrieval.
            required:
              - content
          description: The citations produced by the data retrieval.
        all_retrieved_documents:
          type: object
          properties:
            content:
              type: string
              description: The content of the citation.
            title:
              type: string
              description: The title for the citation.
            url:
              type: string
              description: The URL of the citation.
            filepath:
              type: string
              description: The file path for the citation.
            chunk_id:
              type: string
              description: The chunk ID for the citation.
            rerank_score:
              type: number
              format: double
              description: The rerank score for the retrieval.
            search_queries:
              type: array
              items:
                type: string
              description: The search queries executed to retrieve documents.
            data_source_index:
              type: integer
              format: int32
              description: The index of the data source used for retrieval.
            original_search_score:
              type: number
              format: double
              description: The original search score for the retrieval.
            filter_reason:
              type: string
              enum:
                - score
                - rerank
              description: If applicable, an indication of why the document was filtered.
          required:
            - content
            - search_queries
            - data_source_index
          description: >-
            Summary information about documents retrieved by the data retrieval
            operation.
      description: >-
        An additional property, added to chat completion response messages,
        produced by the Azure OpenAI service when using

        extension behavior. This includes intent and citation information from
        the On Your Data feature.
    OpenAI.ChatCompletionMessageAudioChunk:
      type: object
      properties:
        id:
          type: string
        transcript:
          type: string
        data:
          type: string
          format: base64
        expires_at:
          type: integer
          format: unixtime
    OpenAI.ChatCompletionMessageToolCallChunk:
      type: object
      required:
        - index
      properties:
        index:
          type: integer
          format: int32
        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.
    OpenAI.ChatCompletionRequestMessageContentPartType:
      type: string
      enum:
        - text
        - file
        - input_audio
        - image_url
        - refusal
    AzureContentFilterCompletionTextSpan:
      type: object
      required:
        - completion_start_offset
        - completion_end_offset
      properties:
        completion_start_offset:
          type: integer
          format: int32
          description: Offset of the UTF32 code point which begins the span.
        completion_end_offset:
          type: integer
          format: int32
          description: >-
            Offset of the first UTF32 code point which is excluded from the
            span. This field is always equal to completion_start_offset for
            empty spans. This field is always larger than
            completion_start_offset for non-empty spans.
      description: >-
        A representation of a span of completion text as used by Azure OpenAI
        content filter results.
    AzurePiiSubCategoryResult:
      type: object
      required:
        - sub_category
        - filtered
        - detected
        - redacted
      properties:
        sub_category:
          type: string
          description: The PIIHarmSubCategory that was evaluated.
        filtered:
          type: boolean
          description: >-
            Whether the content detection resulted in a content filtering action
            for this subcategory.
        detected:
          type: boolean
          description: Whether the labeled content subcategory was detected in the content.
        redacted:
          type: boolean
          description: Whether the content was redacted for this subcategory.
      description: Result details for individual PIIHarmSubCategory(s).
    OpenAI.ChatCompletionMessageToolCall:
      type: object
      required:
        - id
        - type
        - function
      properties:
        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:
            - name
            - arguments
          description: The function that the model called.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: api-key
    ApiKeyAuth_:
      type: apiKey
      in: header
      name: authorization
    OAuth2Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          scopes:
            https://cognitiveservices.azure.com/.default: ''

````