mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-30 04:15:45 +08:00
docs: update platform and usage documentation across multiple languagesDingTalk, Discord, and WeCom
This commit is contained in:
+117
-103
@@ -69,7 +69,7 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "部署和使用",
|
||||
text: "部署",
|
||||
items: [
|
||||
{
|
||||
text: "部署 LangBot",
|
||||
@@ -88,10 +88,23 @@ export default defineConfig({
|
||||
{ text: "手动部署", link: "/zh/deploy/langbot/manual" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "系统环境设置",
|
||||
link: "/zh/deploy/settings",
|
||||
},
|
||||
{
|
||||
text: "更新 LangBot",
|
||||
link: "/zh/deploy/update",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "构建机器人",
|
||||
items: [
|
||||
{
|
||||
text: "配置机器人",
|
||||
collapsed: true,
|
||||
link: "/zh/deploy/platforms/readme",
|
||||
link: "/zh/usage/platforms/readme",
|
||||
items: [
|
||||
{
|
||||
text: "OneBot v11",
|
||||
@@ -99,30 +112,29 @@ export default defineConfig({
|
||||
items: [
|
||||
{
|
||||
text: "NapCat",
|
||||
link: "/zh/deploy/platforms/qq/aiocqhttp/napcat",
|
||||
link: "/zh/usage/platforms/qq/aiocqhttp/napcat",
|
||||
},
|
||||
{
|
||||
text: "Lagrange",
|
||||
link: "/zh/deploy/platforms/qq/aiocqhttp/lagrange",
|
||||
link: "/zh/usage/platforms/qq/aiocqhttp/lagrange",
|
||||
},
|
||||
{
|
||||
text: "llonebot",
|
||||
link: "/zh/deploy/platforms/qq/aiocqhttp/llonebot",
|
||||
link: "/zh/usage/platforms/qq/aiocqhttp/llonebot",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "QQ 官方机器人",
|
||||
// link: "/deploy/platforms/qq/official",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "Webhook 方式",
|
||||
link: "/zh/deploy/platforms/qq/official_webhook",
|
||||
link: "/zh/usage/platforms/qq/official_webhook",
|
||||
},
|
||||
{
|
||||
text: "WebSocket 方式",
|
||||
link: "/zh/deploy/platforms/qq/official",
|
||||
link: "/zh/usage/platforms/qq/official",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -132,15 +144,15 @@ export default defineConfig({
|
||||
items: [
|
||||
{
|
||||
text: "内部应用",
|
||||
link: "/zh/deploy/platforms/wecom/wecom",
|
||||
link: "/zh/usage/platforms/wecom/wecom",
|
||||
},
|
||||
{
|
||||
text: "对外客服",
|
||||
link: "/zh/deploy/platforms/wecom/wecomcs",
|
||||
link: "/zh/usage/platforms/wecom/wecomcs",
|
||||
},
|
||||
{
|
||||
text: "智能机器人",
|
||||
link: "/zh/deploy/platforms/wecom/wecombot",
|
||||
link: "/zh/usage/platforms/wecom/wecombot",
|
||||
}
|
||||
],
|
||||
},
|
||||
@@ -150,56 +162,48 @@ export default defineConfig({
|
||||
items: [
|
||||
{
|
||||
text: "WeChatPadPro",
|
||||
link: "/zh/deploy/platforms/wechat/wechatpad.md"
|
||||
link: "/zh/usage/platforms/wechat/wechatpad.md"
|
||||
},
|
||||
],
|
||||
},
|
||||
{ text: "微信公众号", link: "/zh/deploy/platforms/wxoa.md" },
|
||||
{ text: "飞书", link: "/zh/deploy/platforms/lark" },
|
||||
{ text: "钉钉", link: "/zh/deploy/platforms/dingtalk.md" },
|
||||
{ text: "Discord", link: "/zh/deploy/platforms/discord" },
|
||||
{ text: "Telegram", link: "/zh/deploy/platforms/telegram" },
|
||||
{ text: "Slack", link: "/zh/deploy/platforms/slack" },
|
||||
{ text: "LINE", link: "/zh/deploy/platforms/line" },
|
||||
{ text: "KOOK", link: "/zh/deploy/platforms/kook" },
|
||||
{ text: "微信公众号", link: "/zh/usage/platforms/wxoa.md" },
|
||||
{ text: "飞书", link: "/zh/usage/platforms/lark" },
|
||||
{ text: "钉钉", link: "/zh/usage/platforms/dingtalk.md" },
|
||||
{ text: "Discord", link: "/zh/usage/platforms/discord" },
|
||||
{ text: "Telegram", link: "/zh/usage/platforms/telegram" },
|
||||
{ text: "Slack", link: "/zh/usage/platforms/slack" },
|
||||
{ text: "LINE", link: "/zh/usage/platforms/line" },
|
||||
{ text: "KOOK", link: "/zh/usage/platforms/kook" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "配置模型",
|
||||
link: "/zh/deploy/models/readme",
|
||||
link: "/zh/usage/models/readme",
|
||||
},
|
||||
{
|
||||
text: "修改对话流水线",
|
||||
link: "/zh/deploy/pipelines/readme",
|
||||
link: "/zh/usage/pipelines/readme",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Dify", link: "/zh/deploy/pipelines/dify" },
|
||||
{ text: "n8n", link: "/zh/deploy/pipelines/n8n" },
|
||||
{ text: "Langflow", link: "/zh/deploy/pipelines/langflow" },
|
||||
{ text: "TBox", link: "/zh/deploy/pipelines/tbox" },
|
||||
{ text: "Coze", link: "/zh/deploy/pipelines/coze" },
|
||||
{ text: "Dify", link: "/zh/usage/pipelines/dify" },
|
||||
{ text: "n8n", link: "/zh/usage/pipelines/n8n" },
|
||||
{ text: "Langflow", link: "/zh/usage/pipelines/langflow" },
|
||||
{ text: "TBox", link: "/zh/usage/pipelines/tbox" },
|
||||
{ text: "Coze", link: "/zh/usage/pipelines/coze" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "使用知识库",
|
||||
link: "/zh/deploy/knowledge/readme",
|
||||
link: "/zh/usage/knowledge/readme",
|
||||
},
|
||||
{
|
||||
text: "使用 MCP 服务",
|
||||
link: "zh/deploy/mcp/readme"
|
||||
},
|
||||
{
|
||||
text: "系统环境设置",
|
||||
link: "/zh/deploy/settings",
|
||||
link: "/zh/usage/mcp/readme"
|
||||
},
|
||||
{
|
||||
text: "对话命令",
|
||||
link: "/zh/deploy/command",
|
||||
},
|
||||
{
|
||||
text: "更新 LangBot",
|
||||
link: "/zh/deploy/update",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -367,7 +371,7 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Deployment and Usage",
|
||||
text: "Deployment",
|
||||
items: [
|
||||
{
|
||||
text: "Deploy LangBot",
|
||||
@@ -386,33 +390,46 @@ export default defineConfig({
|
||||
{ text: "Manual Deployment", link: "/en/deploy/langbot/manual" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "System Settings",
|
||||
link: "/en/deploy/settings",
|
||||
},
|
||||
{
|
||||
text: "Update LangBot",
|
||||
link: "/en/deploy/update",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Build Your Bot",
|
||||
items: [
|
||||
{
|
||||
text: "Configure Bots",
|
||||
collapsed: true,
|
||||
link: "/en/deploy/platforms/readme",
|
||||
link: "/en/usage/platforms/readme",
|
||||
items: [
|
||||
{ text: "Discord", link: "/en/deploy/platforms/discord" },
|
||||
{ text: "Telegram", link: "/en/deploy/platforms/telegram" },
|
||||
{ text: "Slack", link: "/en/deploy/platforms/slack" },
|
||||
{ text: "LINE", link: "/en/deploy/platforms/line" },
|
||||
{ text: "KOOK", link: "/en/deploy/platforms/kook" },
|
||||
{ text: "Lark", link: "/en/deploy/platforms/lark" },
|
||||
{ text: "DingTalk", link: "/en/deploy/platforms/dingtalk" },
|
||||
{ text: "Discord", link: "/en/usage/platforms/discord" },
|
||||
{ text: "Telegram", link: "/en/usage/platforms/telegram" },
|
||||
{ text: "Slack", link: "/en/usage/platforms/slack" },
|
||||
{ text: "LINE", link: "/en/usage/platforms/line" },
|
||||
{ text: "KOOK", link: "/en/usage/platforms/kook" },
|
||||
{ text: "Lark", link: "/en/usage/platforms/lark" },
|
||||
{ text: "DingTalk", link: "/en/usage/platforms/dingtalk" },
|
||||
{
|
||||
text: "OneBot v11",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "NapCat",
|
||||
link: "/en/deploy/platforms/qq/aiocqhttp/napcat",
|
||||
link: "/en/usage/platforms/qq/aiocqhttp/napcat",
|
||||
},
|
||||
{
|
||||
text: "Lagrange",
|
||||
link: "/en/deploy/platforms/qq/aiocqhttp/lagrange",
|
||||
link: "/en/usage/platforms/qq/aiocqhttp/lagrange",
|
||||
},
|
||||
{
|
||||
text: "llonebot",
|
||||
link: "/en/deploy/platforms/qq/aiocqhttp/llonebot",
|
||||
link: "/en/usage/platforms/qq/aiocqhttp/llonebot",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -422,11 +439,11 @@ export default defineConfig({
|
||||
items: [
|
||||
{
|
||||
text: "Webhook Method",
|
||||
link: "/en/deploy/platforms/qq/official_webhook",
|
||||
link: "/en/usage/platforms/qq/official_webhook",
|
||||
},
|
||||
{
|
||||
text: "WebSocket Method",
|
||||
link: "/en/deploy/platforms/qq/official",
|
||||
link: "/en/usage/platforms/qq/official",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -436,55 +453,47 @@ export default defineConfig({
|
||||
items: [
|
||||
{
|
||||
text: "Internal Application",
|
||||
link: "/en/deploy/platforms/wecom/wecom",
|
||||
link: "/en/usage/platforms/wecom/wecom",
|
||||
},
|
||||
{
|
||||
text: "External Customer Service",
|
||||
link: "/en/deploy/platforms/wecom/wecomcs",
|
||||
link: "/en/usage/platforms/wecom/wecomcs",
|
||||
},
|
||||
{
|
||||
text: "Intelligent Bot",
|
||||
link: "/en/deploy/platforms/wecom/wecombot",
|
||||
link: "/en/usage/platforms/wecom/wecombot",
|
||||
}
|
||||
],
|
||||
},
|
||||
{ text: "WeChat Official Account", link: "/en/deploy/platforms/wxoa" },
|
||||
{ text: "WeChat Official Account", link: "/en/usage/platforms/wxoa" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Configure Models",
|
||||
link: "/en/deploy/models/readme",
|
||||
link: "/en/usage/models/readme",
|
||||
},
|
||||
{
|
||||
text: "Modify Dialogue Pipeline",
|
||||
link: "/en/deploy/pipelines/readme",
|
||||
link: "/en/usage/pipelines/readme",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Dify", link: "/en/deploy/pipelines/dify" },
|
||||
{ text: "n8n", link: "/en/deploy/pipelines/n8n" },
|
||||
{ text: "Langflow", link: "/en/deploy/pipelines/langflow" },
|
||||
{ text: "Dify", link: "/en/usage/pipelines/dify" },
|
||||
{ text: "n8n", link: "/en/usage/pipelines/n8n" },
|
||||
{ text: "Langflow", link: "/en/usage/pipelines/langflow" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "Using Knowledge Base",
|
||||
link: "/en/deploy/knowledge/readme",
|
||||
link: "/en/usage/knowledge/readme",
|
||||
},
|
||||
{
|
||||
text: "Using MCP Services",
|
||||
link: "/en/deploy/mcp/readme",
|
||||
},
|
||||
{
|
||||
text: "System Settings",
|
||||
link: "/en/deploy/settings",
|
||||
link: "/en/usage/mcp/readme",
|
||||
},
|
||||
{
|
||||
text: "Dialogue Commands",
|
||||
link: "/en/deploy/command",
|
||||
},
|
||||
{
|
||||
text: "Update LangBot",
|
||||
link: "/en/deploy/update",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -628,7 +637,7 @@ export default defineConfig({
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "デプロイと使用方法",
|
||||
text: "デプロイ",
|
||||
items: [
|
||||
{
|
||||
text: "LangBot をデプロイ",
|
||||
@@ -647,33 +656,46 @@ export default defineConfig({
|
||||
{ text: "手動デプロイ", link: "/ja/deploy/langbot/manual" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "システム設定",
|
||||
link: "/ja/deploy/settings",
|
||||
},
|
||||
{
|
||||
text: "LangBot を更新",
|
||||
link: "/ja/deploy/update",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "ボットを構築",
|
||||
items: [
|
||||
{
|
||||
text: "ボットを設定",
|
||||
collapsed: true,
|
||||
link: "/ja/deploy/platforms/readme",
|
||||
link: "/ja/usage/platforms/readme",
|
||||
items: [
|
||||
{ text: "Discord", link: "/ja/deploy/platforms/discord" },
|
||||
{ text: "Telegram", link: "/ja/deploy/platforms/telegram" },
|
||||
{ text: "Slack", link: "/ja/deploy/platforms/slack" },
|
||||
{ text: "LINE", link: "/ja/deploy/platforms/line" },
|
||||
{ text: "KOOK", link: "/ja/deploy/platforms/kook" },
|
||||
{ text: "Lark", link: "/ja/deploy/platforms/lark" },
|
||||
{ text: "DingTalk", link: "/ja/deploy/platforms/dingtalk" },
|
||||
{ text: "Discord", link: "/ja/usage/platforms/discord" },
|
||||
{ text: "Telegram", link: "/ja/usage/platforms/telegram" },
|
||||
{ text: "Slack", link: "/ja/usage/platforms/slack" },
|
||||
{ text: "LINE", link: "/ja/usage/platforms/line" },
|
||||
{ text: "KOOK", link: "/ja/usage/platforms/kook" },
|
||||
{ text: "Lark", link: "/ja/usage/platforms/lark" },
|
||||
{ text: "DingTalk", link: "/ja/usage/platforms/dingtalk" },
|
||||
{
|
||||
text: "OneBot v11",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{
|
||||
text: "NapCat",
|
||||
link: "/ja/deploy/platforms/qq/aiocqhttp/napcat",
|
||||
link: "/ja/usage/platforms/qq/aiocqhttp/napcat",
|
||||
},
|
||||
{
|
||||
text: "Lagrange",
|
||||
link: "/ja/deploy/platforms/qq/aiocqhttp/lagrange",
|
||||
link: "/ja/usage/platforms/qq/aiocqhttp/lagrange",
|
||||
},
|
||||
{
|
||||
text: "llonebot",
|
||||
link: "/ja/deploy/platforms/qq/aiocqhttp/llonebot",
|
||||
link: "/ja/usage/platforms/qq/aiocqhttp/llonebot",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -683,11 +705,11 @@ export default defineConfig({
|
||||
items: [
|
||||
{
|
||||
text: "Webhook 方式",
|
||||
link: "/ja/deploy/platforms/qq/official_webhook",
|
||||
link: "/ja/usage/platforms/qq/official_webhook",
|
||||
},
|
||||
{
|
||||
text: "WebSocket 方式",
|
||||
link: "/ja/deploy/platforms/qq/official",
|
||||
link: "/ja/usage/platforms/qq/official",
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -697,55 +719,47 @@ export default defineConfig({
|
||||
items: [
|
||||
{
|
||||
text: "内部アプリケーション",
|
||||
link: "/ja/deploy/platforms/wecom/wecom",
|
||||
link: "/ja/usage/platforms/wecom/wecom",
|
||||
},
|
||||
{
|
||||
text: "外部カスタマーサービス",
|
||||
link: "/ja/deploy/platforms/wecom/wecomcs",
|
||||
link: "/ja/usage/platforms/wecom/wecomcs",
|
||||
},
|
||||
{
|
||||
text: "インテリジェントボット",
|
||||
link: "/ja/deploy/platforms/wecom/wecombot",
|
||||
link: "/ja/usage/platforms/wecom/wecombot",
|
||||
}
|
||||
],
|
||||
},
|
||||
{ text: "WeChat 公式アカウント", link: "/ja/deploy/platforms/wxoa" },
|
||||
{ text: "WeChat 公式アカウント", link: "/ja/usage/platforms/wxoa" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "モデルを設定",
|
||||
link: "/ja/deploy/models/readme",
|
||||
link: "/ja/usage/models/readme",
|
||||
},
|
||||
{
|
||||
text: "対話パイプラインを変更",
|
||||
link: "/ja/deploy/pipelines/readme",
|
||||
link: "/ja/usage/pipelines/readme",
|
||||
collapsed: true,
|
||||
items: [
|
||||
{ text: "Dify", link: "/ja/deploy/pipelines/dify" },
|
||||
{ text: "n8n", link: "/ja/deploy/pipelines/n8n" },
|
||||
{ text: "Langflow", link: "/ja/deploy/pipelines/langflow" },
|
||||
{ text: "Dify", link: "/ja/usage/pipelines/dify" },
|
||||
{ text: "n8n", link: "/ja/usage/pipelines/n8n" },
|
||||
{ text: "Langflow", link: "/ja/usage/pipelines/langflow" },
|
||||
],
|
||||
},
|
||||
{
|
||||
text: "ナレッジベースを使用",
|
||||
link: "/ja/deploy/knowledge/readme",
|
||||
link: "/ja/usage/knowledge/readme",
|
||||
},
|
||||
{
|
||||
text: "MCP サービスを使用",
|
||||
link: "/ja/deploy/mcp/readme",
|
||||
},
|
||||
{
|
||||
text: "システム設定",
|
||||
link: "/ja/deploy/settings",
|
||||
link: "/ja/usage/mcp/readme",
|
||||
},
|
||||
{
|
||||
text: "対話コマンド",
|
||||
link: "/ja/deploy/command",
|
||||
},
|
||||
{
|
||||
text: "LangBot を更新",
|
||||
link: "/ja/deploy/update",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,34 +1,3 @@
|
||||
# Using the Knowledge Base
|
||||
|
||||
LangBot natively supports RAG (Retrieval-Augmented Generation). You can create a built-in knowledge base and bind it to a pipeline, allowing the pipeline to answer questions based on the contents of the knowledge base. LangBot also supports connecting to external knowledge retrieval services (e.g., Dify, RAGFlow).
|
||||
|
||||
## Build a Built-in Knowledge Base
|
||||
|
||||
:::info
|
||||
- Creating and using a built-in knowledge base requires configuring an embedding model first. Please read [Configure Models](/en/deploy/models/readme).
|
||||
:::
|
||||
|
||||
On the knowledge base page, click the `Create Knowledge Base` button, fill in the name, select an already configured embedding model, then click `Create`.
|
||||
After creation, go to the "Documents" tab of your knowledge base and upload documents. LangBot will automatically parse and index these in the background.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/upload_docs.png" alt="create_kb" />
|
||||
|
||||
## Connect External Knowledge Base
|
||||
|
||||
On the knowledge base page, switch to the "External Knowledge Base" tab and add an external retriever. In the dialog, select the knowledge retriever plugin to use (please install the related plugin in Plugin Management first). Supported retrievers can be found in the [Plugin Marketplace](https://space.langbot.app/market?category=KnowledgeRetriever).
|
||||
|
||||
## Use the Knowledge Base
|
||||
|
||||
Go to your pipeline configuration, under the "AI" tab, choose `Local Agent` as the runner, then select the knowledge base you just created.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_local_agent.png" alt="use_kb" />
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
:::info
|
||||
LangBot's built-in knowledge base can be used only when the runner is set to `Local Agent`. For other runners, refer to their documentation.
|
||||
:::
|
||||
|
||||
Now you can use the knowledge base in `Chat Debug`, or through the bot linked to this pipeline:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb_in_chat.png" alt="use_kb_in_chat" />
|
||||
<script setup>
|
||||
window.location.href = '/en/usage/knowledge/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,47 +1,3 @@
|
||||
# Configure Models (Models)
|
||||
|
||||
## LLM Model
|
||||
|
||||
Models will be used by pipelines to process messages. The first model you configure will be set as the model for the default pipeline.
|
||||
|
||||

|
||||
|
||||
You can add multiple models, and then select which model to use in the pipeline.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/model_config.png" alt="model_config" />
|
||||
|
||||
Enter these four parameters: `Model Name`, `Model Provider`, `Request URL`, and `API Key`, then submit.
|
||||
|
||||
For model capabilities, please choose according to the specific model characteristics:
|
||||
|
||||
- Visual Capability: Needs to be enabled to recognize images
|
||||
|
||||
- Function Calling: Needs to be enabled to use Agent tools in conversations
|
||||
|
||||
:::info
|
||||
|
||||
*If you don't have an API Key, you can [get one from this relay station](https://api.qhaigc.net/)*
|
||||
|
||||
If you need to use third-party API relays or other model providers,
|
||||
|
||||
Select `OpenAI`
|
||||
|
||||
Fill in the relay's Base URL for the Request URL, for example:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/other_provider.png" alt="other_provider" />
|
||||
|
||||
:::
|
||||
|
||||
## Embedding Model
|
||||
|
||||
Embedding models are used to compute vector representations of messages. If you need to use knowledge bases, please configure this model.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/embedding_model.png" alt="embedding_model" />
|
||||
|
||||
Enter these four parameters: `Model Name`, `Model Provider`, `Request URL`, and `API Key`, then submit. After that, please configure the knowledge base to use this model.
|
||||
|
||||
### Using seekdb Built-in Embedding Model (Zero Configuration)
|
||||
The system has integrated the official embedding model provided by seekdb, no parameters required.
|
||||
- On the "Embedding Model" page, select "seekdb-built-in";
|
||||
- Click "Save" to use it immediately;
|
||||
- Then select this model in your knowledge base to take effect.
|
||||
<script setup>
|
||||
window.location.href = '/en/usage/models/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,53 +1,3 @@
|
||||
# Modify Dialogue Pipeline Configuration (Pipelines)
|
||||
|
||||
The pipeline controls the processing flow after receiving a message, as well as the information exchange with the large language model. Each bot can be bound to one pipeline, and the same pipeline can be bound to multiple bots.
|
||||
|
||||
LangBot automatically creates a default pipeline when first started. When creating a bot, it is automatically bound to the default pipeline. When creating the first model, it is automatically set as the model for the default pipeline.
|
||||
|
||||

|
||||
|
||||
You can create multiple pipelines for different bots to adapt to different scenarios.
|
||||
|
||||
|
||||
|
||||
The current pipeline can be configured with the following features:
|
||||
|
||||
## AI Capabilities
|
||||
|
||||
You can choose to use: `Built-in Agent`, [`Dify`](https://dify.ai/), [`n8n`](https://n8n.io/)
|
||||
|
||||
AI capabilities are mainly divided into two parts: selecting the runner and configuring runner parameters.
|
||||
|
||||
The runner defines how to schedule the large model to process messages. The default is `Built-in Agent`, which is a multi-round Agent strategy implemented by LangBot. Only when this runner is selected will the models and tools configured internally in LangBot be used.
|
||||
|
||||
*<!--  -->*
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/edit_pipeline_ai.png" alt="edit_pipeline" />
|
||||
|
||||
You can also choose to use external LLMOps platforms such as `Dify`, [`n8n`](https://n8n.io/). In this case, the models, prompts, tools, and other resources used will be provided by the LLMOps platform.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/more_runner.png" alt="more_runner" />
|
||||
|
||||
- For detailed steps on connecting to Dify, you can [refer to the tutorial](/en/deploy/pipelines/dify.html).
|
||||
- For detailed steps on connecting to n8n, you can [refer to the tutorial](/en/deploy/pipelines/n8n.html).
|
||||
|
||||
### Conversation Variables
|
||||
When using external LLMOps platforms, LangBot explicitly passes the following parameters, which you can add to the start node of the LLMOps platform workflow (the image below is an example of Dify):
|
||||
|
||||
- `launcher_type`: Launcher object type, `person` for private chat, `group` for group chat
|
||||
- `launcher_id`: Launcher object ID, user ID for private chat, group ID for group chat
|
||||
- `sender_id`: Sender ID
|
||||
- `user_message_text`: The plain text of the user message
|
||||
- `session_id`: User session ID, `person_<id>` for private chat, `group_<id>` for group chat
|
||||
- `conversation_id`: String, user session ID, generated by LangBot. It will be regenerated after the user resets the session
|
||||
- `msg_create_time`: Numeric type, timestamp (seconds) when this message was received
|
||||
- `group_name`: Group name, only set when receiving group messages
|
||||
- `sender_name`: Sender name
|
||||
|
||||
You can [customize any variable through plugins](/en/plugin/dev/apis/common.html#set-request-variables).
|
||||
|
||||

|
||||
|
||||
## Other Configurations
|
||||
|
||||
Please refer to the descriptions in the configuration form.
|
||||
<script setup>
|
||||
window.location.href = '/en/usage/pipelines/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,22 +1,3 @@
|
||||
# Configure Bots (Bots)
|
||||
|
||||
Bots are used to receive message events from messaging platforms and call pipelines to process messages.
|
||||
|
||||

|
||||
|
||||
|
||||
| Platform | Status | Notes | Tutorial |
|
||||
| ------ | ---- | ---- | ---- |
|
||||
| Discord | ✅ | | [Tutorial](/en/deploy/platforms/discord) |
|
||||
| Telegram | ✅ | | [Tutorial](/en/deploy/platforms/telegram) |
|
||||
| Slack | ✅ | | [Tutorial](/en/deploy/platforms/slack) |
|
||||
| LINE | ✅ | | [Tutorial](/en/deploy/platforms/line) |
|
||||
| KOOK | ✅ | | [Tutorial](/en/deploy/platforms/kook) |
|
||||
| Lark | ✅ | | [Tutorial](/en/deploy/platforms/lark) |
|
||||
| DingTalk | ✅ | | [Tutorial](/en/deploy/platforms/dingtalk) |
|
||||
| WeCom (Enterprise WeChat) | ✅ | Enterprise internal bot | [Tutorial](/en/deploy/platforms/wecom/wecom) |
|
||||
| WeCom Intelligent Bot | ✅ | wecom intelligent bot | [Tutorial](/en/deploy/platforms/wecom/wecombot) |
|
||||
| WeCom Customer Service | ✅ | Enterprise external bot | [Tutorial](/en/deploy/platforms/wecom/wecomcs) |
|
||||
| WeChat Official Account | ✅ | WeChat public platform bot | [Tutorial](/en/deploy/platforms/wxoa) |
|
||||
| OneBot v11 | ✅ | Uses a personal QQ account as a bot, requires an independent protocol client, supports OneBot v11 | [NapCat](/en/deploy/platforms/qq/aiocqhttp/napcat) <br> [Lagrange](/en/deploy/platforms/qq/aiocqhttp/lagrange) <br> [LiteLoaderQQNT](/en/deploy/platforms/qq/aiocqhttp/llonebot) |
|
||||
| QQ Official Bot | ✅ | Connects to the QQ Open Platform bot API | [Tutorial](/en/deploy/platforms/qq/official_webhook) |
|
||||
<script setup>
|
||||
window.location.href = '/en/usage/platforms/readme'
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# Using the Knowledge Base
|
||||
|
||||
LangBot natively supports RAG (Retrieval-Augmented Generation). You can create a built-in knowledge base and bind it to a pipeline, allowing the pipeline to answer questions based on the contents of the knowledge base. LangBot also supports connecting to external knowledge retrieval services (e.g., Dify, RAGFlow).
|
||||
|
||||
## Build a Built-in Knowledge Base
|
||||
|
||||
:::info
|
||||
- Creating and using a built-in knowledge base requires configuring an embedding model first. Please read [Configure Models](/en/usage/models/readme).
|
||||
:::
|
||||
|
||||
On the knowledge base page, click the `Create Knowledge Base` button, fill in the name, select an already configured embedding model, then click `Create`.
|
||||
After creation, go to the "Documents" tab of your knowledge base and upload documents. LangBot will automatically parse and index these in the background.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/upload_docs.png" alt="create_kb" />
|
||||
|
||||
## Connect External Knowledge Base
|
||||
|
||||
On the knowledge base page, switch to the "External Knowledge Base" tab and add an external retriever. In the dialog, select the knowledge retriever plugin to use (please install the related plugin in Plugin Management first). Supported retrievers can be found in the [Plugin Marketplace](https://space.langbot.app/market?category=KnowledgeRetriever).
|
||||
|
||||
## Use the Knowledge Base
|
||||
|
||||
Go to your pipeline configuration, under the "AI" tab, choose `Local Agent` as the runner, then select the knowledge base you just created.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_local_agent.png" alt="use_kb" />
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
:::info
|
||||
LangBot's built-in knowledge base can be used only when the runner is set to `Local Agent`. For other runners, refer to their documentation.
|
||||
:::
|
||||
|
||||
Now you can use the knowledge base in `Chat Debug`, or through the bot linked to this pipeline:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb_in_chat.png" alt="use_kb_in_chat" />
|
||||
@@ -0,0 +1,47 @@
|
||||
# Configure Models (Models)
|
||||
|
||||
## LLM Model
|
||||
|
||||
Models will be used by pipelines to process messages. The first model you configure will be set as the model for the default pipeline.
|
||||
|
||||

|
||||
|
||||
You can add multiple models, and then select which model to use in the pipeline.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/model_config.png" alt="model_config" />
|
||||
|
||||
Enter these four parameters: `Model Name`, `Model Provider`, `Request URL`, and `API Key`, then submit.
|
||||
|
||||
For model capabilities, please choose according to the specific model characteristics:
|
||||
|
||||
- Visual Capability: Needs to be enabled to recognize images
|
||||
|
||||
- Function Calling: Needs to be enabled to use Agent tools in conversations
|
||||
|
||||
:::info
|
||||
|
||||
*If you don't have an API Key, you can [get one from this relay station](https://api.qhaigc.net/)*
|
||||
|
||||
If you need to use third-party API relays or other model providers,
|
||||
|
||||
Select `OpenAI`
|
||||
|
||||
Fill in the relay's Base URL for the Request URL, for example:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/other_provider.png" alt="other_provider" />
|
||||
|
||||
:::
|
||||
|
||||
## Embedding Model
|
||||
|
||||
Embedding models are used to compute vector representations of messages. If you need to use knowledge bases, please configure this model.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/embedding_model.png" alt="embedding_model" />
|
||||
|
||||
Enter these four parameters: `Model Name`, `Model Provider`, `Request URL`, and `API Key`, then submit. After that, please configure the knowledge base to use this model.
|
||||
|
||||
### Using seekdb Built-in Embedding Model (Zero Configuration)
|
||||
The system has integrated the official embedding model provided by seekdb, no parameters required.
|
||||
- On the "Embedding Model" page, select "seekdb-built-in";
|
||||
- Click "Save" to use it immediately;
|
||||
- Then select this model in your knowledge base to take effect.
|
||||
@@ -46,4 +46,4 @@ Once completed, you can invoke the Coze agent within this pipeline for dialogue
|
||||
- **Save fails or invocation returns an error**: Please verify that the token and bot_id are correct and do not contain extra spaces
|
||||
- **Unable to select `Coze API`**: Please confirm whether the current version supports this runner. If not yet supported, please upgrade to a version that includes the Coze runner
|
||||
|
||||
For more general pipeline configuration instructions, please refer to [Modifying Dialogue Pipeline Configuration](/en/deploy/pipelines/readme)
|
||||
For more general pipeline configuration instructions, please refer to [Modifying Dialogue Pipeline Configuration](/en/usage/pipelines/readme)
|
||||
@@ -0,0 +1,53 @@
|
||||
# Modify Dialogue Pipeline Configuration (Pipelines)
|
||||
|
||||
The pipeline controls the processing flow after receiving a message, as well as the information exchange with the large language model. Each bot can be bound to one pipeline, and the same pipeline can be bound to multiple bots.
|
||||
|
||||
LangBot automatically creates a default pipeline when first started. When creating a bot, it is automatically bound to the default pipeline. When creating the first model, it is automatically set as the model for the default pipeline.
|
||||
|
||||

|
||||
|
||||
You can create multiple pipelines for different bots to adapt to different scenarios.
|
||||
|
||||
|
||||
|
||||
The current pipeline can be configured with the following features:
|
||||
|
||||
## AI Capabilities
|
||||
|
||||
You can choose to use: `Built-in Agent`, [`Dify`](https://dify.ai/), [`n8n`](https://n8n.io/)
|
||||
|
||||
AI capabilities are mainly divided into two parts: selecting the runner and configuring runner parameters.
|
||||
|
||||
The runner defines how to schedule the large model to process messages. The default is `Built-in Agent`, which is a multi-round Agent strategy implemented by LangBot. Only when this runner is selected will the models and tools configured internally in LangBot be used.
|
||||
|
||||
*<!--  -->*
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/edit_pipeline_ai.png" alt="edit_pipeline" />
|
||||
|
||||
You can also choose to use external LLMOps platforms such as `Dify`, [`n8n`](https://n8n.io/). In this case, the models, prompts, tools, and other resources used will be provided by the LLMOps platform.
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/more_runner.png" alt="more_runner" />
|
||||
|
||||
- For detailed steps on connecting to Dify, you can [refer to the tutorial](/en/usage/pipelines/dify.html).
|
||||
- For detailed steps on connecting to n8n, you can [refer to the tutorial](/en/usage/pipelines/n8n.html).
|
||||
|
||||
### Conversation Variables
|
||||
When using external LLMOps platforms, LangBot explicitly passes the following parameters, which you can add to the start node of the LLMOps platform workflow (the image below is an example of Dify):
|
||||
|
||||
- `launcher_type`: Launcher object type, `person` for private chat, `group` for group chat
|
||||
- `launcher_id`: Launcher object ID, user ID for private chat, group ID for group chat
|
||||
- `sender_id`: Sender ID
|
||||
- `user_message_text`: The plain text of the user message
|
||||
- `session_id`: User session ID, `person_<id>` for private chat, `group_<id>` for group chat
|
||||
- `conversation_id`: String, user session ID, generated by LangBot. It will be regenerated after the user resets the session
|
||||
- `msg_create_time`: Numeric type, timestamp (seconds) when this message was received
|
||||
- `group_name`: Group name, only set when receiving group messages
|
||||
- `sender_name`: Sender name
|
||||
|
||||
You can [customize any variable through plugins](/en/plugin/dev/apis/common.html#set-request-variables).
|
||||
|
||||

|
||||
|
||||
## Other Configurations
|
||||
|
||||
Please refer to the descriptions in the configuration form.
|
||||
@@ -0,0 +1,22 @@
|
||||
# Configure Bots (Bots)
|
||||
|
||||
Bots are used to receive message events from messaging platforms and call pipelines to process messages.
|
||||
|
||||

|
||||
|
||||
|
||||
| Platform | Status | Notes | Tutorial |
|
||||
| ------ | ---- | ---- | ---- |
|
||||
| Discord | ✅ | | [Tutorial](/en/usage/platforms/discord) |
|
||||
| Telegram | ✅ | | [Tutorial](/en/usage/platforms/telegram) |
|
||||
| Slack | ✅ | | [Tutorial](/en/usage/platforms/slack) |
|
||||
| LINE | ✅ | | [Tutorial](/en/usage/platforms/line) |
|
||||
| KOOK | ✅ | | [Tutorial](/en/usage/platforms/kook) |
|
||||
| Lark | ✅ | | [Tutorial](/en/usage/platforms/lark) |
|
||||
| DingTalk | ✅ | | [Tutorial](/en/usage/platforms/dingtalk) |
|
||||
| WeCom (Enterprise WeChat) | ✅ | Enterprise internal bot | [Tutorial](/en/usage/platforms/wecom/wecom) |
|
||||
| WeCom Intelligent Bot | ✅ | wecom intelligent bot | [Tutorial](/en/usage/platforms/wecom/wecombot) |
|
||||
| WeCom Customer Service | ✅ | Enterprise external bot | [Tutorial](/en/usage/platforms/wecom/wecomcs) |
|
||||
| WeChat Official Account | ✅ | WeChat public platform bot | [Tutorial](/en/usage/platforms/wxoa) |
|
||||
| OneBot v11 | ✅ | Uses a personal QQ account as a bot, requires an independent protocol client, supports OneBot v11 | [NapCat](/en/usage/platforms/qq/aiocqhttp/napcat) <br> [Lagrange](/en/usage/platforms/qq/aiocqhttp/lagrange) <br> [LiteLoaderQQNT](/en/usage/platforms/qq/aiocqhttp/llonebot) |
|
||||
| QQ Official Bot | ✅ | Connects to the QQ Open Platform bot API | [Tutorial](/en/usage/platforms/qq/official_webhook) |
|
||||
@@ -1,34 +1,3 @@
|
||||
# ナレッジベースの使用
|
||||
|
||||
LangBotはRAG(Retrieval-Augmented Generation)をネイティブサポートしています。組み込みナレッジベースを作成してパイプラインにバインドすることで、ナレッジベースの内容に基づいて質問に答えることができます。LangBotは外部のナレッジ検索サービス(例: Dify、RAGFlow)への接続もサポートしています。
|
||||
|
||||
## 組み込みナレッジベースの構築
|
||||
|
||||
:::info
|
||||
- 組み込みナレッジベースの作成と使用には、まず埋め込みモデルの設定が必要です。[モデルの設定](/en/deploy/models/readme)をお読みください。
|
||||
:::
|
||||
|
||||
ナレッジベースページで`ナレッジベースを作成`ボタンをクリックし、名前を入力し、既に設定済みの埋め込みモデルを選択してから`作成`をクリックします。
|
||||
作成後、ナレッジベースの「ドキュメント」タブに移動してドキュメントをアップロードします。LangBotはバックグラウンドで自動的に解析とインデックス化を行います。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/upload_docs.png" alt="create_kb" />
|
||||
|
||||
## 外部ナレッジベースの接続
|
||||
|
||||
ナレッジベースページで「外部ナレッジベース」タブに切り替え、外部リトリーバーを追加します。ダイアログで使用するナレッジリトリーバープラグインを選択します(関連プラグインをプラグイン管理で事前にインストールしてください)。サポートされているリトリーバーは[プラグインマーケットプレイス](https://space.langbot.app/market?category=KnowledgeRetriever)で確認できます。
|
||||
|
||||
## ナレッジベースの使用
|
||||
|
||||
パイプライン設定に移動し、「AI」タブで`Local Agent`をランナーとして選択してから、先ほど作成したナレッジベースを選択します。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_local_agent.png" alt="use_kb" />
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
:::info
|
||||
LangBotの組み込みナレッジベースは、ランナーが`Local Agent`に設定されている場合にのみ使用できます。他のランナーについては、それぞれのドキュメントを参照してください。
|
||||
:::
|
||||
|
||||
これで`チャットデバッグ`でナレッジベースを使用したり、このパイプラインにリンクされたボットを通じて使用できます:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb_in_chat.png" alt="use_kb_in_chat" />
|
||||
<script setup>
|
||||
window.location.href = '/ja/usage/knowledge/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,47 +1,3 @@
|
||||
# モデルの設定(Models)
|
||||
|
||||
## 対話モデル (LLM Model)
|
||||
|
||||
モデルはパイプラインによってメッセージ処理に使用されます。最初に設定したモデルがデフォルトパイプラインのモデルとして設定されます。
|
||||
|
||||

|
||||
|
||||
複数のモデルを追加して、パイプラインでどのモデルを使用するかを選択できます。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/model_config.png" alt="model_config" />
|
||||
|
||||
これら4つのパラメータを入力します: `モデル名`、`モデルプロバイダー`、`リクエストURL`、`APIキー`、そして送信します。
|
||||
|
||||
モデルの機能については、特定のモデルの特性に応じて選択してください:
|
||||
|
||||
- ビジュアル機能: 画像を認識するために有効にする必要があります
|
||||
|
||||
- Function Calling: 会話でAgentツールを使用するために有効にする必要があります
|
||||
|
||||
:::info
|
||||
|
||||
*APIキーをお持ちでない場合は、[このリレーステーションから入手できます](https://api.qhaigc.net/)*
|
||||
|
||||
サードパーティのAPIリレーや他のモデルプロバイダーを使用する必要がある場合、
|
||||
|
||||
`OpenAI`を選択してください
|
||||
|
||||
リクエストURLにリレーのBase URLを入力します。例:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/other_provider.png" alt="other_provider" />
|
||||
|
||||
:::
|
||||
|
||||
## 埋め込みモデル (Embedding Model)
|
||||
|
||||
埋め込みモデルはメッセージのベクトル表現を計算するために使用されます。ナレッジベースを使用する場合は、このモデルを設定してください。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/embedding_model.png" alt="embedding_model" />
|
||||
|
||||
これら4つのパラメータを入力します: `モデル名`、`モデルプロバイダー`、`リクエストURL`、`APIキー`、そして送信します。その後、ナレッジベースでこのモデルを使用するように設定してください。
|
||||
|
||||
### seekdb内蔵埋め込みモデルの使用(ゼロ設定)
|
||||
システムにはseekdbが提供する公式埋め込みモデルが統合されており、パラメータの入力は不要です。
|
||||
- 「埋め込みモデル」ページで「seekdb-内蔵」を選択します;
|
||||
- 「保存」をクリックするとすぐに使用できます;
|
||||
- その後、ナレッジベースでこのモデルを選択すると有効になります。
|
||||
<script setup>
|
||||
window.location.href = '/ja/usage/models/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,53 +1,3 @@
|
||||
# 対話パイプライン設定の変更(Pipelines)
|
||||
|
||||
パイプラインは、メッセージを受信した後の処理フローと、大規模言語モデルとの情報交換を制御します。各ボットは1つのパイプラインにバインドでき、同じパイプラインは複数のボットにバインドできます。
|
||||
|
||||
LangBotは最初の起動時にデフォルトパイプラインを自動的に作成します。ボットを作成すると、自動的にデフォルトパイプラインにバインドされます。最初のモデルを作成すると、自動的にデフォルトパイプラインのモデルとして設定されます。
|
||||
|
||||

|
||||
|
||||
異なるシナリオに適応するために、異なるボット用に複数のパイプラインを作成できます。
|
||||
|
||||
|
||||
|
||||
現在、パイプラインでは以下の機能を設定できます:
|
||||
|
||||
## AI機能
|
||||
|
||||
以下を選択して使用できます: `組み込みエージェント`、[`Dify`](https://dify.ai/)、[`n8n`](https://n8n.io/)
|
||||
|
||||
AI機能は主に2つの部分に分かれています: ランナーの選択とランナーパラメータの設定。
|
||||
|
||||
ランナーは、メッセージを処理するために大規模モデルをスケジュールする方法を定義します。デフォルトは`組み込みエージェント`で、これはLangBotによって実装された複数ラウンドのエージェント戦略です。このランナーが選択されている場合のみ、LangBot内で設定されたモデルとツールが使用されます。
|
||||
|
||||
*<!--  -->*
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/edit_pipeline_ai.png" alt="edit_pipeline" />
|
||||
|
||||
`Dify`、[`n8n`](https://n8n.io/)などの外部LLMOpsプラットフォームを使用することもできます。この場合、使用されるモデル、プロンプト、ツール、その他のリソースはLLMOpsプラットフォームによって提供されます。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/more_runner.png" alt="more_runner" />
|
||||
|
||||
- Difyへの接続の詳細手順は、[チュートリアルを参照](/en/deploy/pipelines/dify.html)してください。
|
||||
- n8nへの接続の詳細手順は、[チュートリアルを参照](/en/deploy/pipelines/n8n.html)してください。
|
||||
|
||||
### 会話変数
|
||||
外部LLMOpsプラットフォームを使用する場合、LangBotは以下のパラメータを明示的に渡します。これらをLLMOpsプラットフォームワークフローの開始ノードに追加できます(以下の画像はDifyの例です):
|
||||
|
||||
- `launcher_type`: ランチャーオブジェクトタイプ、プライベートチャットの場合は`person`、グループチャットの場合は`group`
|
||||
- `launcher_id`: ランチャーオブジェクトID、プライベートチャットの場合はユーザーID、グループチャットの場合はグループID
|
||||
- `sender_id`: 送信者ID
|
||||
- `user_message_text`: ユーザーメッセージのプレーンテキスト
|
||||
- `session_id`: ユーザーセッションID、プライベートチャットの場合は`person_<id>`、グループチャットの場合は`group_<id>`
|
||||
- `conversation_id`: 文字列、ユーザーセッションID、LangBotによって生成されます。ユーザーがセッションをリセットした後に再生成されます
|
||||
- `msg_create_time`: 数値型、このメッセージが受信されたタイムスタンプ(秒)
|
||||
- `group_name`: グループ名、グループメッセージを受信した場合のみ設定されます
|
||||
- `sender_name`: 送信者名
|
||||
|
||||
[プラグインを通じて任意の変数をカスタマイズできます](/en/plugin/dev/apis/common.html#set-request-variables)。
|
||||
|
||||

|
||||
|
||||
## その他の設定
|
||||
|
||||
設定フォームの説明を参照してください。
|
||||
<script setup>
|
||||
window.location.href = '/ja/usage/pipelines/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,22 +1,3 @@
|
||||
# ボットの設定(Bots)
|
||||
|
||||
ボットは、メッセージングプラットフォームからメッセージイベントを受信し、パイプラインを呼び出してメッセージを処理するために使用されます。
|
||||
|
||||

|
||||
|
||||
|
||||
| プラットフォーム | ステータス | 備考 | チュートリアル |
|
||||
| ------ | ---- | ---- | ---- |
|
||||
| Discord | ✅ | | [チュートリアル](/en/deploy/platforms/discord) |
|
||||
| Telegram | ✅ | | [チュートリアル](/en/deploy/platforms/telegram) |
|
||||
| Slack | ✅ | | [チュートリアル](/en/deploy/platforms/slack) |
|
||||
| LINE | ✅ | | [チュートリアル](/en/deploy/platforms/line) |
|
||||
| KOOK | ✅ | | [チュートリアル](/en/deploy/platforms/kook) |
|
||||
| Lark | ✅ | | [チュートリアル](/en/deploy/platforms/lark) |
|
||||
| DingTalk | ✅ | | [チュートリアル](/en/deploy/platforms/dingtalk) |
|
||||
| WeCom(Enterprise WeChat) | ✅ | 企業内部ボット | [チュートリアル](/en/deploy/platforms/wecom/wecom) |
|
||||
| WeCom Intelligent Bot | ✅ | wecom インテリジェントボット | [チュートリアル](/en/deploy/platforms/wecom/wecombot) |
|
||||
| WeCom Customer Service | ✅ | 企業外部ボット | [チュートリアル](/en/deploy/platforms/wecom/wecomcs) |
|
||||
| WeChat Official Account | ✅ | WeChat 公式プラットフォームボット | [チュートリアル](/en/deploy/platforms/wxoa) |
|
||||
| OneBot v11 | ✅ | 個人 QQ アカウントをボットとして使用し、独立したプロトコルクライアントが必要です。OneBot v11 をサポートします | [NapCat](/en/deploy/platforms/qq/aiocqhttp/napcat) <br> [Lagrange](/en/deploy/platforms/qq/aiocqhttp/lagrange) <br> [LiteLoaderQQNT](/en/deploy/platforms/qq/aiocqhttp/llonebot) |
|
||||
| QQ Official Bot | ✅ | QQ Open Platform ボット API に接続します | [チュートリアル](/en/deploy/platforms/qq/official_webhook) |
|
||||
<script setup>
|
||||
window.location.href = '/ja/usage/platforms/readme'
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# ナレッジベースの使用
|
||||
|
||||
LangBotはRAG(Retrieval-Augmented Generation)をネイティブサポートしています。組み込みナレッジベースを作成してパイプラインにバインドすることで、ナレッジベースの内容に基づいて質問に答えることができます。LangBotは外部のナレッジ検索サービス(例: Dify、RAGFlow)への接続もサポートしています。
|
||||
|
||||
## 組み込みナレッジベースの構築
|
||||
|
||||
:::info
|
||||
- 組み込みナレッジベースの作成と使用には、まず埋め込みモデルの設定が必要です。[モデルの設定](/en/deploy/models/readme)をお読みください。
|
||||
:::
|
||||
|
||||
ナレッジベースページで`ナレッジベースを作成`ボタンをクリックし、名前を入力し、既に設定済みの埋め込みモデルを選択してから`作成`をクリックします。
|
||||
作成後、ナレッジベースの「ドキュメント」タブに移動してドキュメントをアップロードします。LangBotはバックグラウンドで自動的に解析とインデックス化を行います。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/upload_docs.png" alt="create_kb" />
|
||||
|
||||
## 外部ナレッジベースの接続
|
||||
|
||||
ナレッジベースページで「外部ナレッジベース」タブに切り替え、外部リトリーバーを追加します。ダイアログで使用するナレッジリトリーバープラグインを選択します(関連プラグインをプラグイン管理で事前にインストールしてください)。サポートされているリトリーバーは[プラグインマーケットプレイス](https://space.langbot.app/market?category=KnowledgeRetriever)で確認できます。
|
||||
|
||||
## ナレッジベースの使用
|
||||
|
||||
パイプライン設定に移動し、「AI」タブで`Local Agent`をランナーとして選択してから、先ほど作成したナレッジベースを選択します。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_local_agent.png" alt="use_kb" />
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
:::info
|
||||
LangBotの組み込みナレッジベースは、ランナーが`Local Agent`に設定されている場合にのみ使用できます。他のランナーについては、それぞれのドキュメントを参照してください。
|
||||
:::
|
||||
|
||||
これで`チャットデバッグ`でナレッジベースを使用したり、このパイプラインにリンクされたボットを通じて使用できます:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb_in_chat.png" alt="use_kb_in_chat" />
|
||||
@@ -0,0 +1,47 @@
|
||||
# モデルの設定(Models)
|
||||
|
||||
## 対話モデル (LLM Model)
|
||||
|
||||
モデルはパイプラインによってメッセージ処理に使用されます。最初に設定したモデルがデフォルトパイプラインのモデルとして設定されます。
|
||||
|
||||

|
||||
|
||||
複数のモデルを追加して、パイプラインでどのモデルを使用するかを選択できます。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/model_config.png" alt="model_config" />
|
||||
|
||||
これら4つのパラメータを入力します: `モデル名`、`モデルプロバイダー`、`リクエストURL`、`APIキー`、そして送信します。
|
||||
|
||||
モデルの機能については、特定のモデルの特性に応じて選択してください:
|
||||
|
||||
- ビジュアル機能: 画像を認識するために有効にする必要があります
|
||||
|
||||
- Function Calling: 会話でAgentツールを使用するために有効にする必要があります
|
||||
|
||||
:::info
|
||||
|
||||
*APIキーをお持ちでない場合は、[このリレーステーションから入手できます](https://api.qhaigc.net/)*
|
||||
|
||||
サードパーティのAPIリレーや他のモデルプロバイダーを使用する必要がある場合、
|
||||
|
||||
`OpenAI`を選択してください
|
||||
|
||||
リクエストURLにリレーのBase URLを入力します。例:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/other_provider.png" alt="other_provider" />
|
||||
|
||||
:::
|
||||
|
||||
## 埋め込みモデル (Embedding Model)
|
||||
|
||||
埋め込みモデルはメッセージのベクトル表現を計算するために使用されます。ナレッジベースを使用する場合は、このモデルを設定してください。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/embedding_model.png" alt="embedding_model" />
|
||||
|
||||
これら4つのパラメータを入力します: `モデル名`、`モデルプロバイダー`、`リクエストURL`、`APIキー`、そして送信します。その後、ナレッジベースでこのモデルを使用するように設定してください。
|
||||
|
||||
### seekdb内蔵埋め込みモデルの使用(ゼロ設定)
|
||||
システムにはseekdbが提供する公式埋め込みモデルが統合されており、パラメータの入力は不要です。
|
||||
- 「埋め込みモデル」ページで「seekdb-内蔵」を選択します;
|
||||
- 「保存」をクリックするとすぐに使用できます;
|
||||
- その後、ナレッジベースでこのモデルを選択すると有効になります。
|
||||
@@ -0,0 +1,53 @@
|
||||
# 対話パイプライン設定の変更(Pipelines)
|
||||
|
||||
パイプラインは、メッセージを受信した後の処理フローと、大規模言語モデルとの情報交換を制御します。各ボットは1つのパイプラインにバインドでき、同じパイプラインは複数のボットにバインドできます。
|
||||
|
||||
LangBotは最初の起動時にデフォルトパイプラインを自動的に作成します。ボットを作成すると、自動的にデフォルトパイプラインにバインドされます。最初のモデルを作成すると、自動的にデフォルトパイプラインのモデルとして設定されます。
|
||||
|
||||

|
||||
|
||||
異なるシナリオに適応するために、異なるボット用に複数のパイプラインを作成できます。
|
||||
|
||||
|
||||
|
||||
現在、パイプラインでは以下の機能を設定できます:
|
||||
|
||||
## AI機能
|
||||
|
||||
以下を選択して使用できます: `組み込みエージェント`、[`Dify`](https://dify.ai/)、[`n8n`](https://n8n.io/)
|
||||
|
||||
AI機能は主に2つの部分に分かれています: ランナーの選択とランナーパラメータの設定。
|
||||
|
||||
ランナーは、メッセージを処理するために大規模モデルをスケジュールする方法を定義します。デフォルトは`組み込みエージェント`で、これはLangBotによって実装された複数ラウンドのエージェント戦略です。このランナーが選択されている場合のみ、LangBot内で設定されたモデルとツールが使用されます。
|
||||
|
||||
*<!--  -->*
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/edit_pipeline_ai.png" alt="edit_pipeline" />
|
||||
|
||||
`Dify`、[`n8n`](https://n8n.io/)などの外部LLMOpsプラットフォームを使用することもできます。この場合、使用されるモデル、プロンプト、ツール、その他のリソースはLLMOpsプラットフォームによって提供されます。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/more_runner.png" alt="more_runner" />
|
||||
|
||||
- Difyへの接続の詳細手順は、[チュートリアルを参照](/en/deploy/pipelines/dify.html)してください。
|
||||
- n8nへの接続の詳細手順は、[チュートリアルを参照](/en/deploy/pipelines/n8n.html)してください。
|
||||
|
||||
### 会話変数
|
||||
外部LLMOpsプラットフォームを使用する場合、LangBotは以下のパラメータを明示的に渡します。これらをLLMOpsプラットフォームワークフローの開始ノードに追加できます(以下の画像はDifyの例です):
|
||||
|
||||
- `launcher_type`: ランチャーオブジェクトタイプ、プライベートチャットの場合は`person`、グループチャットの場合は`group`
|
||||
- `launcher_id`: ランチャーオブジェクトID、プライベートチャットの場合はユーザーID、グループチャットの場合はグループID
|
||||
- `sender_id`: 送信者ID
|
||||
- `user_message_text`: ユーザーメッセージのプレーンテキスト
|
||||
- `session_id`: ユーザーセッションID、プライベートチャットの場合は`person_<id>`、グループチャットの場合は`group_<id>`
|
||||
- `conversation_id`: 文字列、ユーザーセッションID、LangBotによって生成されます。ユーザーがセッションをリセットした後に再生成されます
|
||||
- `msg_create_time`: 数値型、このメッセージが受信されたタイムスタンプ(秒)
|
||||
- `group_name`: グループ名、グループメッセージを受信した場合のみ設定されます
|
||||
- `sender_name`: 送信者名
|
||||
|
||||
[プラグインを通じて任意の変数をカスタマイズできます](/en/plugin/dev/apis/common.html#set-request-variables)。
|
||||
|
||||

|
||||
|
||||
## その他の設定
|
||||
|
||||
設定フォームの説明を参照してください。
|
||||
@@ -0,0 +1,22 @@
|
||||
# ボットの設定(Bots)
|
||||
|
||||
ボットは、メッセージングプラットフォームからメッセージイベントを受信し、パイプラインを呼び出してメッセージを処理するために使用されます。
|
||||
|
||||

|
||||
|
||||
|
||||
| プラットフォーム | ステータス | 備考 | チュートリアル |
|
||||
| ------ | ---- | ---- | ---- |
|
||||
| Discord | ✅ | | [チュートリアル](/en/deploy/platforms/discord) |
|
||||
| Telegram | ✅ | | [チュートリアル](/en/deploy/platforms/telegram) |
|
||||
| Slack | ✅ | | [チュートリアル](/en/deploy/platforms/slack) |
|
||||
| LINE | ✅ | | [チュートリアル](/en/deploy/platforms/line) |
|
||||
| KOOK | ✅ | | [チュートリアル](/en/deploy/platforms/kook) |
|
||||
| Lark | ✅ | | [チュートリアル](/en/deploy/platforms/lark) |
|
||||
| DingTalk | ✅ | | [チュートリアル](/en/deploy/platforms/dingtalk) |
|
||||
| WeCom(Enterprise WeChat) | ✅ | 企業内部ボット | [チュートリアル](/en/deploy/platforms/wecom/wecom) |
|
||||
| WeCom Intelligent Bot | ✅ | wecom インテリジェントボット | [チュートリアル](/en/deploy/platforms/wecom/wecombot) |
|
||||
| WeCom Customer Service | ✅ | 企業外部ボット | [チュートリアル](/en/deploy/platforms/wecom/wecomcs) |
|
||||
| WeChat Official Account | ✅ | WeChat 公式プラットフォームボット | [チュートリアル](/en/deploy/platforms/wxoa) |
|
||||
| OneBot v11 | ✅ | 個人 QQ アカウントをボットとして使用し、独立したプロトコルクライアントが必要です。OneBot v11 をサポートします | [NapCat](/en/deploy/platforms/qq/aiocqhttp/napcat) <br> [Lagrange](/en/deploy/platforms/qq/aiocqhttp/lagrange) <br> [LiteLoaderQQNT](/en/deploy/platforms/qq/aiocqhttp/llonebot) |
|
||||
| QQ Official Bot | ✅ | QQ Open Platform ボット API に接続します | [チュートリアル](/en/deploy/platforms/qq/official_webhook) |
|
||||
@@ -1,34 +1,3 @@
|
||||
# 使用知识库 (Knowledge Base)
|
||||
|
||||
LangBot 原生支持 RAG(Retrieval-Augmented Generation,即检索增强生成),您可以创建内置知识库,并将其与流水线绑定,流水线将根据知识库中的内容回答问题。同时,我们支持接入外部服务(Dify、RAGFLow等)提供的知识检索服务。
|
||||
|
||||
## 构建内置知识库
|
||||
|
||||
:::info
|
||||
- 内置知识库的创建和使用需要先配置嵌入模型,请先阅读[配置模型](/zh/deploy/models/readme)。
|
||||
:::
|
||||
|
||||
在知识库页面,点击`创建知识库`按钮,填写知识库名称,选择已配置好的嵌入模型,然后点击`创建`按钮。
|
||||
之后请到知识库的“文档”页面,上传文档,LangBot 将会在后台开始解析和索引。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/upload_docs.png" alt="create_kb" />
|
||||
|
||||
## 接入外部知识库
|
||||
|
||||
请在知识库页面,切换到“外部知识库”标签页,添加外部知识库。在对话框中可以选择需要使用的外部知识库检索器,您需要先在插件管理中安装对应的插件。目前支持的知识检索器可以在[插件市场](https://space.langbot.app/market?category=KnowledgeRetriever)中查看。
|
||||
|
||||
## 使用知识库
|
||||
|
||||
请到流水线配置中,“AI 能力”页,选择`内置 Agent`作为运行器,并在下方选择您刚刚创建的知识库。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_local_agent.png" alt="use_kb" />
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
:::info
|
||||
仅当运行器为`内置 Agent`时,才可以使用 LangBot 原生知识库,若要在使用其他运行器时使用知识库,请参考所使用的运行器对应产品的文档。
|
||||
:::
|
||||
|
||||
现在即可在`对话调试`或流水线所绑定的机器人上使用知识库进行对话:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb_in_chat.png" alt="use_kb_in_chat" />
|
||||
<script setup>
|
||||
window.location.href = '/zh/usage/knowledge/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,47 +1,3 @@
|
||||
# 配置模型 (Models)
|
||||
|
||||
## 对话模型 (LLM Model)
|
||||
|
||||
对话模型将被流水线用于处理消息,您配置的第一个模型将被设置为默认流水线的模型。
|
||||
|
||||

|
||||
|
||||
可以添加多个模型,然后再流水线中选择具体使用什么模型
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/model_config.png" alt="model_config" />
|
||||
|
||||
填入这四个参数`模型名称`、`模型供应商`、`请求 URL`、`API Key`,然后提交即可
|
||||
|
||||
模型能力方面,请根据具体模型特性来选择:
|
||||
|
||||
- 视觉能力:需要启用才可以识图
|
||||
|
||||
- 函数调用:需要启用才可以在对话中使用 Agent 工具
|
||||
|
||||
:::info
|
||||
|
||||
*如果你没有API Key,你可以[在此中转站获取](https://api.qhaigc.net/)*
|
||||
|
||||
如果需要使用第三方中转 API 等模型提供商
|
||||
|
||||
选择 `OpenAI`即可
|
||||
|
||||
请求 URL 填入中转的 Base URL 即可,例如
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/other_provider.png" alt="other_provider" />
|
||||
|
||||
:::
|
||||
|
||||
## 嵌入模型 (Embedding Model)
|
||||
|
||||
嵌入模型将被用于计算消息的向量,若您需要使用知识库,请配置此模型。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/embedding_model.png" alt="embedding_model" />
|
||||
|
||||
填入这四个参数`模型名称`、`模型供应商`、`请求 URL`、`API Key`,然后提交即可,之后请在知识库中配置使用此模型。
|
||||
|
||||
### 使用 seekdb 内置嵌入模型(零配置)
|
||||
系统已集成 seekdb 提供的官方嵌入模型,无需填写任何参数。
|
||||
- 在“嵌入模型”页面选择「seekdb-内置」;
|
||||
- 点击「保存」即可立即使用;
|
||||
- 后续在知识库中选择该模型即可生效。
|
||||
<script setup>
|
||||
window.location.href = '/zh/usage/models/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,54 +1,3 @@
|
||||
# 修改对话流水线配置 (Pipelines)
|
||||
|
||||
流水线控制了收到消息之后的处理流程,以及与大模型之间的信息交互。每个机器人可以绑定到一条流水线上,同一条流水线能被多个机器人绑定。
|
||||
|
||||
LangBot 首次启动时会自动创建一个默认的流水线。创建机器人时,会自动绑定到默认流水线。创建第一个模型时,会自动将其设置为默认流水线的模型。
|
||||
|
||||

|
||||
|
||||
您可以创建多条流水线,用于不同的机器人,适应不同的场景。
|
||||
|
||||
|
||||
|
||||
当前流水线可以配置以下功能
|
||||
|
||||
## AI 能力
|
||||
|
||||
可以选择使用:`内置 Agent`、[`Dify`](https://dify.ai/)、[`阿里云百炼`](https://www.aliyun.com/product/bailian?source=5176.29345612&userCode=ys4ad8gs)、[`n8n`](https://n8n.io/)、[`TBox(蚂蚁百宝箱)`](https://tbox.cn/)
|
||||
|
||||
AI 能力主要分为两个部分,选择运行器和配置运行器参数。
|
||||
|
||||
运行器定义了如何调度大模型处理消息,默认为`内置 Agent`,这是 LangBot 实现的一个多回合 Agent 策略,当且仅当选择此运行器时,才会使用 LangBot 内部配置的模型和工具。
|
||||
|
||||
*<!--  -->*
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/edit_pipeline_ai.png" alt="edit_pipeline" />
|
||||
|
||||
您也可以选择使用 `Dify`、 [`n8n`](https://n8n.io/) 等外部 LLMOps 平台,这种情况下所使用的模型和提示词、工具等资源将由 LLMOps 平台提供。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/more_runner.png" alt="more_runner" />
|
||||
|
||||
- 接入 Dify 的详细步骤可以[参考教程](/zh/deploy/pipelines/dify.html)。
|
||||
- 接入 n8n 的详细步骤可以[参考教程](/zh/deploy/pipelines/n8n.html)。
|
||||
|
||||
### 请求变量
|
||||
|
||||
当使用外部 LLMOps 平台时,LangBot 会显式传入以下参数,您可以自行在 LLMOps 平台的开始节点中添加(下图以 Dify 为例):
|
||||
|
||||
- `launcher_type`:发起对象类型,私聊为 `person`,群聊为 `group`
|
||||
- `launcher_id`:发起对象ID,私聊为用户ID,群聊为群ID
|
||||
- `sender_id`:发送者ID
|
||||
- `user_message_text`:用户消息的纯文本
|
||||
- `session_id`:用户会话id,私聊为 `person_<id>`,群聊为 `group_<id>`
|
||||
- `conversation_id`:字符串,用户会话id,由 LangBot 生成。用户重置会话后,会重新生成
|
||||
- `msg_create_time`:数字类型,收到此消息的时间戳(秒)
|
||||
- `group_name`:群聊名称,仅在群消息事件时设置
|
||||
- `sender_name`:发送者名称
|
||||
|
||||
您可以[通过插件自定义任何变量](/zh/plugin/dev/apis/common.html#%E8%AE%BE%E7%BD%AE%E8%AF%B7%E6%B1%82%E5%8F%98%E9%87%8F)。
|
||||
|
||||

|
||||
|
||||
## 其他配置
|
||||
|
||||
请参考配置表单中的描述信息。
|
||||
<script setup>
|
||||
window.location.href = '/zh/usage/pipelines/readme'
|
||||
</script>
|
||||
|
||||
@@ -1,22 +1,3 @@
|
||||
# 配置机器人 (Bots)
|
||||
|
||||
机器人用于从消息平台接收消息事件并调用流水线处理消息。
|
||||
|
||||

|
||||
|
||||
|
||||
| 平台 | 状态 | 备注 |教程 |
|
||||
| ------ | ---- | ---- | ---- |
|
||||
| OneBot v11 | ✅ | 使用普通的 QQ 号作为机器人,需要使用独立的协议端,支持 OneBot v11 | [NapCat](/zh/deploy/platforms/qq/aiocqhttp/napcat) <br> [Lagrange](/zh/deploy/platforms/qq/aiocqhttp/lagrange) <br> [LiteLoaderQQNT](/zh/deploy/platforms/qq/aiocqhttp/llonebot) |
|
||||
| QQ 官方机器人 | ✅ | 接入 QQ 开放平台的机器人 API | [教程](/zh/deploy/platforms/qq/official_webhook) |
|
||||
| 企业微信 | ✅ | 企业内部机器人 | [教程](/zh/deploy/platforms/wecom/wecom) |
|
||||
| 企业微信客服 | ✅ | 企业对外机器人 | [教程](/zh/deploy/platforms/wecom/wecomcs) |
|
||||
| 企业微信智能机器人 | ✅ | 智能机器人 | [教程](/zh/deploy/platforms/wecom/wecombot) |
|
||||
| 微信公众号 | ✅ | 微信公众平台机器人 | [教程](/zh/deploy/platforms/wxoa.md) |
|
||||
| 飞书 | ✅ | | [教程](/zh/deploy/platforms/lark) |
|
||||
| 钉钉 | ✅ | | [教程](/zh/deploy/platforms/dingtalk) |
|
||||
| Discord | ✅ | | [教程](/zh/deploy/platforms/discord) |
|
||||
| Telegram | ✅ | | [教程](/zh/deploy/platforms/telegram) |
|
||||
| Slack | ✅ | | [教程](/zh/deploy/platforms/slack) |
|
||||
| LINE | ✅ | | [教程](/zh/deploy/platforms/line) |
|
||||
| KOOK | ✅ | | [教程](/zh/deploy/platforms/kook) |
|
||||
<script setup>
|
||||
window.location.href = '/zh/usage/platforms/readme'
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
# 使用知识库 (Knowledge Base)
|
||||
|
||||
LangBot 原生支持 RAG(Retrieval-Augmented Generation,即检索增强生成),您可以创建内置知识库,并将其与流水线绑定,流水线将根据知识库中的内容回答问题。同时,我们支持接入外部服务(Dify、RAGFLow等)提供的知识检索服务。
|
||||
|
||||
## 构建内置知识库
|
||||
|
||||
:::info
|
||||
- 内置知识库的创建和使用需要先配置嵌入模型,请先阅读[配置模型](/zh/usage/models/readme)。
|
||||
:::
|
||||
|
||||
在知识库页面,点击`创建知识库`按钮,填写知识库名称,选择已配置好的嵌入模型,然后点击`创建`按钮。
|
||||
之后请到知识库的“文档”页面,上传文档,LangBot 将会在后台开始解析和索引。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/upload_docs.png" alt="create_kb" />
|
||||
|
||||
## 接入外部知识库
|
||||
|
||||
请在知识库页面,切换到“外部知识库”标签页,添加外部知识库。在对话框中可以选择需要使用的外部知识库检索器,您需要先在插件管理中安装对应的插件。目前支持的知识检索器可以在[插件市场](https://space.langbot.app/market?category=KnowledgeRetriever)中查看。
|
||||
|
||||
## 使用知识库
|
||||
|
||||
请到流水线配置中,“AI 能力”页,选择`内置 Agent`作为运行器,并在下方选择您刚刚创建的知识库。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_local_agent.png" alt="use_kb" />
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb.png" alt="use_kb" />
|
||||
|
||||
:::info
|
||||
仅当运行器为`内置 Agent`时,才可以使用 LangBot 原生知识库,若要在使用其他运行器时使用知识库,请参考所使用的运行器对应产品的文档。
|
||||
:::
|
||||
|
||||
现在即可在`对话调试`或流水线所绑定的机器人上使用知识库进行对话:
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/knowledge/use_kb_in_chat.png" alt="use_kb_in_chat" />
|
||||
@@ -0,0 +1,47 @@
|
||||
# 配置模型 (Models)
|
||||
|
||||
## 对话模型 (LLM Model)
|
||||
|
||||
对话模型将被流水线用于处理消息,您配置的第一个模型将被设置为默认流水线的模型。
|
||||
|
||||

|
||||
|
||||
可以添加多个模型,然后再流水线中选择具体使用什么模型
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/model_config.png" alt="model_config" />
|
||||
|
||||
填入这四个参数`模型名称`、`模型供应商`、`请求 URL`、`API Key`,然后提交即可
|
||||
|
||||
模型能力方面,请根据具体模型特性来选择:
|
||||
|
||||
- 视觉能力:需要启用才可以识图
|
||||
|
||||
- 函数调用:需要启用才可以在对话中使用 Agent 工具
|
||||
|
||||
:::info
|
||||
|
||||
*如果你没有API Key,你可以[在此中转站获取](https://api.qhaigc.net/)*
|
||||
|
||||
如果需要使用第三方中转 API 等模型提供商
|
||||
|
||||
选择 `OpenAI`即可
|
||||
|
||||
请求 URL 填入中转的 Base URL 即可,例如
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/other_provider.png" alt="other_provider" />
|
||||
|
||||
:::
|
||||
|
||||
## 嵌入模型 (Embedding Model)
|
||||
|
||||
嵌入模型将被用于计算消息的向量,若您需要使用知识库,请配置此模型。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/models/embedding_model.png" alt="embedding_model" />
|
||||
|
||||
填入这四个参数`模型名称`、`模型供应商`、`请求 URL`、`API Key`,然后提交即可,之后请在知识库中配置使用此模型。
|
||||
|
||||
### 使用 seekdb 内置嵌入模型(零配置)
|
||||
系统已集成 seekdb 提供的官方嵌入模型,无需填写任何参数。
|
||||
- 在“嵌入模型”页面选择「seekdb-内置」;
|
||||
- 点击「保存」即可立即使用;
|
||||
- 后续在知识库中选择该模型即可生效。
|
||||
@@ -42,4 +42,4 @@ coze.cn 的授权中有可以长期授权的`服务身份及凭证`,但是 coz
|
||||
- 保存失败或调用报错:请确认 token 与 bot_id 是否正确且未包含多余空格。
|
||||
- 无法选择 `Coze API`:请确认当前版本是否已支持该运行器;若尚未支持,请升级到包含 Coze 运行器的版本。
|
||||
|
||||
更多流水线通用配置说明,请参考[修改对话流水线配置](/zh/deploy/pipelines/readme)。
|
||||
更多流水线通用配置说明,请参考[修改对话流水线配置](/zh/usage/pipelines/readme)。
|
||||
@@ -0,0 +1,54 @@
|
||||
# 修改对话流水线配置 (Pipelines)
|
||||
|
||||
流水线控制了收到消息之后的处理流程,以及与大模型之间的信息交互。每个机器人可以绑定到一条流水线上,同一条流水线能被多个机器人绑定。
|
||||
|
||||
LangBot 首次启动时会自动创建一个默认的流水线。创建机器人时,会自动绑定到默认流水线。创建第一个模型时,会自动将其设置为默认流水线的模型。
|
||||
|
||||

|
||||
|
||||
您可以创建多条流水线,用于不同的机器人,适应不同的场景。
|
||||
|
||||
|
||||
|
||||
当前流水线可以配置以下功能
|
||||
|
||||
## AI 能力
|
||||
|
||||
可以选择使用:`内置 Agent`、[`Dify`](https://dify.ai/)、[`阿里云百炼`](https://www.aliyun.com/product/bailian?source=5176.29345612&userCode=ys4ad8gs)、[`n8n`](https://n8n.io/)、[`TBox(蚂蚁百宝箱)`](https://tbox.cn/)
|
||||
|
||||
AI 能力主要分为两个部分,选择运行器和配置运行器参数。
|
||||
|
||||
运行器定义了如何调度大模型处理消息,默认为`内置 Agent`,这是 LangBot 实现的一个多回合 Agent 策略,当且仅当选择此运行器时,才会使用 LangBot 内部配置的模型和工具。
|
||||
|
||||
*<!--  -->*
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/edit_pipeline_ai.png" alt="edit_pipeline" />
|
||||
|
||||
您也可以选择使用 `Dify`、 [`n8n`](https://n8n.io/) 等外部 LLMOps 平台,这种情况下所使用的模型和提示词、工具等资源将由 LLMOps 平台提供。
|
||||
|
||||
<img width="400px" src="/assets/image/zh/deploy/pipelines/more_runner.png" alt="more_runner" />
|
||||
|
||||
- 接入 Dify 的详细步骤可以[参考教程](/zh/usage/pipelines/dify.html)。
|
||||
- 接入 n8n 的详细步骤可以[参考教程](/zh/usage/pipelines/n8n.html)。
|
||||
|
||||
### 请求变量
|
||||
|
||||
当使用外部 LLMOps 平台时,LangBot 会显式传入以下参数,您可以自行在 LLMOps 平台的开始节点中添加(下图以 Dify 为例):
|
||||
|
||||
- `launcher_type`:发起对象类型,私聊为 `person`,群聊为 `group`
|
||||
- `launcher_id`:发起对象ID,私聊为用户ID,群聊为群ID
|
||||
- `sender_id`:发送者ID
|
||||
- `user_message_text`:用户消息的纯文本
|
||||
- `session_id`:用户会话id,私聊为 `person_<id>`,群聊为 `group_<id>`
|
||||
- `conversation_id`:字符串,用户会话id,由 LangBot 生成。用户重置会话后,会重新生成
|
||||
- `msg_create_time`:数字类型,收到此消息的时间戳(秒)
|
||||
- `group_name`:群聊名称,仅在群消息事件时设置
|
||||
- `sender_name`:发送者名称
|
||||
|
||||
您可以[通过插件自定义任何变量](/zh/plugin/dev/apis/common.html#%E8%AE%BE%E7%BD%AE%E8%AF%B7%E6%B1%82%E5%8F%98%E9%87%8F)。
|
||||
|
||||

|
||||
|
||||
## 其他配置
|
||||
|
||||
请参考配置表单中的描述信息。
|
||||
@@ -0,0 +1,22 @@
|
||||
# 配置机器人 (Bots)
|
||||
|
||||
机器人用于从消息平台接收消息事件并调用流水线处理消息。
|
||||
|
||||

|
||||
|
||||
|
||||
| 平台 | 状态 | 备注 |教程 |
|
||||
| ------ | ---- | ---- | ---- |
|
||||
| OneBot v11 | ✅ | 使用普通的 QQ 号作为机器人,需要使用独立的协议端,支持 OneBot v11 | [NapCat](/zh/usage/platforms/qq/aiocqhttp/napcat) <br> [Lagrange](/zh/usage/platforms/qq/aiocqhttp/lagrange) <br> [LiteLoaderQQNT](/zh/usage/platforms/qq/aiocqhttp/llonebot) |
|
||||
| QQ 官方机器人 | ✅ | 接入 QQ 开放平台的机器人 API | [教程](/zh/usage/platforms/qq/official_webhook) |
|
||||
| 企业微信 | ✅ | 企业内部机器人 | [教程](/zh/usage/platforms/wecom/wecom) |
|
||||
| 企业微信客服 | ✅ | 企业对外机器人 | [教程](/zh/usage/platforms/wecom/wecomcs) |
|
||||
| 企业微信智能机器人 | ✅ | 智能机器人 | [教程](/zh/usage/platforms/wecom/wecombot) |
|
||||
| 微信公众号 | ✅ | 微信公众平台机器人 | [教程](/zh/usage/platforms/wxoa.md) |
|
||||
| 飞书 | ✅ | | [教程](/zh/usage/platforms/lark) |
|
||||
| 钉钉 | ✅ | | [教程](/zh/usage/platforms/dingtalk) |
|
||||
| Discord | ✅ | | [教程](/zh/usage/platforms/discord) |
|
||||
| Telegram | ✅ | | [教程](/zh/usage/platforms/telegram) |
|
||||
| Slack | ✅ | | [教程](/zh/usage/platforms/slack) |
|
||||
| LINE | ✅ | | [教程](/zh/usage/platforms/line) |
|
||||
| KOOK | ✅ | | [教程](/zh/usage/platforms/kook) |
|
||||
Reference in New Issue
Block a user