@@ -14,8 +14,6 @@ Before starting, ensure you have:
1414- An API key from an LLM provider
1515- At least one index with searchable content
1616
17- , such as OpenAI, Azure Mistral, Gemini, or vLLM server
18-
1917<Warning >
2018You can only use chat completions with [ secured Meilisearch projects] ( /learn/security/basic_security ) .
2119</Warning >
@@ -52,7 +50,7 @@ Each index that you want to be searchable through chat needs specific configurat
5250``` bash
5351curl \
5452 -X PATCH ' http://localhost:7700/indexes/movies/settings' \
55- -H ' Authorization: Bearer MEILISEARCH_API_KEY ' \
53+ -H ' Authorization: Bearer MEILISEARCH_KEY ' \
5654 -H ' Content-Type: application/json' \
5755 --data-binary ' {
5856 "chat": {
@@ -77,7 +75,7 @@ Create a workspace with your LLM provider settings. Here are examples for differ
7775``` bash openAi
7876curl \
7977 -X PUT ' http://localhost:7700/chats/my-assistant/settings' \
80- -H ' Authorization: Bearer MEILISEARCH_API_KEY ' \
78+ -H ' Authorization: Bearer MEILISEARCH_KEY ' \
8179 -H ' Content-Type: application/json' \
8280 --data-binary ' {
8381 "source": "openAi",
9290``` bash azureOpenAi
9391curl \
9492 -X PUT ' http://localhost:7700/chats/my-assistant/settings' \
95- -H ' Authorization: Bearer MEILISEARCH_API_KEY ' \
93+ -H ' Authorization: Bearer MEILISEARCH_KEY ' \
9694 -H ' Content-Type: application/json' \
9795 --data-binary ' {
9896 "source": "azureOpenAi",
@@ -107,7 +105,7 @@ curl \
107105``` bash mistral
108106curl \
109107 -X PUT ' http://localhost:7700/chats/my-assistant/settings' \
110- -H ' Authorization: Bearer MEILISEARCH_API_KEY ' \
108+ -H ' Authorization: Bearer MEILISEARCH_KEY ' \
111109 -H ' Content-Type: application/json' \
112110 --data-binary ' {
113111 "source": "mistral",
@@ -121,7 +119,7 @@ curl \
121119``` bash gemini
122120curl \
123121 -X PUT ' http://localhost:7700/chats/my-assistant/settings' \
124- -H ' Authorization: Bearer MEILISEARCH_API_KEY ' \
122+ -H ' Authorization: Bearer MEILISEARCH_KEY ' \
125123 -H ' Content-Type: application/json' \
126124 --data-binary ' {
127125 "source": "gemini",
@@ -135,7 +133,7 @@ curl \
135133``` bash vLlm
136134curl \
137135 -X PUT ' http://localhost:7700/chats/my-assistant/settings' \
138- -H ' Authorization: Bearer MEILISEARCH_API_KEY ' \
136+ -H ' Authorization: Bearer MEILISEARCH_KEY ' \
139137 -H ' Content-Type: application/json' \
140138 --data-binary ' {
141139 "source": "vLlm",
@@ -339,7 +337,7 @@ except Exception as error:
339337
340338- Use either the master key or the "Default Chat API Key"
341339- Don't use search or admin API keys for chat endpoints
342- - Find your chat key: ` curl http: // localhost:7700/keys -H "Authorization: Bearer MEILISEARCH_API_KEY "`
340+ - Find your chat key: ` curl http: // localhost:7700/keys -H "Authorization: Bearer MEILISEARCH_KEY "`
343341
344342#### " Socket connection closed unexpectedly"
345343
@@ -351,14 +349,14 @@ except Exception as error:
351349
352350 ` ` ` bash
353351 curl http://localhost:7700/chats/my-assistant/settings \
354- -H "Authorization: Bearer MEILISEARCH_API_KEY "
352+ -H "Authorization: Bearer MEILISEARCH_KEY "
355353 ` ` `
356354
3573552. Update with valid API key:
358356
359357 ` ` ` bash
360358 curl -X PUT http://localhost:7700/chats/my-assistant/settings \
361- -H "Authorization: Bearer MEILISEARCH_API_KEY " \
359+ -H "Authorization: Bearer MEILISEARCH_KEY " \
362360 -H "Content-Type: application/json" \
363361 -d '{"apiKey": "your-valid-api-key"}'
364362 ` ` `
0 commit comments