Skip to content

Commit 3b89066

Browse files
fix typo, minor structural changes to reference
1 parent bb15319 commit 3b89066

File tree

3 files changed

+86
-80
lines changed

3 files changed

+86
-80
lines changed

learn/chat/conversational_search.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Meilisearch's chat completions API consolidates RAG creation into a single proce
4747
Follow the [chat completions tutorial](/learn/chat/getting_started_with_chat) for information on how to implement a RAG with Meilisearch.
4848

4949
<Warning>
50-
Conversational search is still in early development. Conversational agents may occasionally hallucinate innacurate and misleading information, so it is important to closely monitor it in production environments.
50+
Conversational search is still in early development. Conversational agents may occasionally hallucinate inaccurate and misleading information, so it is important to closely monitor it in production environments.
5151
</Warning>
5252

5353
### Model Context Protocol (MCP)

learn/chat/getting_started_with_chat.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ curl \
3030
```
3131

3232
<Warning>
33-
Conversational search is still in early development. Conversational agents may occasionally hallucinate innacurate and misleading information, so it is important to closely monitor it in production environments.
33+
Conversational search is still in early development. Conversational agents may occasionally hallucinate inaccurate and misleading information, so it is important to closely monitor it in production environments.
3434
</Warning>
3535

3636
### Find your chat API key

reference/api/chats.mdx

Lines changed: 84 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@ curl \
2222
</Note>
2323

2424
<Warning>
25-
Conversational search is still in early development. Conversational agents may occasionally hallucinate innacurate and misleading information, so it is important to closely monitor it in production environments.
25+
Conversational search is still in early development. Conversational agents may occasionally hallucinate inaccurate and misleading information, so it is important to closely monitor it in production environments.
2626
</Warning>
2727

2828
## Authorization
2929

30-
When implementing conversational search, use an API key with access to both the `search` and `chatCompletions` actions such as the default chat API key. You may also use tenant tokens instead of an API key, provided you generate the tokens with access to the required actions.
30+
When implementing conversational search, use an API key with access to both the `search` and `chatCompletions` actions such as the default chat API key. You may also use tenant tokens instead of an API key, provided you generate the tokens with a key that has access to the required actions.
3131

32-
Chat queries only search indexes its API key can access. The default chat API key has access to all indexes. To limit chat access to specific indexes, you must either create a new key, or [generate a tenant token](/learn/security/generate_tenant_token_sdk) from the default chat API key.
32+
Chat queries only search the indexes its API key can access. The default chat API key has access to all indexes. To limit access, you must either create a new key, or [generate a tenant token](/learn/security/generate_tenant_token_sdk) from the default chat API key.
3333

34-
## Chat workspace object
34+
## Chat workspaces
35+
36+
Workspaces are groups of chat settings tailored towards specific use cases. You must configure at least on workspace to use chat completions.
37+
38+
### Chat workspace object
3539

3640
```json
3741
{
@@ -43,79 +47,6 @@ Chat queries only search indexes its API key can access. The default chat API ke
4347
| :---------- | :----- | :--------------------------------------------------- |
4448
| **`uid`** | String | Unique identifier for the chat completions workspace |
4549

46-
## List chat workspaces
47-
48-
<RouteHighlighter method="GET" path="/chats" />
49-
50-
List all chat workspaces. Results can be paginated by using the `offset` and `limit` query parameters.
51-
52-
### Query parameters
53-
54-
| Query parameter | Description | Default value |
55-
| :-------------- | :----------------------------- | :------------ |
56-
| **`offset`** | Number of workspaces to skip | `0` |
57-
| **`limit`** | Number of workspaces to return | `20` |
58-
59-
### Response
60-
61-
| Name | Type | Description |
62-
| :------------ | :------ | :----------------------------------- |
63-
| **`results`** | Array | An array of [workspaces](#chat-workspace-object) |
64-
| **`offset`** | Integer | Number of workspaces skipped |
65-
| **`limit`** | Integer | Number of workspaces returned |
66-
| **`total`** | Integer | Total number of workspaces |
67-
68-
### Example
69-
70-
```sh
71-
curl \
72-
-X GET 'MEILISEARCH_URL/chats?limit=3'
73-
```
74-
75-
#### Response: `200 Ok`
76-
77-
```json
78-
{
79-
"results": [
80-
{ "uid": "WORKSPACE_1" },
81-
{ "uid": "WORKSPACE_2" },
82-
{ "uid": "WORKSPACE_3" }
83-
],
84-
"offset": 0,
85-
"limit": 20,
86-
"total": 3
87-
}
88-
```
89-
90-
## Get one chat workspace
91-
92-
<RouteHighlighter method="GET" path="/chats/{workspace_uid}" />
93-
94-
Get information about a workspace.
95-
96-
### Path parameters
97-
98-
| Name | Type | Description |
99-
| :---------------- | :----- | :------------------------------------------------------------------------ |
100-
| **`workspace_uid`** * | String | `uid` of the requested index |
101-
102-
### Example
103-
104-
```sh
105-
curl \
106-
-X GET 'MEILISEARCH_URL/chats/WORKSPACE_UID'
107-
```
108-
109-
#### Response: `200 Ok`
110-
111-
```json
112-
{
113-
"uid": "WORKSPACE_UID"
114-
}
115-
```
116-
117-
## Chat workspace settings
118-
11950
### Chat workspace settings object
12051

12152
```json
@@ -188,6 +119,77 @@ The prompts object accepts the following fields:
188119
- `prompts.QParam`: Description of expected user input and the desired output. Example: "Users will ask about Meilisearch. Provide short and direct keyword-style queries."
189120
- `prompts.IndexUidParam`: Instructions describing each index the agent has access to and how to use them. Example: "If user asks about code or API or parameters, use the index called `documentation`."
190121

122+
### List chat workspaces
123+
124+
<RouteHighlighter method="GET" path="/chats" />
125+
126+
List all chat workspaces. Results can be paginated by using the `offset` and `limit` query parameters.
127+
128+
#### Query parameters
129+
130+
| Query parameter | Description | Default value |
131+
| :-------------- | :----------------------------- | :------------ |
132+
| **`offset`** | Number of workspaces to skip | `0` |
133+
| **`limit`** | Number of workspaces to return | `20` |
134+
135+
#### Response
136+
137+
| Name | Type | Description |
138+
| :------------ | :------ | :----------------------------------- |
139+
| **`results`** | Array | An array of [workspaces](#chat-workspace-object) |
140+
| **`offset`** | Integer | Number of workspaces skipped |
141+
| **`limit`** | Integer | Number of workspaces returned |
142+
| **`total`** | Integer | Total number of workspaces |
143+
144+
#### Example
145+
146+
```sh
147+
curl \
148+
-X GET 'MEILISEARCH_URL/chats?limit=3'
149+
```
150+
151+
##### Response: `200 Ok`
152+
153+
```json
154+
{
155+
"results": [
156+
{ "uid": "WORKSPACE_1" },
157+
{ "uid": "WORKSPACE_2" },
158+
{ "uid": "WORKSPACE_3" }
159+
],
160+
"offset": 0,
161+
"limit": 20,
162+
"total": 3
163+
}
164+
```
165+
166+
### Get one chat workspace
167+
168+
<RouteHighlighter method="GET" path="/chats/{workspace_uid}" />
169+
170+
Get information about a workspace.
171+
172+
#### Path parameters
173+
174+
| Name | Type | Description |
175+
| :---------------- | :----- | :------------------------------------------------------------------------ |
176+
| **`workspace_uid`** * | String | `uid` of the requested index |
177+
178+
#### Example
179+
180+
```sh
181+
curl \
182+
-X GET 'MEILISEARCH_URL/chats/WORKSPACE_UID'
183+
```
184+
185+
##### Response: `200 Ok`
186+
187+
```json
188+
{
189+
"uid": "WORKSPACE_UID"
190+
}
191+
```
192+
191193
### Get chat workspace settings
192194

193195
<RouteHighlighter method="GET" path="/chats/{workspace_uid}/settings" />
@@ -398,9 +400,13 @@ curl \
398400

399401
## Chat completions
400402

403+
After creating a workspace, you can use the chat completions API to create a conversational search agent.
404+
405+
### Stream chat completions
406+
401407
<RouteHighlighter method="POST" path="/chats/{workspace_uid}/chat/completions" />
402408

403-
Create a chat completion using Meilisearch's OpenAI-compatible interface. The endpoint searches relevant indexes and generates responses based on the retrieved content.
409+
Create a chat completions stream using Meilisearch's OpenAI-compatible interface. This endpoint searches relevant indexes and generates responses based on the retrieved content.
404410

405411
### Path parameters
406412

0 commit comments

Comments
 (0)