mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-10-28 19:35:27 +08:00
feat: add WeKnora and DeerFlow pipeline docs with i18n support
This commit is contained in:
@@ -325,7 +325,9 @@
|
||||
"en/usage/pipelines/dify",
|
||||
"en/usage/pipelines/n8n",
|
||||
"en/usage/pipelines/langflow",
|
||||
"en/usage/pipelines/coze"
|
||||
"en/usage/pipelines/coze",
|
||||
"en/usage/pipelines/weknora",
|
||||
"en/usage/pipelines/deerflow"
|
||||
]
|
||||
},
|
||||
"en/usage/knowledge/readme",
|
||||
@@ -537,7 +539,9 @@
|
||||
"zh/usage/pipelines/n8n",
|
||||
"zh/usage/pipelines/langflow",
|
||||
"zh/usage/pipelines/tbox",
|
||||
"zh/usage/pipelines/coze"
|
||||
"zh/usage/pipelines/coze",
|
||||
"zh/usage/pipelines/weknora",
|
||||
"zh/usage/pipelines/deerflow"
|
||||
]
|
||||
},
|
||||
"zh/usage/knowledge/readme",
|
||||
@@ -768,7 +772,9 @@
|
||||
"ja/usage/pipelines/dify",
|
||||
"ja/usage/pipelines/n8n",
|
||||
"ja/usage/pipelines/langflow",
|
||||
"ja/usage/pipelines/coze"
|
||||
"ja/usage/pipelines/coze",
|
||||
"ja/usage/pipelines/weknora",
|
||||
"ja/usage/pipelines/deerflow"
|
||||
]
|
||||
},
|
||||
"ja/usage/knowledge/readme",
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: "Using DeerFlow with LangBot"
|
||||
---
|
||||
|
||||
[DeerFlow](https://github.com/bytedance/deer-flow) is an open-source AI Agent framework based on Large Language Models (LLMs), developed by ByteDance. It focuses on deep research, information retrieval, and multi-agent collaborative orchestration.
|
||||
The framework is built on LangGraph with a configurable workflow engine, supporting advanced features such as planning mode, sub-agent concurrency, and chain-of-thought reasoning. It is suitable for scenarios that require deep information gathering and structured analysis.
|
||||
|
||||
Current integration targets DeerFlow **2.0 `main` branch**. The DeerFlow official team has migrated the original Deep Research framework to the `main-1.x` branch for ongoing maintenance. Therefore, if you are using version 2.0, please refer to the official documentation and backend API of the `main` branch.
|
||||
|
||||
LangBot currently supports DeerFlow as an `AI Capabilities` runner, bringing deep research and agent orchestration capabilities to your conversation pipelines.
|
||||
|
||||
## Deploying DeerFlow
|
||||
|
||||
Please follow the [DeerFlow Official Documentation](https://github.com/bytedance/deer-flow) to install, configure, and start the service:
|
||||
|
||||
- [DeerFlow GitHub Repository](https://github.com/bytedance/deer-flow)
|
||||
- [DeerFlow Website](https://deerflow.tech/)
|
||||
- [DeerFlow Configuration Documentation](https://github.com/bytedance/deer-flow/blob/main/backend/docs/CONFIGURATION.md)
|
||||
|
||||
After deployment, please confirm that DeerFlow has started normally and note its gateway address. By default, the DeerFlow gateway address is `http://127.0.0.1:2026`.
|
||||
|
||||
<Info title="Network Configuration Tips">
|
||||
|
||||
- The `API Base URL` must start with `http://` or `https://`.
|
||||
- If LangBot and DeerFlow are deployed on the same host and both use Docker deployment, you can refer to the article: [Network Configuration Details](/en/workshop/network-details.html#langbot-and-message-platform-both-running-in-docker-containers). Please add the DeerFlow container to `langbot-network` when starting, and set the `API Base URL` in LangBot configuration to the container interconnection address, for example `http://deerflow-app:2026`.
|
||||
- If deployed on different hosts or containers, please replace `127.0.0.1` with the actual accessible intranet address, hostname, or domain of DeerFlow.
|
||||
|
||||
</Info>
|
||||
|
||||
## Configuring LangBot
|
||||
|
||||
Open the LangBot WebUI page, add a new pipeline or switch to the `AI Capabilities` configuration page in an existing pipeline.
|
||||
|
||||

|
||||
|
||||
1. Select `DeerFlow API` in `Runner`.
|
||||
2. In the runner configuration items, fill in:
|
||||
- `API Base URL`: The API gateway address of the DeerFlow service, default `http://127.0.0.1:2026`.
|
||||
- `API Key`: Optional. If your DeerFlow gateway uses Bearer Token authentication, you can enter the API Key here.
|
||||
- `Assistant ID`: Corresponds to DeerFlow 2.0 LangGraph's `assistant_id`, default `lead_agent`.
|
||||
- `Model Name Override`: Optional. Used to override the default model configured on the DeerFlow side. If DeerFlow has a model configured, this can be left empty.
|
||||
- `Enable Thinking Mode`: When enabled, DeerFlow will return chain-of-thought content, which can be used to display the reasoning process.
|
||||
- `Enable Planning Mode`: Corresponds to DeerFlow 2.0 runtime parameter `config.configurable.is_plan_mode`. When enabled, the Agent will formulate a research plan before execution.
|
||||
- `Enable Sub-Agents`: Corresponds to DeerFlow 2.0 runtime parameter `config.configurable.subagent_enabled`. When enabled, allows the Agent to dispatch sub-agents to complete tasks in parallel.
|
||||
- `Max Concurrent Sub-Agents`: Corresponds to DeerFlow 2.0 runtime parameter `config.configurable.max_concurrent_subagents`, only effective when sub-agents are enabled, default `3`.
|
||||
- `Recursion Limit`: Corresponds to LangGraph's `recursion_limit`, controls the maximum recursion depth of the workflow, default `1000`.
|
||||
3. Click `Save` to complete the configuration.
|
||||
|
||||
<Info title="Configuration Suggestions">
|
||||
|
||||
- It is only recommended to enable `Planning Mode` or `Sub-Agent` related options if the corresponding capabilities have been enabled on the DeerFlow side, otherwise the expected effects may not be achieved.
|
||||
- LangBot will send both the `config.configurable` runtime parameters recommended by DeerFlow 2.0 and retain backward-compatible legacy fields for easier integration with upstream recent versions.
|
||||
|
||||
</Info>
|
||||
|
||||
After completion, you can use DeerFlow in the pipeline to complete deep research and intelligent Q&A.
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
- **Save failed or invocation error**: Please verify that the `API Key` and `API Base URL` are correct, and ensure the DeerFlow service has started normally.
|
||||
- **No expected content returned**: Please verify that the `Assistant ID` matches the actual available assistant in DeerFlow.
|
||||
- **Cannot select `DeerFlow API`**: Please verify that your current LangBot version supports this runner; if not supported, please upgrade to a version that includes the DeerFlow runner.
|
||||
- **Meaning of DeerFlow configuration items**: Please refer to the DeerFlow official documentation regarding runtime parameters and capabilities, or consult the DeerFlow community for recommended configurations.
|
||||
|
||||
For more pipeline general configuration instructions, please refer to [Modifying Conversation Pipeline Configuration](/en/usage/pipelines/readme).
|
||||
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: "Using WeKnora with LangBot"
|
||||
---
|
||||
|
||||
[WeKnora](https://weknora.weixin.qq.com/) is an open-source document understanding and semantic retrieval framework based on Large Language Models (LLMs), developed by Tencent. It is specifically designed for document scenarios with complex structures and heterogeneous content.
|
||||
The framework adopts a modular architecture, integrating multimodal preprocessing, semantic vector indexing, intelligent recall, and large model generation inference to build an efficient and controllable document Q&A workflow. The core retrieval process is based on the RAG (Retrieval-Augmented Generation) mechanism, which combines contextually relevant passages with language models to achieve high-quality answer generation.
|
||||
|
||||
LangBot currently supports two application types for WeKnora: `Knowledge Base Q&A (chat)` and `Agent Intelligent Conversation (agent)`.
|
||||
|
||||
## Obtaining API Key from WeKnora
|
||||
|
||||
Please deploy the WeKnora service and complete knowledge base creation and document upload according to the [WeKnora Official Documentation](https://github.com/Tencent/WeKnora).
|
||||
|
||||

|
||||
|
||||
After deployment, access the WeKnora WebUI (default `http://localhost:80`), navigate to `Settings` -> `API Keys` page, click `Generate API Key` and copy it for safekeeping.
|
||||
|
||||
<Info title="API Key and Knowledge Base ID">
|
||||
- `API Key`: Used for authentication. Please keep it secure and do not expose it.
|
||||
- `Knowledge Base ID`: You can view the ID (formatted as `kb-00000001`) for each knowledge base on the knowledge base management page, which can be specified in LangBot to invoke the corresponding knowledge base.
|
||||
</Info>
|
||||
|
||||
After clicking, you can obtain the basic URL and key information.
|
||||
|
||||

|
||||
|
||||
<Info title="Deployment Tips">
|
||||
|
||||
- If LangBot and WeKnora are deployed on the same host and both use Docker deployment, you can refer to the article: [Network Configuration Details](/en/workshop/network-details.html#langbot-and-message-platform-both-running-in-docker-containers). Please add the WeKnora container to `langbot-network` when starting, and set the `API Base URL` in LangBot configuration to the container interconnection address, for example `http://weknora-app:8080/api/v1`.
|
||||
- For other scenarios, please consult your company's operations team.
|
||||
</Info>
|
||||
|
||||
## Obtaining WeKnora Agent Information
|
||||
|
||||

|
||||
|
||||
On the 'Agents' page, click on the Agent you want to select to enter its details page. In `Agent Configuration`, you can view the `Agent ID` (formatted as `builtin-smart-reasoning`), and in `Tool List`, you can view the tool names (such as `web-search`, `file-search`, etc.) that the Agent can call. These information will be needed when configuring LangBot.
|
||||
|
||||

|
||||
|
||||
At this point, you have prepared the necessary information to connect to the WeKnora API. Next, please follow the steps below to complete the configuration in LangBot.
|
||||
|
||||
## Configuring LangBot
|
||||
|
||||
Open the LangBot WebUI page, add a new pipeline or switch to the `AI Capabilities` configuration page in an existing pipeline.
|
||||
|
||||

|
||||
|
||||
1. Select `WeKnora API` in `Runner`.
|
||||
2. In the runner configuration items, fill in:
|
||||
- `API Base URL`: The API address of the WeKnora service, default `http://localhost:8080/api/v1`.
|
||||
- `API Key`: Paste the API Key generated on WeKnora.
|
||||
- `Application Type`: Select `agent` (Agent Intelligent Conversation, supports tool invocation, web search, chain of thought) or `chat` (Knowledge Base RAG Q&A).
|
||||
- `Agent ID`: Built-in Agent identifier, common values:
|
||||
- `builtin-smart-reasoning`: Intelligent Reasoning Agent (recommended for `agent` mode)
|
||||
- `builtin-quick-answer`: Quick Answer Agent (recommended for `chat` mode)
|
||||
- `Knowledge Base ID List`: Fill in the knowledge base IDs to retrieve from (formatted as `kb-00000001`), multiple can be filled.
|
||||
- `Enable Web Search`: Only effective in `agent` mode, allows the Agent to call Web search tools when enabled.
|
||||
- `Timeout (seconds)`: Request timeout, default `120`.
|
||||
- `Default Prompt`: The default question used when the user does not send text content.
|
||||
3. Click `Save` to complete the configuration.
|
||||
|
||||
After completion, you can invoke WeKnora in the pipeline to complete knowledge base-based intelligent conversation.
|
||||
|
||||
## Output Processing
|
||||
|
||||
- When using the `agent` application, if `track-function-calls` is enabled in LangBot pipeline `Output Processing`, a message `Calling function xxx` will be output to the user each time WeKnora executes a tool call.
|
||||
- The `thinking` (chain of thought) content returned by WeKnora will be sent wrapped in `<think>` tags, which can be collapsed and displayed on the frontend.
|
||||
- The `references` (knowledge base citation sources) returned by WeKnora will be attached after the answer as reference source messages.
|
||||
|
||||
## Frequently Asked Questions
|
||||
|
||||
- **Save failed or invocation error**: Please verify that the `API Key` and `API Base URL` are correct. The URL must include `/api/v1` at the end.
|
||||
- **No knowledge base content returned**: Please verify that the `Knowledge Base ID` is correct, and that documents have been successfully uploaded and parsed in that knowledge base.
|
||||
- **Cannot select `WeKnora API`**: Please verify that your current LangBot version supports this runner; if not supported, please upgrade to a version that includes the WeKnora runner.
|
||||
|
||||
For more pipeline general configuration instructions, please refer to [Modifying Conversation Pipeline Configuration](/en/usage/pipelines/readme).
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 84 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 96 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title: "LangBot で DeerFlow を使用する"
|
||||
---
|
||||
|
||||
[DeerFlow](https://github.com/bytedance/deer-flow) は、ByteDance がオープンソース化した大規模言語モデル(LLM)ベースの AI エージェントフレームワークであり、深度研究、情報検索、マルチエージェントの協調オーケストレーションに焦点を当てています。
|
||||
フレームワークは LangGraph 上に構築され、設定可能なワークフローエンジンを採用し、計画モード、サブエージェントの並行処理、思考連鎖などの高度な機能をサポートしています。深度情報収集と構造化分析が必要なシナリオに適しています。
|
||||
|
||||
現在の統合は DeerFlow **2.0 `main` ブランチ**を対象としています。DeerFlow 公式は元の Deep Research フレームワークを `main-1.x` ブランチに移管して継続的にメンテナンスしています。そのため、バージョン 2.0 を使用している場合は、`main` ブランチの公式ドキュメントとバックエンド API を参照してください。
|
||||
|
||||
LangBot は現在、DeerFlow を `AI 機能` ランナーとして会話パイプラインに接続し、深度研究とエージェントオーケストレーション機能を提供します。
|
||||
|
||||
## DeerFlow のデプロイ
|
||||
|
||||
[DeerFlow 公式ドキュメント](https://github.com/bytedance/deer-flow) に従って、サービスのインストール、設定、起動を完了してください:
|
||||
|
||||
- [DeerFlow GitHub リポジトリ](https://github.com/bytedance/deer-flow)
|
||||
- [DeerFlow ウェブサイト](https://deerflow.tech/)
|
||||
- [DeerFlow 設定ドキュメント](https://github.com/bytedance/deer-flow/blob/main/backend/docs/CONFIGURATION.md)
|
||||
|
||||
デプロイ完了後、DeerFlow が正常に起動していることを確認し、ゲートウェイアドレスをメモしてください。デフォルトでは、DeerFlow のゲートウェイアドレスは `http://127.0.0.1:2026` です。
|
||||
|
||||
<Info title="ネットワーク設定のヒント">
|
||||
|
||||
- `API ベース URL` は `http://` または `https://` で始まる必要があります。
|
||||
- LangBot と DeerFlow が同じホストにデプロイされ、どちらも Docker を使用してデプロイされている場合、次の記事を参照してください:[ネットワーク設定の詳細](/ja/workshop/network-details.html#langbot-およびメッセージプラットフォームが-docker-コンテナで実行されている場合)。DeerFlow を起動する際に、コンテナを `langbot-network` に追加し、LangBot 設定の `API ベース URL` をコンテナ相互接続アドレス(例:`http://deerflow-app:2026`)に設定してください。
|
||||
- 異なるホストやコンテナにデプロイされている場合は、`127.0.0.1` を DeerFlow が実際にアクセス可能な社内アドレス、ホスト名、またはドメインに置き換えてください。
|
||||
|
||||
</Info>
|
||||
|
||||
## LangBot の設定
|
||||
|
||||
LangBot WebUI ページを開き、新しいパイプラインを追加するか、既存のパイプラインで `AI 機能` 設定ページに切り替えます。
|
||||
|
||||

|
||||
|
||||
1. `ランナー` で `DeerFlow API` を選択します。
|
||||
2. ランナーの設定項目に以下を入力します:
|
||||
- `API ベース URL`:DeerFlow サービスの API ゲートウェイアドレス、デフォルト `http://127.0.0.1:2026`。
|
||||
- `API キー`:オプション。DeerFlow ゲートウェイが Bearer Token 認証を使用している場合、ここに入力できます。
|
||||
- `Assistant ID`:DeerFlow 2.0 LangGraph の `assistant_id` に対応、デフォルト `lead_agent`。
|
||||
- `モデル名オーバーライド`:オプション。DeerFlow 側に設定されたデフォルトモデルを上書きするために使用します。DeerFlow にモデルが設定されている場合は空白のままにできます。
|
||||
- `思考モードを有効化`:有効にすると、DeerFlow は思考連鎖コンテンツを返し、推論プロセスの表示に使用できます。
|
||||
- `計画モードを有効化`:DeerFlow 2.0 ランタイムパラメータ `config.configurable.is_plan_mode` に対応。有効にすると、エージェントは実行前に研究計画を立てます。
|
||||
- `サブエージェントを有効化`:DeerFlow 2.0 ランタイムパラメータ `config.configurable.subagent_enabled` に対応。有効にすると、エージェントがサブエージェントをディスパッチしてタスクを並行処理できるようになります。
|
||||
- `サブエージェント最大同時実行数`:DeerFlow 2.0 ランタイムパラメータ `config.configurable.max_concurrent_subagents` に対応。サブエージェントが有効な場合のみ有効、デフォルト `3`。
|
||||
- `再帰深度上限`:LangGraph の `recursion_limit` に対応。ワークフローの最大再帰深度を制御、デフォルト `1000`。
|
||||
3. `保存` をクリックして設定を完了します。
|
||||
|
||||
<Info title="設定の推奨事項">
|
||||
|
||||
- DeerFlow 側で対応する機能が有効になっている場合にのみ、`計画モード` または `サブエージェント` 関連オプションを有効にすることをお勧めします。そうでない場合、期待される効果が得られない可能性があります。
|
||||
- LangBot は DeerFlow 2.0 が推奨する `config.configurable` ランタイムパラメータを送信すると同時に、上位の最新バージョンとの連携を容易にするために後方互換性の旧フィールドを保持します。
|
||||
|
||||
</Info>
|
||||
|
||||
完了後、パイプラインで DeerFlow を使用して深度研究とインテリジェント Q&A を完了できます。
|
||||
|
||||
## よくある質問
|
||||
|
||||
- **保存に失敗するか、呼び出しでエラー**:`API キー` と `API ベース URL` が正しいか確認し、DeerFlow サービスが正常に起動していることを確認してください。
|
||||
- **期待されるコンテンツが返されない**:`Assistant ID` が DeerFlow で実際に使用可能なアシスタントと一致しているか確認してください。
|
||||
- **`DeerFlow API` を選択できない**:現在の LangBot バージョンがこのランナーをサポートしているか確認してください。サポートされていない場合は、DeerFlow ランナーを含むバージョンにアップグレードしてください。
|
||||
- **DeerFlow 設定項目の意味**:ランタイムパラメータと機能に関する DeerFlow 公式ドキュメントを参照するか、DeerFlow コミュニティに推奨設定を相談してください。
|
||||
|
||||
パイプラインの一般的な設定の詳細については、[会話パイプライン設定の変更](/ja/usage/pipelines/readme) を参照してください。
|
||||
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: "LangBot で WeKnora を使用する"
|
||||
---
|
||||
|
||||
[WeKnora](https://weknora.weixin.qq.com/) は、Tencent がオープンソース化した大規模言語モデル(LLM)ベースの文書理解・意味検索フレームワークであり、複雑な構造と異種コンテンツを持つ文書シナリオ向けに設計されています。
|
||||
フレームワークはモジュラーアーキテクチャを採用し、マルチモーダル前処理、意味ベクトルインデックス、インテリジェントリコール、大規模モデル推論を統合して、効率的で制御可能な文書 Q&A ワークフローを構築します。コア検索プロセスは RAG(Retrieval-Augmented Generation)メカニズムに基づいており、文脈に関連する段落と言語モデルを組み合わせることで、高品質な回答生成を実現します。
|
||||
|
||||
LangBot は現在、WeKnora の `ナレッジベース Q&A(chat)` と `エージェント インテリジェント会話(agent)` の 2 つのアプリケーションタイプをサポートしています。
|
||||
|
||||
## WeKnora で API キーを取得する
|
||||
|
||||
[WeKnora 公式ドキュメント](https://github.com/Tencent/WeKnora) に従って WeKnora サービスをデプロイし、ナレッジベースの作成と文書のアップロードを完了してください。
|
||||
|
||||

|
||||
|
||||
デプロイ完了後、WeKnora の WebUI(デフォルト `http://localhost:80`)にアクセスし、`設定` -> `API キー` ページで `API キーを生成` をクリックし、コピーして保存してください。
|
||||
|
||||
<Info title="API キーとナレッジベース ID">
|
||||
- `API キー`:認証に使用されます。安全に保管し、漏洩しないでください。
|
||||
- `ナレッジベース ID`:ナレッジベース管理ページで各ナレッジベースの ID(`kb-00000001` の形式)を確認でき、LangBot で呼び出すナレッジベースを指定できます。
|
||||
</Info>
|
||||
|
||||
クリックすると、基本的な URL とキー情報を取得できます。
|
||||
|
||||

|
||||
|
||||
<Info title="デプロイのヒント">
|
||||
|
||||
- LangBot と WeKnora が同じホストにデプロイされ、どちらも Docker を使用してデプロイされている場合、次の記事を参照してください:[ネットワーク設定の詳細](/ja/workshop/network-details.html#langbot-およびメッセージプラットフォームが-docker-コンテナで実行されている場合)。WeKnora を起動する際に、コンテナを `langbot-network` に追加し、LangBot 設定の `API ベース URL` をコンテナ相互接続アドレス(例:`http://weknora-app:8080/api/v1`)に設定してください。
|
||||
- その他のシナリオについては、会社の運用チームにお問い合わせください。
|
||||
</Info>
|
||||
|
||||
## WeKnora エージェント情報を取得する
|
||||
|
||||

|
||||
|
||||
「エージェント」ページで、選択したいエージェントをクリックして詳細ページに移動します。`エージェント設定` で `エージェント ID`(`builtin-smart-reasoning` の形式)を確認でき、`ツールリスト` でエージェントが呼び出せるツール名(`web-search`、`file-search` など)を確認できます。LangBot の設定時にこれらの情報が必要になります。
|
||||
|
||||

|
||||
|
||||
これで WeKnora API に接続するために必要な情報が揃いました。次に、以下の手順に従って LangBot での設定を完了してください。
|
||||
|
||||
## LangBot の設定
|
||||
|
||||
LangBot WebUI ページを開き、新しいパイプラインを追加するか、既存のパイプラインで `AI 機能` 設定ページに切り替えます。
|
||||
|
||||

|
||||
|
||||
1. `ランナー` で `WeKnora API` を選択します。
|
||||
2. ランナーの設定項目に以下を入力します:
|
||||
- `API ベース URL`:WeKnora サービスの API アドレス、デフォルト `http://localhost:8080/api/v1`。
|
||||
- `API キー`:WeKnora で生成された API キーを貼り付けます。
|
||||
- `アプリケーションタイプ`:`agent`(エージェント インテリジェント会話、ツール呼び出し、ウェブ検索、思考チェーンをサポート)または `chat`(ナレッジベース RAG Q&A)を選択します。
|
||||
- `エージェント ID`:組み込みエージェント識別子、一般的な値:
|
||||
- `builtin-smart-reasoning`:インテリジェント推論エージェント(`agent` モード推奨)
|
||||
- `builtin-quick-answer`:クイック回答エージェント(`chat` モード推奨)
|
||||
- `ナレッジベース ID リスト`:検索するナレッジベース ID(`kb-00000001` の形式)を入力します。複数入力可能です。
|
||||
- `ウェブ検索を有効化`:`agent` モードでのみ有効になり、有効にするとエージェントがウェブ検索ツールを呼び出せるようになります。
|
||||
- `タイムアウト(秒)`:リクエストのタイムアウト時間、デフォルト `120`。
|
||||
- `デフォルトプロンプト`:ユーザーがテキストコンテンツを送信しない場合に使用されるデフォルトの質問文。
|
||||
3. `保存` をクリックして設定を完了します。
|
||||
|
||||
完了後、パイプラインで WeKnora を呼び出して、ナレッジベースに基づくインテリジェント会話を完了できます。
|
||||
|
||||
## 出力処理
|
||||
|
||||
- `agent` アプリケーションを使用する場合、LangBot パイプラインの `出力処理` で `track-function-calls` を有効にしていると、WeKnora がツール呼び出しを実行するたびに `関数 xxx を呼び出し中` というメッセージがユーザーに出力されます。
|
||||
- WeKnora が返す `thinking`(思考チェーン)コンテンツは `<think>` タグで囲まれて送信され、フロントエンドで折りたたんで表示できます。
|
||||
- WeKnora が返す `references`(ナレッジベースの引用元)は、回答の後に参照元メッセージとして添付されます。
|
||||
|
||||
## よくある質問
|
||||
|
||||
- **保存に失敗するか、呼び出しでエラー**:`API キー` と `API ベース URL` が正しいか確認してください。URL の末尾に `/api/v1` が含まれている必要があります。
|
||||
- **ナレッジベースのコンテンツが返されない**:入力した `ナレッジベース ID` が正しいか、そのナレッジベースで文書が正常にアップロード・解析されているか確認してください。
|
||||
- **`WeKnora API` を選択できない**:現在の LangBot バージョンがこのランナーをサポートしているか確認してください。サポートされていない場合は、WeKnora ランナーを含むバージョンにアップグレードしてください。
|
||||
|
||||
パイプラインの一般的な設定の詳細については、[会話パイプライン設定の変更](/ja/usage/pipelines/readme) を参照してください。
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
title: "在 LangBot 上使用 DeerFlow"
|
||||
---
|
||||
|
||||
[DeerFlow](https://github.com/bytedance/deer-flow) 是字节跳动开源的基于大语言模型(LLM)的 AI Agent 框架,专注于深度研究、信息检索与多智能体协作编排。
|
||||
框架基于 LangGraph 构建,采用可配置的工作流引擎,支持规划模式、子智能体并发、思维链等高级特性,适用于需要深度信息搜集和结构化分析的场景。
|
||||
|
||||
当前适配面向 DeerFlow **2.0 `main` 分支**。DeerFlow 官方已将原始 Deep Research 框架迁移到 `main-1.x` 分支持续维护,因此如果你使用的是 2.0 版本,请以 `main` 分支的官方文档和后端 API 为准。
|
||||
|
||||
LangBot 目前支持将 DeerFlow 作为 `AI 能力` 运行器接入对话流水线,为你的 Bot 带来深度研究和智能体编排能力。
|
||||
|
||||
## 部署 DeerFlow
|
||||
|
||||
请根据 [DeerFlow 官方文档](https://github.com/bytedance/deer-flow) 完成服务的安装、配置与启动:
|
||||
|
||||
- [DeerFlow GitHub 仓库](https://github.com/bytedance/deer-flow)
|
||||
- [DeerFlow 官方网站](https://deerflow.tech/)
|
||||
- [DeerFlow 配置文档](https://github.com/bytedance/deer-flow/blob/main/backend/docs/CONFIGURATION.md)
|
||||
|
||||
部署完成后,请确认 DeerFlow 已正常启动,并记下其网关地址。默认情况下,DeerFlow 网关地址为 `http://127.0.0.1:2026`。
|
||||
|
||||
<Info title="网络配置提示">
|
||||
|
||||
- 若 LangBot 与 DeerFlow 部署在同一台主机且都使用 Docker 部署,可以参考文章:[网络配置详解](/zh/workshop/network-details.html#langbot-%E5%92%8C%E6%B6%88%E6%81%AF%E5%B9%B3%E5%8F%B0%E5%9D%87%E8%BF%90%E8%A1%8C%E5%9C%A8-docker-%E5%AE%B9%E5%99%A8%E4%B8%AD)。请在启动 DeerFlow 时将其容器加入 `langbot-network`,并在 LangBot 配置中将 `API 基础 URL` 设置为容器互通地址,例如 `http://deerflow-app:2026`。
|
||||
- 若部署在不同主机或容器上,请将 `127.0.0.1` 替换为 DeerFlow 实际可访问的内网地址、主机名或域名。
|
||||
|
||||
</Info>
|
||||
|
||||
## 配置 LangBot
|
||||
|
||||
打开 LangBot WebUI 页面,添加一个新的流水线或在已有流水线中切换到 `AI 能力` 配置页面。
|
||||
|
||||

|
||||
|
||||
1. 在 `运行器` 中选择 `DeerFlow API`。
|
||||
2. 在运行器的配置项中,填写:
|
||||
- `API 基础 URL`:DeerFlow 服务的 API 网关地址,默认 `http://127.0.0.1:2026`。
|
||||
- `API 密钥`:可选。若你的 DeerFlow 网关使用 Bearer Token 鉴权,可在此填写 API Key。
|
||||
- `Assistant ID`:对应 DeerFlow 2.0 LangGraph 的 `assistant_id`,默认为 `lead_agent`。
|
||||
- `模型名称覆盖`:可选。用于覆盖 DeerFlow 侧配置的默认模型。若 DeerFlow 已配置好模型,可留空。
|
||||
- `启用思考模式`:开启后 DeerFlow 将返回思维链内容,可用于展示推理过程。
|
||||
- `启用计划模式`:对应 DeerFlow 2.0 运行时参数 `config.configurable.is_plan_mode`,开启后 Agent 会先制定研究计划再执行。
|
||||
- `启用子智能体`:对应 DeerFlow 2.0 运行时参数 `config.configurable.subagent_enabled`,开启后允许 Agent 调度子智能体并行完成任务。
|
||||
- `子智能体最大并发数`:对应 DeerFlow 2.0 运行时参数 `config.configurable.max_concurrent_subagents`,仅在启用子智能体时生效,默认 `3`。
|
||||
- `递归深度上限`:对应 LangGraph 的 `recursion_limit`,控制工作流的最大递归层数,默认 `1000`。
|
||||
3. 点击 `保存` 完成配置。
|
||||
|
||||
<Info title="配置建议">
|
||||
|
||||
- 只有在 DeerFlow 侧已启用相应能力时,才建议开启 `计划模式` 或 `子智能体` 相关选项,否则可能不会产生预期效果。
|
||||
- LangBot 会同时发送 DeerFlow 2.0 推荐的 `config.configurable` 运行时参数,并保留向后兼容的旧字段,便于对接上游近期版本。
|
||||
|
||||
</Info>
|
||||
|
||||
完成后,你即可在该流水线中使用 DeerFlow 完成深度研究和智能问答。
|
||||
|
||||
## 常见问题
|
||||
|
||||
- **保存失败或调用报错**:请确认 `API 密钥` 与 `API 基础 URL` 是否正确,并确保 DeerFlow 服务已正常启动。
|
||||
- **未返回预期内容**:请确认 `Assistant ID` 是否与 DeerFlow 中实际可用的 assistant 一致。
|
||||
- **无法选择 `DeerFlow API`**:请确认当前 LangBot 版本是否已支持该运行器;若尚未支持,请升级到包含 DeerFlow 运行器的版本。
|
||||
- **DeerFlow 相关配置项含义**:请参考 DeerFlow 官方文档中关于运行时参数和能力的说明,或咨询 DeerFlow 社区获取建议配置。
|
||||
@@ -0,0 +1,77 @@
|
||||
---
|
||||
title: "在 LangBot 上使用 WeKnora"
|
||||
---
|
||||
|
||||
[WeKnora](https://weknora.weixin.qq.com/)(维娜拉)是腾讯开源的基于大语言模型(LLM)的文档理解与语义检索框架,专为结构复杂、内容异构的文档场景而打造。
|
||||
框架采用模块化架构,融合多模态预处理、语义向量索引、智能召回与大模型生成推理,构建起高效、可控的文档问答流程。核心检索流程基于 RAG(Retrieval-Augmented Generation)机制,将上下文相关片段与语言模型结合,实现高质量的答案生成。
|
||||
|
||||
LangBot 目前支持 WeKnora 的 `知识库问答(chat)` 和 `Agent 智能对话(agent)` 两种应用类型。
|
||||
|
||||
## 在 WeKnora 上获取 API Key
|
||||
|
||||
请根据 [WeKnora 官方文档](https://github.com/Tencent/WeKnora) 部署 WeKnora 服务并完成知识库的创建与文档上传。
|
||||
|
||||

|
||||
|
||||
部署完成后,访问 WeKnora 的 WebUI(默认 `http://localhost:80`),在 `设置` -> `API 密钥` 页面,点击`生成 API Key`并复制保存。
|
||||
|
||||
<Info title="API Key 与知识库 ID">
|
||||
- `API Key`:用于鉴权,请妥善保管,不要泄露。
|
||||
- `知识库 ID`:在知识库管理页面查看每个知识库对应的 ID(形如 `kb-00000001`),可在 LangBot 中指定调用的知识库。
|
||||
</Info>
|
||||
|
||||
点击后可以获取到基础的Url与key信息
|
||||
|
||||

|
||||
|
||||
<Info title="部署提示">
|
||||
|
||||
- 若 LangBot 与 WeKnora 部署在同一台主机,并且都是使用 Docker 部署的,可以参考文章:[网络配置详解](/zh/workshop/network-details.html#langbot-%E5%92%8C%E6%B6%88%E6%81%AF%E5%B9%B3%E5%8F%B0%E5%9D%87%E8%BF%90%E8%A1%8C%E5%9C%A8-docker-%E5%AE%B9%E5%99%A8%E4%B8%AD)。请在启动 WeKnora 时将其容器加入 `langbot-network`,并在 LangBot 配置中将 `API 基础 URL` 设置为容器互通地址,例如 `http://weknora-app:8080/api/v1`。
|
||||
- 其他情况请咨询贵司运维人员。
|
||||
</Info>
|
||||
|
||||
## 获取 Weknora Agent 信息
|
||||
|
||||

|
||||
|
||||
在 '智能体' 页面,点击要选择的 Agent,进入其详情页,在 `Agent 配置` 中可以查看到 `Agent ID`(形如 `builtin-smart-reasoning`),在 `工具列表` 中可以查看到该 Agent 可调用的工具名称(如 `web-search`、`file-search` 等)。在配置 LangBot 时需要用到这些信息。
|
||||
|
||||

|
||||
|
||||
此时你已经准备好了接入 WeKnora API 的必要信息,接下来请按照下文步骤在 LangBot 上完成配置。
|
||||
|
||||
## 配置 LangBot
|
||||
|
||||
打开 LangBot WebUI 页面,添加一个新的流水线或在已有流水线中切换到 `AI 能力` 配置页面。
|
||||
|
||||

|
||||
|
||||
1. 在 `运行器` 中选择 `WeKnora API`。
|
||||
2. 在运行器的配置项中,填写:
|
||||
- `API 基础 URL`:WeKnora 服务的 API 地址,默认 `http://localhost:8080/api/v1`。
|
||||
- `API 密钥`:粘贴在 WeKnora 上生成的 API Key。
|
||||
- `应用类型`:选择 `agent`(Agent 智能对话,支持工具调用、联网搜索、思维链)或 `chat`(知识库 RAG 问答)。
|
||||
- `Agent ID`:内置 Agent 标识,常用值:
|
||||
- `builtin-smart-reasoning`:智能推理 Agent(推荐用于 `agent` 模式)
|
||||
- `builtin-quick-answer`:快速问答 Agent(推荐用于 `chat` 模式)
|
||||
- `知识库 ID 列表`:填入需要检索的知识库 ID(形如 `kb-00000001`),可填写多个。
|
||||
- `启用联网搜索`:仅在 `agent` 模式下生效,开启后允许 Agent 调用 Web 搜索工具。
|
||||
- `超时时间(秒)`:请求超时时间,默认 `120`。
|
||||
- `默认提示词`:当用户未发送文本内容时使用的默认问句。
|
||||
3. 点击 `保存` 完成配置。
|
||||
|
||||
完成后,你即可在该流水线中调用 WeKnora 完成基于知识库的智能对话。
|
||||
|
||||
## 输出处理
|
||||
|
||||
- 使用 `agent` 应用时,如果开启了 LangBot 流水线 `输出处理` 中的 `track-function-calls`,将会在 WeKnora 执行每个工具调用时,输出一个 `调用函数 xxx` 的消息给用户。
|
||||
- WeKnora 返回的 `thinking`(思维链)内容会以 `<think>` 标签包裹后发送,可在前端进行折叠展示。
|
||||
- WeKnora 返回的 `references`(知识库引用来源)会作为参考来源消息附在回答之后。
|
||||
|
||||
## 常见问题
|
||||
|
||||
- **保存失败或调用报错**:请确认 `API 密钥` 与 `API 基础 URL` 是否正确,URL 末尾需包含 `/api/v1`。
|
||||
- **未返回知识库内容**:请确认填写的 `知识库 ID` 是否正确,且该知识库下已成功上传并解析了文档。
|
||||
- **无法选择 `WeKnora API`**:请确认当前 LangBot 版本是否已支持该运行器;若尚未支持,请升级到包含 WeKnora 运行器的版本。
|
||||
|
||||
更多流水线通用配置说明,请参考[修改对话流水线配置](/zh/usage/pipelines/readme)。
|
||||
Reference in New Issue
Block a user