Skip to content

Commit c10bfe5

Browse files
improve reference
1 parent 2417ebc commit c10bfe5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

reference/api/chats.mdx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ Create a chat completion using Meilisearch's OpenAI-compatible interface. The en
426426
| Name | Type | Required | Description |
427427
| :------------- | :------ | :------- | :--------------------------------------------------------------------------- |
428428
| **`model`** | String | Yes | Model the agent should use when generating responses |
429-
| **`messages`** | Array | Yes | Array of message objects with `role` and `content` |
429+
| **`messages`** | Array | Yes | Array of [message objects](#message-object) |
430430
| **`stream`** | Boolean | No | Enable streaming responses. Must be `true` if specified |
431431

432432
<Warning>
@@ -440,6 +440,14 @@ Meilisearch chat completions only supports streaming responses (`stream: true`).
440440
| **`role`** | String | Message role: `"system"`, `"user"`, or `"assistant"` |
441441
| **`content`** | String | Message content |
442442

443+
#### `role`
444+
445+
Specifies the message origin: Meilisearch (`system`), the LLM provider (`assistant`), or user input (`user`)
446+
447+
#### `content`
448+
449+
String containing the message content.
450+
443451
### Response
444452

445453
The response follows the OpenAI chat completions format. For streaming responses, the endpoint returns Server-Sent Events (SSE).

0 commit comments

Comments
 (0)