mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-20 03:16:14 +00:00
chore: migrations
This commit is contained in:
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
## ✨ Features
|
## ✨ Features
|
||||||
|
|
||||||
- 💬 大模型对话、Agent:支持多种大模型,适配群聊和私聊;具有多轮对话、工具调用、多模态能力,并深度适配 [Dify](https://dify.ai)。目前支持 QQ、QQ频道、企业微信,后续还将支持微信、WhatsApp、Discord等平台。
|
- 💬 大模型对话、Agent:支持多种大模型,适配群聊和私聊;具有多轮对话、工具调用、多模态能力,并深度适配 [Dify](https://dify.ai)。目前支持 QQ、QQ频道、企业微信、飞书,后续还将支持微信、WhatsApp、Discord等平台。
|
||||||
- 🛠️ 高稳定性、功能完备:原生支持访问控制、限速、敏感词过滤等机制;配置简单,支持多种部署方式。
|
- 🛠️ 高稳定性、功能完备:原生支持访问控制、限速、敏感词过滤等机制;配置简单,支持多种部署方式。
|
||||||
- 🧩 插件扩展、活跃社区:支持事件驱动、组件扩展等插件机制;丰富生态,目前已有数十个[插件](https://docs.langbot.app/plugin/plugin-intro.html)
|
- 🧩 插件扩展、活跃社区:支持事件驱动、组件扩展等插件机制;丰富生态,目前已有数十个[插件](https://docs.langbot.app/plugin/plugin-intro.html)
|
||||||
- 😻 [New] Web 管理面板:支持通过浏览器管理 LangBot 实例,具体支持功能,查看[文档](https://docs.langbot.app/webui/intro.html)
|
- 😻 [New] Web 管理面板:支持通过浏览器管理 LangBot 实例,具体支持功能,查看[文档](https://docs.langbot.app/webui/intro.html)
|
||||||
@@ -83,6 +83,7 @@
|
|||||||
| QQ 个人号 | ✅ | QQ 个人号私聊、群聊 |
|
| QQ 个人号 | ✅ | QQ 个人号私聊、群聊 |
|
||||||
| QQ 官方机器人 | ✅ | QQ 频道机器人,支持频道、私聊、群聊 |
|
| QQ 官方机器人 | ✅ | QQ 频道机器人,支持频道、私聊、群聊 |
|
||||||
| 企业微信 | ✅ | |
|
| 企业微信 | ✅ | |
|
||||||
|
| 飞书 | ✅ | |
|
||||||
| 钉钉 | 🚧 | |
|
| 钉钉 | 🚧 | |
|
||||||
|
|
||||||
🚧: 正在开发中
|
🚧: 正在开发中
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
from .. import migration
|
||||||
|
|
||||||
|
|
||||||
|
@migration.migration_class("lark-config", 21)
|
||||||
|
class LarkConfigMigration(migration.Migration):
|
||||||
|
"""迁移"""
|
||||||
|
|
||||||
|
async def need_migrate(self) -> bool:
|
||||||
|
"""判断当前环境是否需要运行此迁移"""
|
||||||
|
|
||||||
|
for adapter in self.ap.platform_cfg.data['platform-adapters']:
|
||||||
|
if adapter['adapter'] == 'lark':
|
||||||
|
return False
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
async def run(self):
|
||||||
|
"""执行迁移"""
|
||||||
|
self.ap.platform_cfg.data['platform-adapters'].append({
|
||||||
|
"adapter": "lark",
|
||||||
|
"enable": False,
|
||||||
|
"app_id": "cli_abcdefgh",
|
||||||
|
"app_secret": "XXXXXXXXXX",
|
||||||
|
"bot_name": "LangBot"
|
||||||
|
})
|
||||||
|
|
||||||
|
await self.ap.platform_cfg.dump_config()
|
||||||
@@ -35,6 +35,13 @@
|
|||||||
"token": "",
|
"token": "",
|
||||||
"EncodingAESKey": "",
|
"EncodingAESKey": "",
|
||||||
"contacts_secret": ""
|
"contacts_secret": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"adapter": "lark",
|
||||||
|
"enable": false,
|
||||||
|
"app_id": "cli_abcdefgh",
|
||||||
|
"app_secret": "XXXXXXXXXX",
|
||||||
|
"bot_name": "LangBot"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"track-function-calls": true,
|
"track-function-calls": true,
|
||||||
|
|||||||
@@ -121,6 +121,98 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "企业微信适配器",
|
||||||
|
"description": "用于接入企业微信",
|
||||||
|
"properties": {
|
||||||
|
"adapter": {
|
||||||
|
"type": "string",
|
||||||
|
"const": "wecom"
|
||||||
|
},
|
||||||
|
"enable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "是否启用此适配器",
|
||||||
|
"layout": {
|
||||||
|
"comp": "switch",
|
||||||
|
"props": {
|
||||||
|
"color": "primary"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"host": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "0.0.0.0",
|
||||||
|
"description": "监听的IP地址"
|
||||||
|
},
|
||||||
|
"port": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 2290,
|
||||||
|
"description": "监听的端口"
|
||||||
|
},
|
||||||
|
"corpid": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "企业微信的corpid"
|
||||||
|
},
|
||||||
|
"secret": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "企业微信的secret"
|
||||||
|
},
|
||||||
|
"token": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "企业微信的token"
|
||||||
|
},
|
||||||
|
"EncodingAESKey": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "企业微信的EncodingAESKey"
|
||||||
|
},
|
||||||
|
"contacts_secret": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "企业微信的contacts_secret"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "飞书适配器",
|
||||||
|
"description": "用于接入飞书",
|
||||||
|
"properties": {
|
||||||
|
"adapter": {
|
||||||
|
"type": "string",
|
||||||
|
"const": "lark"
|
||||||
|
},
|
||||||
|
"enable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "是否启用此适配器",
|
||||||
|
"layout": {
|
||||||
|
"comp": "switch",
|
||||||
|
"props": {
|
||||||
|
"color": "primary"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"app_id": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "飞书的app_id"
|
||||||
|
},
|
||||||
|
"app_secret": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "飞书的app_secret"
|
||||||
|
},
|
||||||
|
"bot_name": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
|
"description": "飞书的bot_name"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user