messagesarray<object>必須会話のターンを古い順に並べた配列です。ロールは system、developer、user、assistant、tool で、system と developer のメッセージはモデルへの指示になります。content は文字列、またはテキストと image_url パートの配列です。ツールの結果は、tool_call_id を付けた tool ロールのメッセージで渡します。
- デフォルト値
- 指定なし
- 制約
- minItems:1
messages[].rolestringオブジェクト内で必須Role of the message author.
- デフォルト値
- 指定なし
- 使用可能な値
"system""developer""user""assistant""tool"
messages[].contentstring | array | null任意Message content, either plain text or a list of content parts.
- デフォルト値
- 指定なし
{
"type": [
"string",
"array",
"null"
],
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"const": "text"
}
}
},
{
"type": "object",
"required": [
"type",
"image_url"
],
"properties": {
"type": {
"const": "image_url"
},
"image_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
}
]
},
"description": "Message content, either plain text or a list of content parts."
}messages[].tool_callsarray<object>任意Tool calls the assistant requested in this message.
- デフォルト値
- 指定なし
messages[].tool_call_idstring任意Identifier of the tool call this message answers. Required on tool messages.
- デフォルト値
- 指定なし
messages[].reasoning_contentstring任意Reasoning text from a previous assistant reply, preserved when continuing a tool conversation.
- デフォルト値
- 指定なし
{
"type": "array",
"x-ui": {
"order": 100,
"widget": "chat-messages",
"primary": true
},
"items": {
"type": "object",
"allOf": [
{
"if": {
"required": [
"reasoning_content"
]
},
"then": {
"properties": {
"role": {
"const": "assistant"
}
}
}
}
],
"required": [
"role"
],
"properties": {
"role": {
"enum": [
"system",
"developer",
"user",
"assistant",
"tool"
],
"type": "string",
"description": "Role of the message author."
},
"content": {
"type": [
"string",
"array",
"null"
],
"items": {
"oneOf": [
{
"type": "object",
"required": [
"type",
"text"
],
"properties": {
"text": {
"type": "string"
},
"type": {
"const": "text"
}
}
},
{
"type": "object",
"required": [
"type",
"image_url"
],
"properties": {
"type": {
"const": "image_url"
},
"image_url": {
"type": "object",
"required": [
"url"
],
"properties": {
"url": {
"type": "string"
}
}
}
}
}
]
},
"description": "Message content, either plain text or a list of content parts."
},
"tool_calls": {
"type": "array",
"items": {
"type": "object"
},
"description": "Tool calls the assistant requested in this message."
},
"tool_call_id": {
"type": "string",
"description": "Identifier of the tool call this message answers. Required on tool messages."
},
"reasoning_content": {
"type": "string",
"description": "Reasoning text from a previous assistant reply, preserved when continuing a tool conversation."
}
},
"additionalProperties": false
},
"minItems": 1,
"description": "Ordered conversation turns. Text and images."
}