{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ChatCompletionMessage",
  "title": "ChatCompletionMessage",
  "description": "A chat completion message generated by the model.",
  "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."
    },
    "role": {
      "type": "string",
      "enum": [
        "assistant"
      ],
      "nullable": false,
      "description": "The role of the author of this message."
    },
    "annotations": {
      "items": {
        "$ref": "#/components/schemas/ChatCompletionMessage.Annotation"
      },
      "type": "array",
      "description": "Annotations for the message, when applicable, as when using the\n[web search tool](https://platform.openai.com/docs/guides/tools-web-search?api-mode=chat)."
    },
    "audio": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ChatCompletionAudio"
        }
      ],
      "nullable": true,
      "description": "If the audio output modality is requested, this object contains data about the\naudio response from the model.\n[Learn more](https://platform.openai.com/docs/guides/audio)."
    },
    "function_call": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ChatCompletionMessage.FunctionCall"
        }
      ],
      "nullable": true,
      "deprecated": true
    },
    "tool_calls": {
      "items": {
        "$ref": "#/components/schemas/ChatCompletionMessageToolCall"
      },
      "type": "array",
      "description": "The tool calls generated by the model, such as function calls."
    }
  },
  "required": [
    "content",
    "refusal",
    "role"
  ],
  "type": "object",
  "additionalProperties": false
}