mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
chore: meilisearch setup config
This commit is contained in:
parent
73449d9ec6
commit
67161c983f
6 changed files with 17 additions and 12 deletions
|
|
@ -6,13 +6,13 @@ const { MeiliSearch } = require('meilisearch');
|
|||
// eslint-disable-next-line no-unused-vars
|
||||
async function indexSync(req, res, next) {
|
||||
try {
|
||||
if (!process.env.MEILI_HOST || !process.env.MEILI_KEY || !process.env.SEARCH) {
|
||||
if (!process.env.MEILI_HOST || !process.env.MEILI_MASTER_KEY || !process.env.SEARCH) {
|
||||
throw new Error('Meilisearch not configured, search will be disabled.');
|
||||
}
|
||||
|
||||
const client = new MeiliSearch({
|
||||
host: process.env.MEILI_HOST,
|
||||
apiKey: process.env.MEILI_KEY
|
||||
apiKey: process.env.MEILI_MASTER_KEY
|
||||
});
|
||||
|
||||
const { status } = await client.health();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue