ChatGPT · Schema

ChatCompletionAssistantMessage

AgentsAIChatGPTEmbeddingsFine-TuningGPT-4GPT-5Language ModelOpenAIRealtime

Properties

Name Type Description
role string The role of the message author.
content string The contents of the assistant message.
tool_calls array The tool calls generated by the model.
refusal string The refusal message generated by the model.
View JSON Schema on GitHub

JSON Schema

chatgpt-chatcompletionassistantmessage-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/ChatCompletionAssistantMessage",
  "title": "ChatCompletionAssistantMessage",
  "type": "object",
  "required": [
    "role"
  ],
  "properties": {
    "role": {
      "type": "string",
      "description": "The role of the message author.",
      "enum": [
        "assistant"
      ],
      "example": "assistant"
    },
    "content": {
      "type": "string",
      "description": "The contents of the assistant message.",
      "nullable": true,
      "example": "example_value"
    },
    "tool_calls": {
      "type": "array",
      "description": "The tool calls generated by the model.",
      "items": {
        "$ref": "#/components/schemas/ChatCompletionToolCall"
      },
      "example": []
    },
    "refusal": {
      "type": "string",
      "description": "The refusal message generated by the model.",
      "nullable": true,
      "example": "example_value"
    }
  }
}