messagesarray<object>필수Perplexity Sonar에 순서대로 전달하는 대화 이력(최대 256개)으로 텍스트와 image_url을 지원합니다.
- 기본값
- 지정되지 않음
- 제약 조건
- minItems:1maxItems:256
messages[].rolestring객체 내 필수Role of the message author.
- 기본값
- 지정되지 않음
- 허용 값
"system""developer""user""assistant"
messages[].namestring선택Optional name identifying the speaker within its role.
- 기본값
- 지정되지 않음
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[].reasoning_contentstring선택Reasoning text from a previous assistant reply, preserved when continuing a 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": {
"name": {
"type": "string",
"description": "Optional name identifying the speaker within its role."
},
"role": {
"enum": [
"system",
"developer",
"user",
"assistant"
],
"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."
},
"reasoning_content": {
"type": "string",
"description": "Reasoning text from a previous assistant reply, preserved when continuing a conversation."
}
},
"additionalProperties": false
},
"maxItems": 256,
"minItems": 1,
"description": "Conversation history in order, oldest message first."
}