> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siflow.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# LangBot

> 了解如何在 LangBot 中新增 OpenAI 模型供应商并设置自定义请求地址，接入 siflow endpoint，为多平台即时通讯机器人配置算秩模型。

[LangBot](https://github.com/langbot-app/LangBot) 是一款开源的多平台即时通讯机器人平台，支持 QQ、企业微信、飞书、钉钉、Discord、Slack 等。它的 **OpenAI** 模型供应商可自定义请求地址，因此可以接入算秩模型推理服务。

本文以 `glm-5.2` 为例。完整模型清单与价格见 [模型广场](https://console.siflow.cn/model-inference/models)。

## 配置

在 [API 密钥](https://console.siflow.cn/model-inference/api_keys) 页面创建一个 API Key。打开 LangBot 管理面板 → **Settings → Models**，单击 **Add Provider**，填写：

| 字段            | 值                                                                             |
| ------------- | ----------------------------------------------------------------------------- |
| Provider Name | 自定义名称，如 `siflow`                                                              |
| Provider Type | **OpenAI**                                                                    |
| Request URL   | `https://api.siflow.cn/model-api/v1`                                          |
| API Key       | 您在 [API 密钥](https://console.siflow.cn/model-inference/api_keys) 页面创建的 API Key |

<img src="https://mintcdn.com/siflow/Kc4V-XwlcephFHJ9/model-inference/media/langbot-add-provider.png?fit=max&auto=format&n=Kc4V-XwlcephFHJ9&q=85&s=7a2001296ee99abde84778fe5d4a8adc" alt="LangBot —— 新增 OpenAI 供应商，Request URL 指向 siflow endpoint" style={{ width: "60%", height: "auto" }} width="1664" height="1482" data-path="model-inference/media/langbot-add-provider.png" />

保存后，在该供应商下 **Add Model**，Model Name 填 `glm-5.2`（按需勾选 Function Call 等能力）。

## 验证

添加模型时，LangBot 会对 siflow endpoint 发起一次连通性测试；显示绿色 ✓（如 `✓ 3.1s`）即接入成功。

<img src="https://mintcdn.com/siflow/Kc4V-XwlcephFHJ9/model-inference/media/langbot-add-model.png?fit=max&auto=format&n=Kc4V-XwlcephFHJ9&q=85&s=bae190537be42f9175097a233a3a7b1e" alt="LangBot —— 添加 glm-5.2 并通过 siflow endpoint 连通性测试" style={{ width: "50%", height: "auto" }} width="752" height="826" data-path="model-inference/media/langbot-add-model.png" />

随后在 **流水线** 中把该模型设为对话模型，并在 **机器人** 里绑定消息平台（飞书 / 钉钉 / 企业微信 / QQ 官方机器人 / Discord 等）即可正式使用。

## 常见问题

* **Provider Type 选 "OpenAI" 即可**：其 Request URL 可自定义，填 `https://api.siflow.cn/model-api/v1` 指向 siflow endpoint；无需专门的算秩预设。
* 若需工具调用 / Agent 能力，选用支持工具调用的模型并勾选 **Function Call**（`glm-5.2` 可用）。
* 个人微信 / 个人 QQ 走第三方协议适配器有合规与封号风险，正式使用建议走官方渠道（飞书 / 钉钉 / 企业微信 / 公众号 / QQ 官方机器人）。
