发布日期: 2025-06-11
版本号: v1.15.1

Meilisearch v1.15.1版本引入了实验性对话功能,支持基于LLM的聊天交互。所有官方集成工具(包括SDK、客户端等)均已兼容该版本,新版本发布后集成部署需4至48小时完成。部分SDK可能暂未包含全部新功能,用户可查阅项目仓库获取详情,如需缺失功能可提交Issue或贡献代码。启用实验性聊天功能后,用户可通过配置聊天助手设置(如使用OpenAI API)与索引进行对话,官方提供了配置指南和代码示例以实现流式交互。

更新内容 (中文)

Meilisearch v1.15.1 新增实验性对话功能,并支持 LLM 驱动的聊天特性。

🧰 所有官方 Meilisearch 集成(包括 SDK、客户端及其他工具)均兼容此版本。新版本发布后,集成部署需 4 至 48 小时完成。

部分 SDK 可能未包含所有新功能。请查阅项目仓库获取详细信息。若所选 SDK 缺少所需功能,可通过创建 Issue 告知需求,或提交实现该功能的 PR(我们不胜感激 ❤️)。

与索引对话

启用实验性聊天功能后,可通过相应设置创建聊天工作区。 我们提供指南指导如何为索引配置完善的聊天界面。

curl -X POST 'http://localhost:7700/chats/my-assistant/settings' \
  -H 'Content-Type: application/json' \
  -d '{
    "source": "openAi",
    "apiKey": "sk-abc..."
  }'

通过官方 OpenAI SDK 即可与索引进行对话交互。

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'http://localhost:7700/chats/my-assistant',
  apiKey: 'YOUR_MEILISEARCH_CHAT_API_KEY',
});

const completion = await client.chat.completions.create({
  model: 'gpt-3.5-turbo',
  messages: [{ role: 'user', content: 'What is Meilisearch?' }],
  stream: true,
});

for await (const chunk of completion) {
  console.log(chunk.choices[0]?.delta?.content || '');
}

由 @Kerollmops 在 #5556 中实现。

更新内容 (原始)

Meilisearch v1.15.1 adds new experimental conversational features and enables LLM-driven chat features.

🧰 All official Meilisearch integrations (including SDKs, clients, and other tools) are compatible with this Meilisearch release. Integration deployment takes 4 to 48 hours after a new version becomes available.

Some SDKs might not include all new features. Please look over the project repository for detailed information. Is a feature you need missing from your chosen SDK? Create an issue letting us know you need it, or, for open-source karma points, open a PR implementing it (we’ll love you for that ❤️).

Chat with your indexes

After enabling the experimental chat feature, you can create a chat workspace with the appropriate settings. We have a guide on how to set up a good chat interface for your indexes.

curl -X POST 'http://localhost:7700/chats/my-assistant/settings' \
  -H 'Content-Type: application/json' \
  -d '{
    "source": "openAi",
    "apiKey": "sk-abc..."
  }'

Then by using the official OpenAI SDK you’ll be able to chat with your indexes.

import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'http://localhost:7700/chats/my-assistant',
  apiKey: 'YOUR_MEILISEARCH_CHAT_API_KEY',
});

const completion = await client.chat.completions.create({
  model: 'gpt-3.5-turbo',
  messages: [{ role: 'user', content: 'What is Meilisearch?' }],
  stream: true,
});

for await (const chunk of completion) {
  console.log(chunk.choices[0]?.delta?.content || '');
}

Done by @Kerollmops in #5556.

下载链接