docs: update platform and usage documentation across multiple languagesDingTalk, Discord, and WeCom

This commit is contained in:
Junyan Qin
2026-01-05 11:55:26 +08:00
parent 8390d2ebcd
commit e40c969c0e
88 changed files with 624 additions and 574 deletions
+3 -34
View File
@@ -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>
-37
View File
@@ -1,37 +0,0 @@
# Using MCP Servers
LangBot supports SSE mode MCP servers. You can add MCP servers to leverage the tool calling capabilities in large language models for better handling of LLM requests.
:::info
MCP service only supports SSE mode.
- MCP servers recommended acquisition channel: [Composio MCP](https://mcp.composio.dev/)
:::
## Enable Function Calling for Models
As shown in the image, enable the `Function Calling` feature for the model.
<img width="400px" src="/assets/image/zh/deploy/mcp/mcp_01.png" alt="enable function call" />
## Create MCP Server
Click `Plugin Management`, then `MCP Management`, as shown:
<img width="1000px" src="/assets/image/zh/deploy/mcp/mcp02.png" alt="server page" />
Click `Add` in the top right corner, then `Create MCP Server`,
<img width="400px" src="/assets/image/zh/deploy/mcp/mcp03.png" alt="create new mcp server" />
For example, to use the Fetch HTML server, fill in the corresponding URL, click `Test` to test the MCP server, and click `Submit` to add the server.
After adding, click the switch on the card to connect to the MCP server. Click the card to view the MCP server details:
<img width="400px" src="/assets/image/zh/deploy/mcp/mcp05.png" alt="detailed server" />
## Effect
You need to select `Local Agent` as the runner in the pipeline settings and use a model that supports function calling.
<img width="1000px" src="/assets/image/zh/deploy/mcp/mcp04.png" alt="dialog with mcp" />
+3 -47
View File
@@ -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.
![arch](/assets/image/zh/deploy/models/arch.png)
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>
-49
View File
@@ -1,49 +0,0 @@
# Integrating Coze API
This document explains how to obtain the Token and Bot ID from the Coze platform and enter them into the LangBot pipeline configuration.
## 1. Obtaining the Token and Bot ID
1. Log in to the Coze platform and enter your developer console.
![Coze Application API Key](/assets/image/zh/deploy/pipelines/coze/coze07.png)
2. In "API Management", create and copy the token.
![Coze Application API Key](/assets/image/zh/deploy/pipelines/coze/coze06.png)
:::info
In Coze authorization, coze.cn supports long-term authorization through "Service Identities and Credentials", while coze.com only provides Personal Access Tokens.
:::
3. Select your own agent (or create a new one) from the project development section. The obtained ID is the `bot_id`.
![Coze bot_id](/assets/image/zh/deploy/pipelines/coze/coze05.png)
* Make sure to select the API option when publishing the agent
![Coze Application API Key](/assets/image/zh/deploy/pipelines/coze/coze04.png)
Please securely store the following two pieces of information:
- **token**: The token generated by the Coze platform
- **bot_id**: The Bot ID
## 2. Entering the Configuration in LangBot
1. Open the LangBot WebUI and navigate to the configuration page of a pipeline (or create a new pipeline and enter its configuration page)
2. Under "AI Capabilities", select the runner as `Coze API`
3. In the runner's configuration items, enter:
- **token**: Paste the API Token you copied from the Coze platform
- **bot_id**: Paste the corresponding Bot ID
- Please select the `API Base URL` according to the Coze site you are using: coze.cn please fill in `https://api.coze.cn`; coze.com please fill in `https://api.coze.com`
![Pipeline Configuration](/assets/image/zh/deploy/pipelines/coze/coze08.png)
4. Click "Save" to complete the configuration
Once completed, you can invoke the Coze agent within this pipeline for dialogue processing
## Frequently Asked Questions (FAQ)
- **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)
-42
View File
@@ -1,42 +0,0 @@
# Using Dify with LangBot
[Dify](https://dify.ai) is an open-source large language model (LLM) application development platform. It combines the concepts of Backend as Service and LLMOps, enabling developers to quickly build production-grade generative AI applications.
Dify can create chat assistants (including Chatflow), Agents, text generation applications, workflows, and other types of applications.
LangBot currently supports three types of Dify applications: `Chat Assistant` (including Chatflow), `Agent`, and `Workflow`.
## Creating an Application in Dify
Please follow the [Dify documentation](https://docs.dify.ai) to deploy Dify and create your application.
After publishing your application, go to the `Access API` page of your application to generate an API key.
![Dify Application API Key](/assets/image/zh/deploy/pipelines/dify/dify_sv_api_01.png)
Save the API server and API key for configuring LangBot's pipeline `AI Capability`.
:::info
The above is an example for Dify cloud service version. If you are using the self-hosted community version, please use your own Dify service address as the `base-url` in LangBot, and add `/v1` as the path.
- If LangBot and Dify are deployed on the same host and both are deployed using Docker, you can refer to the article: [Network Configuration Details](/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). In this case, add `langbot-network` to the `networks` of all containers in the docker-compose.yaml file that starts Dify, add the container name `dify-nginx` to the `nginx` container, and finally set `base-url` to `http://dify-nginx/v1` in the LangBot configuration.
- For other cases, please consult your company's operations team.
:::
## Configuring LangBot
Open the LangBot WebUI page, add a new pipeline or switch to the AI capability configuration page in an existing pipeline.
![Setting Development Item](/assets/image/zh/deploy/pipelines/dify/dify_sv_api_02.png)
::: info
### Workflow Output Key
If you are using a Dify workflow application, please use `summary` as the key to pass the output content.
![Dify Workflow Application Output Key](/assets/image/zh/deploy/pipelines/dify/dify_workflow_output_key.png)
## Output Processing
When using a workflow application or Agent application, if you enable `track-function-calls` in LangBot's pipeline `Output Processing`, a message of `calling function xxx` will be output to the user when Dify executes each tool call.
However, if you are using `ChatFlow` under the `chat` application (Chat Assistant -> Workflow Orchestration), it will only output the text returned by the Answer (direct reply) node regardless of the settings.
:::
-31
View File
@@ -1,31 +0,0 @@
# Using Langflow with LangBot
[Langflow](https://langflow.com/) is an open-source project for building and deploying AI-based Agents and Workflows. It supports local and cloud deployment, and provides APIs for other applications to integrate.
LangBot currently supports using Langflow as the runner.
## Creating a Workflow in Langflow
Please follow the [Langflow documentation](https://langflow.com/docs/introduction) to deploy Langflow instance.
As an example of the default template's Simple Agent:
![create_flow](/assets/image/zh/deploy/pipelines/langflow/create_flow.png)
You can modify the workflow according to your needs:
![edit_flow](/assets/image/zh/deploy/pipelines/langflow/edit_flow.png)
## Configuring LangBot
Open the LangBot WebUI page, add a new pipeline or switch to the AI capability configuration page in an existing pipeline, and select `Langflow API` as the runner.
![set_langflow_runner](/assets/image/zh/deploy/pipelines/langflow/set_langflow_runner.png)
Fill in the other settings according to the prompts, including `Base URL` (fill in according to actual network conditions), `API Key`, `Flow ID`, etc. The API Key can be obtained from Langflow's Settings:
![get_api_key](/assets/image/zh/deploy/pipelines/langflow/get_api_key.png)
Flow ID can be obtained by clicking the `Share` -> `API access` button in the top right corner of the edit page and obtaining it from the example code:
![get_flow_id](/assets/image/zh/deploy/pipelines/langflow/get_flow_id.png)
-49
View File
@@ -1,49 +0,0 @@
# Using n8n with LangBot
[n8n](https://n8n.io/) is an open-source workflow automation platform that allows you to create, schedule, and execute various automated tasks.
LangBot currently supports triggering workflows and receiving responses through the `Webhook` node in n8n workflows.
## Using n8n as the runner
Please open the configuration page of an existing pipeline or create a new pipeline (recommended) and open the configuration page. Select `n8n Workflow API` as the runner in `AI`.
![n8n as the runner](/assets/image/zh/deploy/pipelines/n8n/config_runner.png)
Then configure and fill in the other settings according to the content below.
## Configuring n8n Workflow Connection
![n8n Workflow](/assets/image/zh/deploy/pipelines/n8n/create_wf.png)
or
![n8n Workflow](/assets/image/zh/deploy/pipelines/n8n/create_wf01.png)
Select `Webhook` or `On chat message` as the trigger and configure as follows:
- Webhook:
![n8n webhook configuration](/assets/image/zh/deploy/pipelines/n8n/config_webhook.png)
- On chat message:
![n8n on chat message configuration](/assets/image/zh/deploy/pipelines/n8n/config_n8n_onchatmessage.png)
:::info
If you need streaming responses, set `Response Mode` to `Streaming`.
![n8n streaming configuration](/assets/image/zh/deploy/pipelines/n8n/config_response_model.png)
:::
:::info
Authentication corresponds to the authentication methods in LangBot's pipeline configuration, which you can modify as needed.
![n8n workflow configuration](/assets/image/zh/deploy/pipelines/n8n/config_auth.png)
:::
Configure the node that calls the AI model as `AI Agent`, following the setup below:
> For streaming responses, add the items highlighted in the red box. If you don't need streaming, you can skip this.
![n8n AI model call configuration](/assets/image/zh/deploy/pipelines/n8n/config_call_ai.png)
For the workflow response content in n8n, please use the `Respond to Webhook` node and configure it according to the image below (if you choose streaming responses with the `AI Agent` node, you do not need this step):
![n8n workflow response configuration](/assets/image/zh/deploy/pipelines/n8n/config_respond.png)
The response content key name in `Response Body` needs to match the `output key name` in LangBot's pipeline configuration.
After completing the n8n workflow configuration, please click `Active` at the top to enable the workflow.
+3 -53
View File
@@ -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.
![arch](/assets/image/zh/deploy/pipelines/arch.png)
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.
*<!-- ![edit_pipeline](/assets/image/zh/deploy/pipelines/edit_pipeline_ai.png) -->*
<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).
![Dify Workflow Start Node Configuration](/assets/image/zh/workshop/dify-service-api/dify_workflow_var.png)
## Other Configurations
Please refer to the descriptions in the configuration form.
<script setup>
window.location.href = '/en/usage/pipelines/readme'
</script>
-78
View File
@@ -1,78 +0,0 @@
# Deploy DingTalk Bot
Deploy LangBot to DingTalk.
## Create Bot
Enter the [DingTalk Developer Backend](https://open-dev.dingtalk.com/?spm=ding_open_doc.document.0.0.74f445e5MkawbT#/), log in and enter the organization. After successful login, enter the open platform, which looks like this:
![DingTalk Open Platform](/assets/image/zh/deploy/bots/dingtalk/dingtalk1.png)
Click `Application Development` at the top, then click the blue button `Create Application` on the right, fill in the basic information of the bot, and click save.
Enter the bot's backend, for example, if we have a bot named langbot2, its management page looks like this:
![Bot Page](/assets/image/zh/deploy/bots/dingtalk/dingtalk2.png)
## Configure Bot
Click `Add Application Capability`, `Other Application Capabilities`, `Configure` in `Robot`, click configure and fill in the information, as shown below:
![Bot Configuration](/assets/image/zh/deploy/bots/dingtalk/dingtalk3.png)
Click `Publish` at the bottom of the page, after successful publication, click `Version Management and Publishing` at the bottom left of the bot page, as shown:
![Version Management and Publishing](/assets/image/zh/deploy/bots/dingtalk/dingtalk4.png)
If this is the first time creating a bot, the right side is empty, you need to click `Create New Version`, set information in it, then set `Application Visibility Range`, and click save.
Click `Event Subscription`, change the push method to `Stream Mode Push`.
If card streaming is needed, you must apply for card permissions in the permission management, as shown:
![Before applying for card permissions](/assets/image/zh/deploy/bots/dingtalk/dingtalk6.png)
![After applying for card permissions](/assets/image/zh/deploy/bots/dingtalk/dingtalk7.png)
Additionally, for card messages you mainly need to create a card template and record the template ID to fill in the configuration, the process is as follows:
> The card content template ID can be obtained by logging into the developer backend > [Card Platform](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV)
Fill in information when creating a new template, as shown:
![Fill in information for new template](/assets/image/zh/deploy/bots/dingtalk/dingtalk8.png)
Select a preset template (just choose the first one and modify the template content later), as shown:
![Select preset template](/assets/image/zh/deploy/bots/dingtalk/dingtalk9.png)
Click Use
![Click](/assets/image/zh/deploy/bots/dingtalk/dingtalk10.png)
Create
![Create](/assets/image/zh/deploy/bots/dingtalk/dingtalk11.png)
After clicking Create you'll be redirected to edit the template. As shown, you can freely edit your desired card message:
![Edit template](/assets/image/zh/deploy/bots/dingtalk/dingtalk12.png)
For the main content, keep the default 'content' unchanged:
![Don't modify](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk13.png)
After editing and confirming everything is correct, save it and copy the template ID to fill in the configuration file:
![Save](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk14.png)
![Copy template ID](../../../assets/image/zh/deploy/bots/dingtalk/dingtalk15.png)
## Fill in Configuration Information
Click `Credentials and Basic Information`, record `Client ID` and `Client Secret`,
Click `Application Capabilities`, `Robot`, record the RobotCode and Robot Name.
`markdown_card` is whether to enable Markdown form replies.
Record the above configuration items and fill them in the LangBot bot configuration form
Click [Card Platform](https://open-dev.dingtalk.com/fe/card?spm=ding_open_doc.document.0.0.33cf2281L0fXsV), copy the corresponding bound template ID from the template list, and fill it into the card template ID field.
![Connect to LangBot](/assets/image/zh/deploy/bots/dingtalk/connect_to_langbot.png)
Streaming related:
![img.png](../../../assets/image/zh/deploy/bots/lark/lark_15.png)
**Start LangBot**.
## Add Bot
This article uses DingTalk Windows desktop version as an example, click `Search` at the top, `Features`, then enter the name of the bot you just created, as shown:
![robot_png](/assets/image/zh/deploy/bots/dingtalk/dingtalk5.png)
Click on the bot to chat with it.
If you want to add it to a group, click `Group Management`, `Robots`, `Add Robot` in the DingTalk group, then search for the bot name to use it in the group.
-55
View File
@@ -1,55 +0,0 @@
# Connect to Discord Bot
## Create Bot
Go to the [Discord Developer Portal](https://discord.com/developers/applications), log in, and create an application.
![alt text](/assets/image/zh/deploy/bots/discord/discord_01.png)
Modify the basic information, click `Save Changes` to save.
![alt text](/assets/image/zh/deploy/bots/discord/discord_02.png)
Click `Bot` on the left, click `Reset Token`, copy the generated Token.
![alt text](/assets/image/zh/deploy/bots/discord/discord_03.png)
And check all options in `Privileged Gateway Intents` on this page, click `Save Changes` to save.
![alt text](/assets/image/zh/deploy/bots/discord/discord_05.png)
**Finally, click `OAuth2` on the left, copy the `Client ID` on the page.**
## Connect to LangBot
Click to add a new bot, fill in the `Client ID` and `Token` obtained in the previous step into the configuration.
![alt text](/assets/image/zh/deploy/bots/discord/connect_to_langbot.png)
:::warning
If you are using this adapter within mainland China, you may need to set up a network proxy.
:::
After filling in, start LangBot. If configured successfully, the log will show `[02-02 16:48:15.263] manager.py (68) - [INFO] : Initializing platform adapter 1: discord`, keep LangBot running.
## Invite Bot to Server
You need to create a server first, then invite the bot to the server.
Go to the `OAuth2` page, select `URL Generator`, select `bot`, check the permissions as shown in the image.
![alt text](/assets/image/zh/deploy/bots/discord/discord_06.png)
![alt text](/assets/image/zh/deploy/bots/discord/discord_07.png)
Click `Copy`, paste the generated URL into your browser to open it, and invite the bot to your server.
![alt text](/assets/image/zh/deploy/bots/discord/discord_08.png)
## Use Bot
Now you can use the bot normally in groups or private messages.
![alt text](/assets/image/zh/deploy/bots/discord/discord_09.png)
-63
View File
@@ -1,63 +0,0 @@
# Integrating KOOK Bot
## Create a Bot
Visit the [KOOK Developer Center](https://developer.kookapp.cn/), log in and access the console.
![KOOK Developer Console](/assets/image/zh/deploy/bots/kook/01-dashboard.png)
Click "Create Application" and fill in the application information.
![Create Application](/assets/image/zh/deploy/bots/kook/02-create-app.png)
After the application is created, enter the application details page.
![Application Created](/assets/image/zh/deploy/bots/kook/03-app-created.png)
You can view the basic information of the application on the application overview page.
![Application Overview](/assets/image/zh/deploy/bots/kook/04-app-overview.png)
## Get Bot Token
In the application page, click the "Bot" tab, copy the Bot Token and save it securely. You will need it later.
![Get Bot Token](/assets/image/zh/deploy/bots/kook/05-bot-token.png)
## Configure Bot Permissions
**Important:** In the "Bot" settings, find the "Message Filtering" option and click to configure.
![Message Filter Settings](/assets/image/zh/deploy/bots/kook/07-message-filters.png)
Enable all message-related event permissions, including channel messages and private message events. Otherwise, the bot will not be able to receive messages.
![Enable Permissions](/assets/image/zh/deploy/bots/kook/08-permissions-enabled.png)
## Invite the Bot
In the bot settings page, you can generate an invitation link to invite the bot to your server.
![Generate Invitation Link](/assets/image/zh/deploy/bots/kook/06-invite-link.png)
## Connect to LangBot
Open the LangBot Webui page, and click to create a new bot on the "Bots" page.
![LangBot Bot Management](/assets/image/zh/deploy/bots/kook/09-langbot-bots.png)
Select the KOOK platform, fill in the bot name and Bot Token.
![Configure KOOK Bot](/assets/image/zh/deploy/bots/kook/10-bot-config.png)
After saving, the bot will appear in the list.
![Bot Created](/assets/image/zh/deploy/bots/kook/11-bot-created.png)
Click the enable button to start the bot. If successfully configured, the bot status will show as running.
![Bot Enabled](/assets/image/zh/deploy/bots/kook/12-bot-enabled.png)
## Using the Bot
Now in the KOOK server, the bot can receive and reply to messages normally. The bot supports both channel messages and private messages.
-86
View File
@@ -1,86 +0,0 @@
# Connect to Feishu Bot
## Create Bot
Go to the [Feishu Open Platform](https://open.feishu.cn/app), log in, and create an enterprise self-built application or store application. [(difference introduction)](https://open.feishu.cn/document/platform-overveiw/overview)
![alt text](/assets/image/zh/deploy/bots/lark/lark_01.png)
![alt text](/assets/image/zh/deploy/bots/lark/lark_02.png)
Add bot capability to the application:
![alt text](/assets/image/zh/deploy/bots/lark/lark_03.png)
Add the permissions shown in the image in the permission management:
![alt text](/assets/image/zh/deploy/bots/lark/lark_04.png)
If card streaming permissions are required, additionally add the following card creation and update permissions as shown in the image:
![img_1.png](../../../assets/image/zh/deploy/bots/lark/lark_14.png)
## Connect to LangBot
Find `app_id` and `app_secret` on the `Credentials and Basic Information` page.
![alt text](/assets/image/zh/deploy/bots/lark/lark_05.png)
Open LangBot's Webui configuration page, create a new bot
Fill in the relevant information in the form
![alt text](/assets/image/zh/deploy/bots/lark/connect_to_langbot.png)
Streaming related:
![Streaming related](../../../assets/image/zh/deploy/bots/lark/connect_to_langbot01.png)
After filling in, start LangBot. If configured successfully, the log will show `[01-29 23:42:56.796] manager.py (68) - [INFO] : Initializing platform adapter 1: lark`, keep LangBot running.
:::warning
By default, WebSocket long connection mode is used, corresponding to the long connection subscription below. But in some cases (such as international version of Feishu), long connection mode is not available, in which case you need to use Webhook mode, corresponding to the `Send events to developer server` mode, please refer to the following configuration:
- `enable-webhook`: Set to `true`
- `encrypt-key`: Set to `Encrypt Key` in the `Encryption Strategy` of the `Events and Callbacks` page
Note that in Webhook mode, LangBot needs to be deployed on a server with a public IP, and ensure that the firewall has opened the port configured above.
:::
## Configure Event Subscription
Go to the `Events and Callbacks` page, configure the subscription method as `Long Connection`:
![alt text](/assets/image/zh/deploy/bots/lark/lark_07.png)
And add the event: `Receive Messages`
![alt text](/assets/image/zh/deploy/bots/lark/lark_08.png)
:::warning
Webhook mode configuration method:
![alt text](/assets/image/zh/deploy/bots/lark/lark_13.png)
Please start LangBot first, fill in your server address and port here, the path is `/lark/callback`, click `Save`.
:::
## Publish Bot
Click `Create Version` at the top, fill in the version number and other information, click `Save` below.
![alt text](/assets/image/zh/deploy/bots/lark/lark_09.png)
Add the bot to a Feishu group to use it:
![alt text](/assets/image/zh/deploy/bots/lark/lark_10.png)
![alt text](/assets/image/zh/deploy/bots/lark/lark_11.png)
Private chat can also be used directly
![alt text](/assets/image/zh/deploy/bots/lark/lark_12.png)
## Common Issues
- Store app bots cannot respond to chat messages immediately after creation/saving. Due to the [app_ticket event](https://open.feishu.cn/document/server-docs/application-v6/event/app_ticket-events) delay mechanism, you need to wait about 2 minutes before it can work normally.
-153
View File
@@ -1,153 +0,0 @@
# Integrating LINE Bot
This article explains how to connect LangBot with the LINE platform to implement LINE bot functionality.
## Creating a LINE Bot
### Register a LINE Developer Account
1. Visit the [LINE Developers website](https://developers.line.biz/) and log in with your LINE account
2. After logging in, enter the developer console
### Create Provider and Channel
> [Developer Console](https://developers.line.biz/console)
1. In the developer console, create a new Provider (if you don't have one)
![alt text](/assets/image/zh/deploy/bots/line/line01.png)
2. Under the Provider, click "Create"
![alt text](/assets/image/zh/deploy/bots/line/line02.png)
3. Enter a name and click Create
![alt text](/assets/image/zh/deploy/bots/line/line03.png)
4. After being redirected, select Create a Message API
![alt text](/assets/image/zh/deploy/bots/line/line04.png)
* Continue by clicking Create a Message API
![alt text](/assets/image/zh/deploy/bots/line/line05.png)
* After being redirected, fill in the basic information
![alt text](/assets/image/zh/deploy/bots/line/line06.png)
- Channel Name
- Channel Description
- Category
- Subcategory
- Email Address
5. After filling in all information, click "Continue" to create
![alt text](/assets/image/zh/deploy/bots/line/line07.png)
6. Check the information you entered, and if there are no issues, click Submit
![alt text](/assets/image/zh/deploy/bots/line/line08.png)
7. Successfully created, proceed to use
![alt text](/assets/image/zh/deploy/bots/line/line09.png)
### Get Configuration Information
After creation, you will obtain the following important information, please record it:
1. Channel Secret
> [Page after clicking use](https://manager.line.biz/account)
* Select Settings
![alt text](/assets/image/zh/deploy/bots/line/line09.png)
* Click Message API
![alt text](/assets/image/zh/deploy/bots/line/line11.png)
* Enable Message API
![alt text](/assets/image/zh/deploy/bots/line/line12.png)
* Select the Provider you just created and click Agree
![alt text](/assets/image/zh/deploy/bots/line/line13.png)
* For privacy terms, simply click OK
![alt text](/assets/image/zh/deploy/bots/line/line14.png)
* Click OK to complete creation
![alt text](/assets/image/zh/deploy/bots/line/line15.png)
* Copy it
![alt text](/assets/image/zh/deploy/bots/line/line16.png)
2. Channel Access Token (need to click the "Issue" button to generate)
* Click console or directly visit [Console](https://developers.line.biz/console/)
![alt text](/assets/image/zh/deploy/bots/line/line17.png)
* Select the Provider you created and click Message API
![alt text](/assets/image/zh/deploy/bots/line/line18.png)
* Click Message API
![alt text](/assets/image/zh/deploy/bots/line/line19.png)
* Scroll to the bottom, click Issue
![alt text](/assets/image/zh/deploy/bots/line/line20.png)
* Click the icon to copy
![alt text](/assets/image/zh/deploy/bots/line/line21.png)
## Connecting to LangBot
Next, open the LangBot configuration page:
1. Click "Bots", then click "Add"
![alt text](/assets/image/zh/deploy/bots/line/line26.png)
2. Select "LINE" in "Platform/Adapter Selection"
![alt text](/assets/image/zh/deploy/bots/line/line27.png)
3. Fill in the configuration information:
- Channel Secret: The Channel secret you obtained earlier
- Channel Access Token: The Channel access token you obtained earlier
![alt text](/assets/image/zh/deploy/bots/line/line28.png)
4. Click "Save" to complete the configuration
![alt text](/assets/image/zh/deploy/bots/line/line29.png)
## Configure Webhook
::: info
We recommend that you first refer to [Configure HTTP Reverse Proxy](/en/workshop/production/proxy-and-ssl) to configure the LangBot callback address.
:::
* Get the Webhook callback URL from the LangBot configuration page
![alt text](/assets/image/zh/deploy/bots/line/line30.png)
* Click console or directly visit [Console](https://developers.line.biz/console/)
![alt text](/assets/image/zh/deploy/bots/line/line17.png)
* Select the Provider you created and click Message API
![alt text](/assets/image/zh/deploy/bots/line/line18.png)
* Click Message API
![alt text](/assets/image/zh/deploy/bots/line/line19.png)
* Click Edit to fill in the connection
![alt text](/assets/image/zh/deploy/bots/line/line22.png)
* Enter the connection (must be an HTTPS connection, which means you need an SSL certificate), click Update
![alt text](/assets/image/zh/deploy/bots/line/line23.png)
* Select Use Webhook
![alt text](/assets/image/zh/deploy/bots/line/line24.png)
5. Click the "Verify" button to test if the connection is successful
![alt text](/assets/image/zh/deploy/bots/line/line25.png)
## Feature Configuration
In the LINE developer console, you can further configure the bot's features:
1. In the "Messaging API" tab, find the "LINE Official Account Features" section
2. Enable or disable the following features as needed:
- Auto-reply messages
- Welcome messages when adding friends
- Group and multi-person chat
- Greeting when the bot joins a group
## Usage
After configuration, users can interact with your LINE bot through the following methods:
1. Scan the QR code provided in the LINE developer console to add the bot as a friend
2. Send messages in the chat, and the bot will process and reply through LangBot
## Common Issues
### Webhook Verification Failed
- Ensure your server can be accessed via HTTPS
- Check if the Webhook URL is correct
- Confirm that the LangBot service is running properly
### Unable to Receive Messages
- Check if the Channel Access Token is valid
- Confirm that the "Use Webhook" option is enabled
- Check the LangBot logs for error messages
### Permission Issues
- Ensure you have enabled the necessary permissions for the bot in the LINE developer console
- For some advanced features, a LINE Premium account may be required
@@ -1,67 +0,0 @@
# Deploy Message Platform Lagrange
## Lagrange Introduction
Lagrange is a QQNT protocol reverse engineering framework that is lightweight and relatively stable. Connect through the OneBot 11 protocol, you need to select `OneBot v11` as the adapter.
::: warning
You need to use NT QQ to interact with the bot, old versions of QQ will not work properly
:::
## Deployment Steps
The following only provides general steps for Windows, for detailed steps or other platforms, please refer to the [Lagrange official documentation](https://lagrangedev.github.io/Lagrange.Doc/v1/Lagrange.OneBot/)
### Environment Configuration
Install .NET 8 runtime, [Click here to go directly to Microsoft's official website to download](https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/runtime-desktop-8.0.4-windows-x64-installer)
### Download the latest build from Github Actions
You need to log in to Github to download. If you don't need certain features, you can download from Release, see image 3
[Github Actions](https://github.com/KonataDev/Lagrange.Core/actions)
Follow the images to download:
![Image 1](/assets/image/zh/deploy/bots/qq/onebot/lagrange/dl_lgr_1.png)
![Image 2](/assets/image/zh/deploy/bots/qq/onebot/lagrange/dl_lgr_2.png)
![Image 3](/assets/image/zh/deploy/bots/qq/onebot/lagrange/dl_lgr_3.png)
### Final Steps
Extract the zip you downloaded, navigate to the directory containing Lagrange.OneBot.exe, open a cmd command prompt in this directory, and enter
```bash
.\Lagrange.OneBot
```
Run it once, if a QR code is output, you can directly scan it with the bot account to log in (if the QR code is not clear, you can look for the image file in the lagrange data directory).
If you cannot log in, please check if you have correctly filled in the signature address SignServerUrl in the lagrange configuration file appsettings.json. Please look for the signature address in the lagrange documentation.
## Modify Configuration
You need to configure Lagrange to connect to LangBot. Please edit Lagrange's configuration file appsettings.json and ensure that the connection configuration in Implementations matches the content in the image below:
![Configure Connection](/assets/image/zh/deploy/bots/qq/onebot/lagrange/config_lgr.png)
The Type must be `ReverseWebSocket`;
Host is the IP of the host running LangBot, if on the same host, you can write `127.0.0.1`;
Suffix must be `/ws`;
## Lagrange Integration
Next, open the LangBot configuration page
Click on Bots, then click Add
Select `OneBot v11` for `Platform/Adapter Selection`
![napcat_webui_03](/assets/image/zh/deploy/bots/qq/onebot/napcat/napcat_webui_03.png)
::: info
Note, if you have network connection issues involving multiple docker containers, please refer to [Network Configuration Details](/en/workshop/network-details)
:::
@@ -1,27 +0,0 @@
# Deploy Message Platform LiteLoaderQQNT
Connect through the OneBot 11 protocol, you need to select ``OneBot v11`` as the adapter.
# LiteLoaderQQNT
- [LiteLoaderQQNT's OneBot API plugin](https://github.com/LLOneBot/LLOneBot) injects into the QQ client and converts it to the OneBot 11 protocol
Installation tutorial for LiteLoaderQQNT: https://llonebot.github.io/zh-CN/guide/getting-started
![Image 1](/assets/image/zh/deploy/bots/qq/onebot/llonebot/llob_cfg.png)
Make sure the IP address in the address is the address of the host running LangBot (if running on the same network, use 127.0.0.1)
## Lagrange Integration
Next, open the LangBot configuration page
Click on Bots, then click Add
Select `OneBot v11` for `Platform/Adapter Selection`
![napcat_webui_03](/assets/image/zh/deploy/bots/qq/onebot/napcat/napcat_webui_03.png)
::: info
Note, if you have network connection issues involving multiple docker containers, please refer to [Network Configuration Details](/en/workshop/network-details)
:::
@@ -1,33 +0,0 @@
# Deploy Message Platform NapCat
Connect through the OneBot 11 protocol, you need to select ``OneBot v11`` as the adapter.
## NapCat Installation Tutorial
Follow the [NapCat official documentation for installation](https://napcat.napneko.icu/guide/start-install)
## NapCat Configuration Tutorial
Only using webui operation as an example, for other configuration methods, please check the NapCat documentation.
After logging in, you can check the logs in the console or Bash, find `[NapCat] [WebUi] WebUi Publish Panel Url: http://x.x.x.x:6099/webui?token=xxxxx `
![napcat_webui_01](/assets/image/zh/deploy/bots/qq/onebot/napcat/napcat_webui_01.png)
Copy the Url to your browser or on Windows 11, press Ctrl and click the Url. After scanning the QR code to log in, you will enter the network configuration page.
Click Add Network Configuration, select WebSocket Client, click Enable, then fill in `ws://127.0.0.1:2280/ws` in the Url field and save.
![napcat_webui_02](/assets/image/zh/deploy/bots/qq/onebot/napcat/napcat_webui_02.png)
## NapCat Integration
Next, open the LangBot configuration page
Click on Bots, then click Add
Select `OneBot v11` for `Platform/Adapter Selection`
![napcat_webui_03](/assets/image/zh/deploy/bots/qq/onebot/napcat/napcat_webui_03.png)
::: info
Note, if you have network connection issues involving multiple docker containers, please refer to [Network Configuration Details](/en/workshop/network-details)
:::
@@ -1,80 +0,0 @@
# Using QQ Official Bot API (Using webhook method)
This article only provides the deployment of test bots. For the official launch of bots, please follow the [release process](https://q.qq.com/qqbot/#/home).
:::warning
QQ Official has issued an announcement prohibiting unauthorized access to AIGC features. Please use with caution.
:::
## Register QQ Bot (Test Bot)
### Configure Basic Bot Information
Go to the [QQ Open Platform](https://q.qq.com/#/), find `Application Management` at the bottom, click Create Bot, fill in the basic information, and then enter the bot page, as shown:
![Bot Main Page](/assets/image/zh/deploy/bots/qq/official/qqofficial1.png)
The `Release Process` in the `Home` option is the step to launch the bot. Since you are deploying a test version bot, you only need to complete the `Information` and `Sandbox Configuration` sections.<br>
First fill in the information, then click on Sandbox Configuration.
#### Configure Sandbox Settings
Click on `Sandbox Configuration`.
If you want to deploy in a QQ group, follow the requirements under `QQ Group ID` to select a group chat, and add users with private chat permissions in the message list configuration.<br>
If you want to deploy in a QQ channel, follow the requirements under `Channel ID` to select a channel ID, with bot type 0.
#### Configure Development Management
Click on `Development Management`.
![Development Management Page](/assets/image/zh/deploy/bots/qq/official/qqofficial2.png)
Record the `AppID`, `Token`, and `AppSecret`, and add the IP address of the server where LangBot is located to the IP whitelist.
## Connect to LangBot
Next, open the LangBot configuration page
Click on Bots, then click Add
Select `QQ Official API` for `Platform/Adapter Selection`
![QQ Official Bot Integration with LangBot](/assets/image/zh/deploy/bots/qq/official/qqofficial3.png)
## Configure Callback Address
LangBot must be deployed on a server with a public IP address, and HTTPS must be successfully enabled. Please follow the documentation [Configure HTTP Reverse Proxy and SSL](/en/workshop/production/proxy-and-ssl) for configuration.
#### Subsequent Configuration
If Caddy fails to start, please read the [Caddy documentation](https://caddy2.dengxiaolong.com/docs/quick-starts/caddyfile) or join the LangBot community group for help.<br>
Here are some possible issues:
- Port 443 is not open
- The domain is not resolved to your machine
- Caddyfile was not saved successfully
### Set Management Portal Callback Address
First **start LangBot**.
Click on `Callback Configuration` in the bot management portal, check all events under `Add Event`.
Go to the LangBot configuration page, enable and select the corresponding QQ bot, copy the Webhook callback address from the corresponding bot configuration page, replace the IP address and port with the domain name configured in Caddy, and enter it in the request address.
As shown in the image:
![Caddy Documentation](/assets/image/zh/deploy/bots/qq/official/qqofficial4.png)
For example, if the domain is `testlb.com`, then enter `testlb.com/bots/xxxxxx-xxxxxx` in the request address, and click to confirm the configuration. If the callback address is saved successfully, it means the deployment is successful. If you see `Verification Failed`, please carefully check if the above configuration items are filled in correctly.
## Publication Method
Enter the release process in `Home` and follow the process to publish and launch the bot.
+3 -22
View File
@@ -1,22 +1,3 @@
# Configure Bots (Bots)
Bots are used to receive message events from messaging platforms and call pipelines to process messages.
![arch](/assets/image/zh/deploy/bots/arch.png)
| 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>
-53
View File
@@ -1,53 +0,0 @@
# Connect to Slack Bot
## Create Bot
Go to the [Slack App Platform](https://api.slack.com/apps).
![Slack Platform](/assets/image/zh/deploy/bots/slack/slack_01.jpg)
Click `Create New App` in the top right corner, select `from a manifest`, select the workspace where you want to deploy the bot, select next, and choose to create the bot.
Enter the `Basic Information` option on the left, record the `signing_secret`.
Enter `OAuth & Permissions` on the left, scroll down to `Scopes`, add the following bot permissions:
![Bot Permissions 1](/assets/image/zh/deploy/bots/slack/slack_02.jpg)
![Bot Permissions 2](/assets/image/zh/deploy/bots/slack/slack_03.jpg)
After adding the above permissions, click `Install to your workspace`, record the token starting with `xoxb-xxxxx`.<br>
**Note:**
**If you didn't add all permissions at once, you'll need to reinstall the App later.**<br>
Enter the `App Home` tab on the left, scroll to the bottom where you'll find `Message Tab`, turn it on and check
`Allow users to send Slash commands and messages from the messages tab`.
## Connect to LangBot
Enter `Event Subscriptions` on the left, turn on the switch, click `Subscribe to bot events`,
add the following permissions:
![Event Permissions](/assets/image/zh/deploy/bots/slack/slack_04.jpg)
After completing all the above operations, open the LangBot Webui configuration page, add a new bot
![Event Permissions](/assets/image/zh/deploy/bots/slack/connect_to_langbot.png)
## Start Bot
::: info
Since Slack officially requires https, please configure reverse proxy first according to the documentation [Configure HTTP Reverse Proxy and SSL](/en/workshop/production/proxy-and-ssl).
:::
After filling in the Slack configuration items, **start LangBot**.
Enable and open the Slack bot configuration page on the LangBot homepage, copy the WebHook URL from it, then in the `Request URL` of the Event Subscriptions you just configured, fill in the WebHook URL.
After filling in all the above configuration items, click save link. If it shows a green **Verified**, it means the deployment is successful.
Otherwise, check if the above configuration items are filled in correctly.
## Effect Demonstration
![Effect Demonstration](/assets/image/zh/deploy/bots/slack/slack_05.jpg)
-29
View File
@@ -1,29 +0,0 @@
# Connect to Telegram Bot
## Create Bot
Go to the [Telegram Bot Creation Page](https://t.me/botfather), follow the prompts, and create a bot.
![Telegram Bot Creation](/assets/image/zh/deploy/bots/telegram/telegram_01.png)
![Telegram Bot Creation](/assets/image/zh/deploy/bots/telegram/telegram_02.png)
After creation, BotFather will return an API Token, please keep it safe. Next, turn off `Privacy Mode` to use it in group chats.
![Telegram Bot API Token](/assets/image/zh/deploy/bots/telegram/telegram_03.png)
## Connect to LangBot
Open the LangBot Webui page, create a new bot
![Connect to LangBot](/assets/image/zh/deploy/bots/telegram/connect_to_langbot.png)
After filling in, start LangBot. If configured successfully, the log will show `[02-02 16:48:15.263] manager.py (68) - [INFO] : Initializing platform adapter 1: telegram`, keep LangBot running.
## Use Bot
Now you can use the bot normally in groups or private messages.
![Telegram Bot Usage](/assets/image/zh/deploy/bots/telegram/telegram_04.png)
![Telegram Bot Usage](/assets/image/zh/deploy/bots/telegram/telegram_05.png)
-79
View File
@@ -1,79 +0,0 @@
# Deploy WeCom Bot
Deploy the WeCom (Enterprise WeChat) bot to integrate with LangBot.
:::info
- This integration is for internal enterprise applications, used within your organization. If external customer support is needed, please refer to the [WeCom Customer Service integration solution](wecomcs.md).
- The WeCom callback address requires a public IP and domain name. We recommend you first follow [Configure HTTP Reverse Proxy](/en/workshop/production/proxy-and-ssl) to configure the LangBot callback address.
:::
## Record Corporate ID
Open the [WeCom Admin Portal](https://work.weixin.qq.com/), click `My Enterprise`, and record the `Corporate ID` at the bottom.
![Corp ID](/assets/image/zh/deploy/bots/wecom/wecom/03-corp-id.png)
## Create Bot
Click `App Management`, then `Build Your Own`, and click `Create App`.
![App Management](/assets/image/zh/deploy/bots/wecom/wecom/01-wecom-apps.png)
Fill in the basic information for the bot:
![Create Application](/assets/image/zh/deploy/bots/wecom/wecom/02-create-app.png)
View and record the bot's secret:
![Bot Secret](/assets/image/zh/deploy/bots/wecom/wecom/04-bot-secret.png)
Get it from the WeCom client as prompted.
## Enable Contact Sync Permission
:::info
- This configuration is required for LangBot to support mass messaging. The related code can be found at libs/wecom_api/api.py.
- This feature has not been implemented yet as LangBot is still under development.
- This field can be filled with any random characters, but **cannot be empty**.
:::
Click `Security and Management`, then `Management Tools`, `Contact Sync`; configure the trusted IP by adding the IP address of the server where LangBot is deployed.
Click `View Secret` and record it - this is the contacts_secret (Contact Sync Secret).
![Contact Sync Secret](/assets/image/zh/deploy/bots/wecom/wecom/08-contact-secret.png)
## Create Bot on LangBot
On the LangBot bot page, click `Create Bot`, enter a name, select `WeCom`, and fill in the Corporate ID, Bot Secret, and Contact Sync Secret.
![Create WeCom Bot](/assets/image/zh/deploy/bots/wecom/wecom/05-fill-in-corpid-secret.png)
Click submit to enter the bot edit page, then click enable. At this point you'll see the Webhook callback address—copy it:
![Webhook Callback Address](/assets/image/zh/deploy/bots/wecom/wecom/06-webhook-callback-address.png)
## Set Callback Address
Return to the WeCom bot admin page, click `Receive Messages`, `Set API Reception`, and paste LangBot's Webhook callback address into the `URL` field:
![Set API Receiver](/assets/image/zh/deploy/bots/wecom/wecom/07-set-api-receiver.png)
Click to randomly generate the Token and EncodingAESKey, and record them. **Keep this page open.** Go back to the LangBot WeCom bot configuration page, enter the Token and EncodingAESKey, and click Save.
![Save WeCom Bot](/assets/image/zh/deploy/bots/wecom/wecom/09-save-wecom-bot.png)
Return to the **page where you just filled in the Webhook callback address**, and click Save to complete the configuration. If you see **request URL failed**, please carefully double-check your configuration.
## Configure Corporate Trusted IP
Go back to this application's admin page, find `Enterprise Trusted IP` at the bottom, and add the IP address of your LangBot deployment server.
![Corp Trusted IP](/assets/image/zh/deploy/bots/wecom/wecom/10-corp-trusted-ip.png)
Click Save.
## FAQ
Q: Can't find the bot chat in WeCom?
A: Go to the app's detail page in WeCom admin, click `Features` > `Send Message` > `Send Message`, choose your own account, send a message, and you will see the bot in your chat window.
@@ -1,59 +0,0 @@
# Deploying WeCom Intelligent Bot
## Creating a Bot
First, log in to the [WeCom Admin Console](https://work.weixin.qq.com/wework_admin/frame#/).
![Homepage](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_1.png)
Click `Security And Management` in the left sidebar, then click `Intelligent Bot` under `Management Tool`.
As shown:
![Intelligent Bot](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_2.png)
Click `Create Bot`, scroll to the bottom of the page, click `Create via API Mode`, and enter the page:
![Create via API Mode](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_3.png)
Click to randomly generate Token and EncodingAESKey, then fill in the basic bot information above. **Pay attention to setting the visibility scope**.
Click `My Company` in the left sidebar and save the Company ID at the bottom.
## Configuring Callback URL
Start the LangBot main program, select the adapter `WeCom Intelligent Bot`, and fill in the configuration items.
Among them, the token is Token, the Encoding-AESKey is EncodingAESKey, and the Bot ID can be filled in as xxx (or filled in randomly, it will be changed later). After filling in, click
`Save`, and `Enable` the robot.
![WeCom Intelligent Bot Adapter](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_4.png)
On the LangBot homepage, enable and select the corresponding bot, click to enter the configuration page, copy the Webhook callback address
::: info
We recommend that you first refer to [Configure HTTP Reverse Proxy](/en/workshop/production/proxy-and-ssl) to configure the LangBot callback address.
:::
![Webhook Callback Address](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_8.png)
Return to the WeCom robot configuration page and fill the copied webhook address into `URL Callback`. If the creation is successful, it will jump to the details page. If the message `Request URL Failed` appears, please double-check whether the above steps have been completed one by one.
Details page after successful creation:
![Creation Successful](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_5.png)
Copy the `Bot ID` from the WeCom robot details page, return to the LangBot management page, change the Bot ID of the deployed intelligent robot to the copied ID, and restart the robot.
## Start Using
Enter WeCom, click `➕`, as shown:
![Add Bot](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_6.png)
Click `Company-Created`, select the created bot, and enter the chat interface.
Similarly, if you want to invite the bot to a group chat, click the add member button in the group chat and add the bot from there.
## Effect Images
![Effect Image 1](/assets/image/zh/deploy/bots/wecom/wecombot/wecombot_7.png)
-25
View File
@@ -1,25 +0,0 @@
# Deploy WeCom Customer Service
:::info
This article details the process of deploying LangBot to a WeCom customer service account, which allows conversations between the customer service account and regular WeChat. If you only need to use it within WeCom, please refer to [WeCom Internal Application Implementation](wecom.md).
**Deploying a WeCom customer service account requires enterprise qualifications**. Please check the [WeCom Customer Service Integration Guide](https://developer.work.weixin.qq.com/document/path/94638) and provide the corresponding enterprise qualification certificates according to this document.
:::
## Effect Demonstration
![Effect Demonstration](/assets/image/zh/deploy/bots/wecom/wecomcs/wecomcs_01.jpg)
## Connect to LangBot
![Connect to LangBot](/assets/image/zh/deploy/bots/wecom/wecomcs/connect_to_langbot.png)
The subsequent configuration method and configuration items are the same as [WeCom Internal Application](wecom.md), except that `contacts_secret` is not required.
## Notes
1. Be sure to follow the steps in the official WeCom documentation above and add the customer service account to `API Management`.
2. The steps are the same as for WeCom internal applications, don't miss anything. You also need to save the callback address, because essentially it's just adding other permissions to the WeCom internal application.
3. LangBot will not read sensitive information such as chat records and enterprise qualification content.
-51
View File
@@ -1,51 +0,0 @@
# Deploy WeChat Official Account Bot
Deploy WeChat Official Account bot to connect with LangBot.
## LangBot WeChat Official Account Integration Modes
Currently, LangBot provides two ways to integrate with WeChat Official Accounts:
1. **Traditional Message Exchange Mode**
- Official accounts require requests to be processed within **15 seconds**, AI-generated content that exceeds this timeout cannot be sent.
- When AI content generation timeout occurs, LangBot will print request timeout information in the console.
2. **"Send Any Text to Get Reply" Mode**
- This method can break the **15 second** limit, but **very long text** may not be sent successfully.
- When using this method, after sending a message to the official account, it will reply "AI is thinking, please send any content to get the answer". At this point, you need to send any content to get the answer.
For more complex functionality, please contact the **LangBot team** for customized support.
## Create Bot
Enter the [WeChat Official Account Platform](https://mp.weixin.qq.com/), if you already have an official account, scan the QR code to log in and enter the console.
If you haven't registered an official account before, click Register Now, select `Official Account`, fill in the information in sequence, and enter the console. The console looks like this:
![Console Page](/assets/image/zh/deploy/bots/wxoa/wxoa1.png)
## Set Callback Address
### Get Configuration Items
Click `Settings and Development`, `Development Interface Management`, and you'll see a page like this:
![Set Development Items](/assets/image/zh/deploy/bots/wxoa/wxoa2.png)
Record the `Developer ID (AppID)`, `Developer Password (AppSecret)`, and add the server where LangBot is deployed to the `IP Whitelist`.
### Set Up Reverse Proxy for LangBot
Since WeChat Official Accounts only support http (port 80) and https (port 443), please follow the documentation [Configure HTTP Reverse Proxy and SSL](/en/workshop/production/proxy-and-ssl) for configuration.
### Save Callback Address
Click Set Server Configuration, enter `Token`, `EncodingAESKey`, and change the message encryption/decryption method to `Safe Mode`.
At this point, open the LangBot Webui page, create a new bot, and fill in the four configuration items obtained (AppID, AppSecret, token, EncodingAESKey)
![Set Development Items](/assets/image/zh/deploy/bots/wxoa/connect_to_langbot.png)
In the configuration items, the `Mode` option is the selected integration mode, where the default is `drop`. `drop` is the traditional message exchange mode, and `passive` is the "send any text to get reply" mode.
The `LoadingMessage` option is the loading message, which can be changed to other content, and is only valid when the mode is `passive`. Set `enable` to `true`.
After filling in successfully, on the LangBot homepage, enable and select the corresponding bot, click to enter the configuration page, copy the Webhook callback address, return to the WeChat Official Account bot configuration page, and fill it into `URL`. For example, if the URL is filled as `https://your_domain_name/bots/xxxxx`, where `your_domain_name` is the domain name filled in Caddy. Click Save. If it can be saved successfully, it means the deployment is successful. If you see **System error, please try again later**, please recheck whether the above configuration content is filled in correctly.