{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/microsoft-azure-openai/json-schema/microsoft-azure-openai-create-chat-completion-request-schema.json",
  "title": "createChatCompletionRequest",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/microsoft-azure-openai-deployments-api-openapi.yml#/components/schemas/createChatCompletionRequest",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/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": "#/$defs/chatCompletionRequestMessage"
          }
        },
        "data_sources": {
          "type": "array",
          "description": "  The configuration entries for Azure OpenAI chat extensions that use them.\n  This additional specification is only compatible with Azure OpenAI.",
          "items": {
            "$ref": "#/$defs/azureChatExtensionConfiguration"
          }
        },
        "frequency_penalty": {
          "type": [
            "number",
            "null"
          ],
          "default": 0,
          "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.\n"
        },
        "logit_bias": {
          "type": [
            "object",
            "null"
          ],
          "default": null,
          "additionalProperties": {
            "type": "integer"
          },
          "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts 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.\n"
        },
        "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`.",
          "type": [
            "boolean",
            "null"
          ],
          "default": false
        },
        "top_logprobs": {
          "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. `logprobs` must be set to `true` if this parameter is used.",
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 20
        },
        "max_tokens": {
          "description": "The maximum number of [tokens](/tokenizer) that can be generated in the chat completion.\n\nThe total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.\n",
          "type": [
            "integer",
            "null"
          ]
        },
        "n": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "maximum": 128,
          "default": 1,
          "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."
        },
        "presence_penalty": {
          "type": [
            "number",
            "null"
          ],
          "default": 0,
          "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.\n"
        },
        "parallel_tool_calls": {
          "$ref": "#/$defs/ParallelToolCalls"
        },
        "response_format": {
          "description": "An object specifying the format that the model must output. Compatible with [GPT-4o](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models), [GPT-4o mini](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models), [GPT-4 Turbo](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-models) and all [GPT-3.5](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models#gpt-35) Turbo models newer than `gpt-3.5-turbo-1106`.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables Structured Outputs which guarantees the model will match your supplied JSON schema.\n\nSetting to `{ \"type\": \"json_object\" }` enables JSON mode, which guarantees the message the model generates is valid JSON.\n\n**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.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/ResponseFormatText"
            },
            {
              "$ref": "#/$defs/ResponseFormatJsonObject"
            },
            {
              "$ref": "#/$defs/ResponseFormatJsonSchema"
            }
          ],
          "x-oaiExpandable": true
        },
        "seed": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": -9223372036854775808,
          "maximum": 9223372036854775807,
          "description": "This feature is in Beta.\nIf 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.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n"
        },
        "stop": {
          "description": "Up to 4 sequences where the API will stop generating further tokens.\n",
          "default": null,
          "oneOf": [
            {
              "type": [
                "string",
                "null"
              ]
            },
            {
              "type": "array",
              "minItems": 1,
              "maxItems": 4,
              "items": {
                "type": "string"
              }
            }
          ]
        },
        "stream": {
          "description": "If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n",
          "type": [
            "boolean",
            "null"
          ],
          "default": false
        },
        "temperature": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 2,
          "default": 1,
          "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.\n\nWe generally recommend altering this or `top_p` but not both.\n"
        },
        "top_p": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1,
          "default": 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.\n\nWe generally recommend altering this or `temperature` but not both.\n"
        },
        "tools": {
          "type": "array",
          "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.\n",
          "items": {
            "$ref": "#/$defs/chatCompletionTool"
          }
        },
        "tool_choice": {
          "$ref": "#/$defs/chatCompletionToolChoiceOption"
        },
        "function_call": {
          "deprecated": true,
          "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n`none` means the model will not call a function and instead generates a message.\n`auto` means the model can pick between generating a message or calling a function.\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n\n`none` is the default when no functions are present. `auto` is the default if functions are present.\n",
          "oneOf": [
            {
              "type": "string",
              "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.\n",
              "enum": [
                "none",
                "auto"
              ]
            },
            {
              "$ref": "#/$defs/chatCompletionFunctionCallOption"
            }
          ],
          "x-oaiExpandable": true
        },
        "functions": {
          "deprecated": true,
          "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n",
          "type": "array",
          "minItems": 1,
          "maxItems": 128,
          "items": {
            "$ref": "#/$defs/chatCompletionFunctions"
          }
        },
        "user": {
          "type": "string",
          "description": "A unique identifier representing your end-user, which can help to monitor and detect abuse.\n"
        }
      },
      "required": [
        "messages"
      ]
    }
  ],
  "$defs": {
    "FunctionObject": {
      "type": "object",
      "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": {
          "$ref": "#/$defs/FunctionParameters"
        },
        "strict": {
          "type": [
            "boolean",
            "null"
          ],
          "default": false,
          "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)."
        }
      },
      "required": [
        "name"
      ]
    },
    "FunctionParameters": {
      "type": "object",
      "description": "The parameters the functions accepts, described as a JSON Schema object. See the guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. \n\nOmitting `parameters` defines a function with an empty parameter list.",
      "additionalProperties": true
    },
    "ParallelToolCalls": {
      "type": "boolean",
      "description": "Whether to enable parallel function calling during tool use.",
      "default": true
    },
    "ResponseFormatJsonObject": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of response format being defined: `json_object`",
          "enum": [
            "json_object"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "ResponseFormatJsonSchema": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of response format being defined: `json_schema`",
          "enum": [
            "json_schema"
          ]
        },
        "json_schema": {
          "type": "object",
          "properties": {
            "description": {
              "type": "string",
              "description": "A description of what the response format is for, used by the model to determine how to respond in the format."
            },
            "name": {
              "type": "string",
              "description": "The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64."
            },
            "schema": {
              "$ref": "#/$defs/ResponseFormatJsonSchemaSchema"
            },
            "strict": {
              "type": [
                "boolean",
                "null"
              ],
              "default": false,
              "description": "Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`."
            }
          },
          "required": [
            "type",
            "name"
          ]
        }
      },
      "required": [
        "type",
        "json_schema"
      ]
    },
    "ResponseFormatJsonSchemaSchema": {
      "type": "object",
      "description": "The schema for the response format, described as a JSON Schema object.",
      "additionalProperties": true
    },
    "ResponseFormatText": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "The type of response format being defined: `text`",
          "enum": [
            "text"
          ]
        }
      },
      "required": [
        "type"
      ]
    },
    "azureChatExtensionConfiguration": {
      "required": [
        "type"
      ],
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/$defs/azureChatExtensionType"
        }
      },
      "description": "  A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat\n  completions request that should use Azure OpenAI chat extensions to augment the response behavior.\n  The use of this configuration is compatible only with Azure OpenAI."
    },
    "azureChatExtensionType": {
      "type": "string",
      "description": "  A representation of configuration data for a single Azure OpenAI chat extension. This will be used by a chat\n  completions request that should use Azure OpenAI chat extensions to augment the response behavior.\n  The use of this configuration is compatible only with Azure OpenAI.",
      "enum": [
        "azure_search",
        "azure_cosmos_db"
      ],
      "x-ms-enum": {
        "name": "AzureChatExtensionType",
        "modelAsString": true,
        "values": [
          {
            "name": "azureSearch",
            "value": "azure_search",
            "description": "Represents the use of Azure Search as an Azure OpenAI chat extension."
          },
          {
            "name": "azureCosmosDB",
            "value": "azure_cosmos_db",
            "description": "Represents the use of Azure Cosmos DB as an Azure OpenAI chat extension."
          }
        ]
      }
    },
    "chatCompletionFunctionCallOption": {
      "type": "object",
      "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the function to call."
        }
      },
      "required": [
        "name"
      ]
    },
    "chatCompletionFunctions": {
      "type": "object",
      "deprecated": true,
      "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": {
          "$ref": "#/$defs/FunctionParameters"
        }
      },
      "required": [
        "name"
      ]
    },
    "chatCompletionMessageToolCall": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the tool call."
        },
        "type": {
          "$ref": "#/$defs/toolCallType"
        },
        "function": {
          "type": "object",
          "description": "The function that the model called.",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the function to call."
            },
            "arguments": {
              "type": "string",
              "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."
            }
          },
          "required": [
            "name",
            "arguments"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "function"
      ]
    },
    "chatCompletionMessageToolCalls": {
      "type": "array",
      "description": "The tool calls generated by the model, such as function calls.",
      "items": {
        "$ref": "#/$defs/chatCompletionMessageToolCall"
      }
    },
    "chatCompletionNamedToolChoice": {
      "type": "object",
      "description": "Specifies a tool the model should use. Use to force the model to call a specific 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"
          ]
        }
      },
      "required": [
        "type",
        "function"
      ]
    },
    "chatCompletionRequestAssistantMessage": {
      "type": "object",
      "title": "Assistant message",
      "properties": {
        "content": {
          "oneOf": [
            {
              "type": "string",
              "description": "The contents of the assistant message.",
              "title": "Text content"
            },
            {
              "type": "array",
              "description": "An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.",
              "title": "Array of content parts",
              "items": {
                "$ref": "#/$defs/chatCompletionRequestAssistantMessageContentPart"
              },
              "minItems": 1
            }
          ],
          "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n"
        },
        "refusal": {
          "type": [
            "string",
            "null"
          ],
          "description": "The refusal message by the assistant."
        },
        "role": {
          "type": "string",
          "enum": [
            "assistant"
          ],
          "description": "The role of the messages author, in this case `assistant`."
        },
        "name": {
          "type": "string",
          "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role."
        },
        "tool_calls": {
          "$ref": "#/$defs/chatCompletionMessageToolCalls"
        },
        "function_call": {
          "type": [
            "object",
            "null"
          ],
          "deprecated": true,
          "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.",
          "properties": {
            "arguments": {
              "type": "string",
              "description": "The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function."
            },
            "name": {
              "type": "string",
              "description": "The name of the function to call."
            }
          },
          "required": [
            "arguments",
            "name"
          ]
        }
      },
      "required": [
        "role"
      ]
    },
    "chatCompletionRequestAssistantMessageContentPart": {
      "oneOf": [
        {
          "$ref": "#/$defs/chatCompletionRequestMessageContentPartText"
        },
        {
          "$ref": "#/$defs/chatCompletionRequestMessageContentPartRefusal"
        }
      ]
    },
    "chatCompletionRequestFunctionMessage": {
      "type": "object",
      "title": "Function message",
      "deprecated": true,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "function"
          ],
          "description": "The role of the messages author, in this case `function`."
        },
        "content": {
          "type": [
            "string",
            "null"
          ],
          "description": "The contents of the function message."
        },
        "name": {
          "type": "string",
          "description": "The name of the function to call."
        }
      },
      "required": [
        "role",
        "content",
        "name"
      ]
    },
    "chatCompletionRequestMessage": {
      "oneOf": [
        {
          "$ref": "#/$defs/chatCompletionRequestSystemMessage"
        },
        {
          "$ref": "#/$defs/chatCompletionRequestUserMessage"
        },
        {
          "$ref": "#/$defs/chatCompletionRequestAssistantMessage"
        },
        {
          "$ref": "#/$defs/chatCompletionRequestToolMessage"
        },
        {
          "$ref": "#/$defs/chatCompletionRequestFunctionMessage"
        }
      ]
    },
    "chatCompletionRequestMessageContentPartImage": {
      "type": "object",
      "title": "Image content part",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "image_url"
          ],
          "description": "The type of the content part."
        },
        "image_url": {
          "type": "object",
          "properties": {
            "url": {
              "type": "string",
              "description": "Either a URL of the image or the base64 encoded image data.",
              "format": "uri"
            },
            "detail": {
              "type": "string",
              "description": "Specifies the detail level of the image. Learn more in the [Vision guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/gpt-with-vision?tabs=rest%2Csystem-assigned%2Cresource#detail-parameter-settings-in-image-processing-low-high-auto).",
              "enum": [
                "auto",
                "low",
                "high"
              ],
              "default": "auto"
            }
          },
          "required": [
            "url"
          ]
        }
      },
      "required": [
        "type",
        "image_url"
      ]
    },
    "chatCompletionRequestMessageContentPartRefusal": {
      "type": "object",
      "title": "Refusal content part",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "refusal"
          ],
          "description": "The type of the content part."
        },
        "refusal": {
          "type": "string",
          "description": "The refusal message generated by the model."
        }
      },
      "required": [
        "type",
        "refusal"
      ]
    },
    "chatCompletionRequestMessageContentPartText": {
      "type": "object",
      "title": "Text content part",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "text"
          ],
          "description": "The type of the content part."
        },
        "text": {
          "type": "string",
          "description": "The text content."
        }
      },
      "required": [
        "type",
        "text"
      ]
    },
    "chatCompletionRequestSystemMessage": {
      "type": "object",
      "title": "System message",
      "properties": {
        "content": {
          "description": "The contents of the system message.",
          "oneOf": [
            {
              "type": "string",
              "description": "The contents of the system message.",
              "title": "Text content"
            },
            {
              "type": "array",
              "description": "An array of content parts with a defined type. For system messages, only type `text` is supported.",
              "title": "Array of content parts",
              "items": {
                "$ref": "#/$defs/chatCompletionRequestSystemMessageContentPart"
              },
              "minItems": 1
            }
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "system"
          ],
          "description": "The role of the messages author, in this case `system`."
        },
        "name": {
          "type": "string",
          "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role."
        }
      },
      "required": [
        "content",
        "role"
      ]
    },
    "chatCompletionRequestSystemMessageContentPart": {
      "oneOf": [
        {
          "$ref": "#/$defs/chatCompletionRequestMessageContentPartText"
        }
      ]
    },
    "chatCompletionRequestToolMessage": {
      "type": "object",
      "title": "Tool message",
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "tool"
          ],
          "description": "The role of the messages author, in this case `tool`."
        },
        "content": {
          "oneOf": [
            {
              "type": "string",
              "description": "The contents of the tool message.",
              "title": "Text content"
            },
            {
              "type": "array",
              "description": "An array of content parts with a defined type. For tool messages, only type `text` is supported.",
              "title": "Array of content parts",
              "items": {
                "$ref": "#/$defs/chatCompletionRequestToolMessageContentPart"
              },
              "minItems": 1
            }
          ],
          "description": "The contents of the tool message."
        },
        "tool_call_id": {
          "type": "string",
          "description": "Tool call that this message is responding to."
        }
      },
      "required": [
        "role",
        "content",
        "tool_call_id"
      ]
    },
    "chatCompletionRequestToolMessageContentPart": {
      "oneOf": [
        {
          "$ref": "#/$defs/chatCompletionRequestMessageContentPartText"
        }
      ]
    },
    "chatCompletionRequestUserMessage": {
      "type": "object",
      "title": "User message",
      "properties": {
        "content": {
          "description": "The contents of the user message.\n",
          "oneOf": [
            {
              "type": "string",
              "description": "The text contents of the message.",
              "title": "Text content"
            },
            {
              "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-4o` model.",
              "title": "Array of content parts",
              "items": {
                "$ref": "#/$defs/chatCompletionRequestUserMessageContentPart"
              },
              "minItems": 1
            }
          ],
          "x-oaiExpandable": true
        },
        "role": {
          "type": "string",
          "enum": [
            "user"
          ],
          "description": "The role of the messages author, in this case `user`."
        },
        "name": {
          "type": "string",
          "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role."
        }
      },
      "required": [
        "content",
        "role"
      ]
    },
    "chatCompletionRequestUserMessageContentPart": {
      "oneOf": [
        {
          "$ref": "#/$defs/chatCompletionRequestMessageContentPartText"
        },
        {
          "$ref": "#/$defs/chatCompletionRequestMessageContentPartImage"
        }
      ]
    },
    "chatCompletionTool": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "function"
          ],
          "description": "The type of the tool. Currently, only `function` is supported."
        },
        "function": {
          "$ref": "#/$defs/FunctionObject"
        }
      },
      "required": [
        "type",
        "function"
      ]
    },
    "chatCompletionToolChoiceOption": {
      "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.",
      "oneOf": [
        {
          "type": "string",
          "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.",
          "enum": [
            "none",
            "auto",
            "required"
          ]
        },
        {
          "$ref": "#/$defs/chatCompletionNamedToolChoice"
        }
      ]
    },
    "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.\nWe generally recommend altering this or `top_p` but not both.",
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 2,
          "default": 1
        },
        "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.\nWe generally recommend altering this or `temperature` but not both.",
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1,
          "default": 1
        },
        "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",
            "null"
          ],
          "default": false
        },
        "stop": {
          "description": "Up to 4 sequences where the API will stop generating further tokens.",
          "oneOf": [
            {
              "type": [
                "string",
                "null"
              ]
            },
            {
              "type": "array",
              "items": {
                "type": "string"
              },
              "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). This value is now deprecated in favor of `max_completion_tokens`, and is not compatible with o1 series models.",
          "type": "integer",
          "default": 4096
        },
        "max_completion_tokens": {
          "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens.",
          "type": [
            "integer",
            "null"
          ]
        },
        "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",
            "null"
          ]
        },
        "user": {
          "description": "A unique identifier representing your end-user, which can help Azure OpenAI to monitor and detect abuse.",
          "type": "string"
        }
      }
    },
    "toolCallType": {
      "type": "string",
      "enum": [
        "function"
      ],
      "description": "The type of the tool call, in this case `function`.",
      "x-ms-enum": {
        "name": "ToolCallType",
        "modelAsString": true,
        "values": [
          {
            "value": "function",
            "description": "The tool call type is function."
          }
        ]
      }
    }
  }
}