diff --git a/README.md b/README.md index 83aba364..282689f9 100644 --- a/README.md +++ b/README.md @@ -609,7 +609,7 @@ API Key创建:在 [控制台](https://aistudio.google.com/app/apikey?hl=zh-cn)
Web -项目启动后默认运行web通道,可以通过访问 http://localhost:9899/chat 在网页端进行对话,通过修改 `web_port` 配置可自定义服务端口。 +项目启动后默认运行web通道,配置如下: ```json { @@ -617,7 +617,9 @@ API Key创建:在 [控制台](https://aistudio.google.com/app/apikey?hl=zh-cn) "web_port": 9899 } ``` - +- `web_port`: 默认为 9899,可按需更改,需要服务器防火墙和安全组放行该端口 +- 如本地运行,启动后请访问 `http://localhost:port/chat` ;如服务器运行,请访问 `http://ip:port/chat` +> 注:请将上述 url 中的 ip 或者 port 替换为实际的值
@@ -635,7 +637,78 @@ API Key创建:在 [控制台](https://aistudio.google.com/app/apikey?hl=zh-cn)
-更多通道说明:Coming soon... +
+微信公众号 + +本项目支持订阅号和服务号两种公众号,通过服务号(`wechatmp_service`)体验更佳。将下列配置加入 `config.json`: + +```json +{ + "channel_type": "wechatmp", + "wechatmp_token": "TOKEN", + "wechatmp_port": 80, + "wechatmp_app_id": "APPID", + "wechatmp_app_secret": "APPSECRET", + "wechatmp_aes_key": "" +} +``` +- `channel_type`: 个人订阅号为`wechatmp`,企业服务号为`wechatmp_service` + +详细步骤和参数说明参考 [微信公众号接入](https://docs.link-ai.tech/cow/multi-platform/wechat-mp) + +
+ +
+企业微信应用 + +企业微信自建应用接入需在后台创建应用并启用消息回调,配置示例: + +```json +{ + "channel_type": "wechatcom_app", + "wechatcom_corp_id": "CORPID", + "wechatcomapp_token": "TOKEN", + "wechatcomapp_port": 9898, + "wechatcomapp_secret": "SECRET", + "wechatcomapp_agent_id": "AGENTID", + "wechatcomapp_aes_key": "AESKEY" +} +``` +详细步骤和参数说明参考 [企微自建应用接入](https://docs.link-ai.tech/cow/multi-platform/wechat-com) + +
+ +
+钉钉 + +钉钉需要在开放平台创建智能机器人应用,将以下配置填入 `config.json`: + +```json +{ + "channel_type": "dingtalk", + "dingtalk_client_id": "CLIENT_ID", + "dingtalk_client_secret": "CLIENT_SECRET" +} +``` +详细步骤和参数说明参考 [钉钉接入](https://docs.link-ai.tech/cow/multi-platform/dingtalk) +
+ +
+飞书 + +通过自建应用接入AI相关能力到飞书应用中,默认已是飞书的企业用户,且具有企业管理权限,将以下配置填入 `config.json`:: + +```json +{ + "channel_type": "feishu", + "feishu_app_id": "APP_ID", + "feishu_app_secret": "APP_SECRET", + "feishu_token": "VERIFICATION_TOKEN", + "feishu_port": 80 +} +``` +详细步骤和参数说明参考 [飞书接入](https://docs.link-ai.tech/cow/multi-platform/feishu) +

diff --git a/channel/web/web_channel.py b/channel/web/web_channel.py index b937f876..7721728d 100644 --- a/channel/web/web_channel.py +++ b/channel/web/web_channel.py @@ -198,7 +198,7 @@ class WebChannel(ChatChannel): 5. wechatcom_app: 企微自建应用 6. dingtalk: 钉钉 7. feishu: 飞书""") - logger.info(f"Web对话网页已运行, 请使用浏览器访问 http://localhost:{port}/chat") + logger.info(f"Web对话网页已运行, 请使用浏览器访问 http://localhost:{port}/chat(本地运行)或 http://ip:{port}/chat(服务器运行) ") # 确保静态文件目录存在 static_dir = os.path.join(os.path.dirname(__file__), 'static') diff --git a/channel/wechatcom/README.md b/channel/wechatcom/README.md index 2f54a79f..a4cf04f0 100644 --- a/channel/wechatcom/README.md +++ b/channel/wechatcom/README.md @@ -78,8 +78,8 @@ Error code: 60020, message: "not allow to access from your ip, ...from ip: xx.xx ~~填写配置后,将部署完成后的网址```**.railway.app/wxcomapp```,填写在上一步的URL中。发送信息后观察日志,把报错的IP加入到可信IP。(每次重启后都需要加入可信IP)~~ -## 测试体验 +~~## 测试体验~~ -AIGC开放社区中已经部署了多个可免费使用的Bot,扫描下方的二维码会自动邀请你来体验。 +~~AIGC开放社区中已经部署了多个可免费使用的Bot,扫描下方的二维码会自动邀请你来体验。~~ - +~~~~