zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
30.59k stars 8.01k forks source link

使用RailWay部署企业微信应用,无法设置企业微信应用的URL #1000

Closed Nizernizer closed 1 year ago

Nizernizer commented 1 year ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

Railway

运行的python版本是?

python 3.7

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

other

复现步骤 🕹

  1. 创建企业微信应用
  2. 使用RailWay部署项目(在这个过程中,需要填写Port、Token、EncodingAESKey的参数,但是我无法获取到RailWay的ip,无法创建企业微信应用的API接收消息)
  3. 在RailWay 部署好项目后,会自动生成一个domain,但是这个domain在配置url时又是不可用的,需要IP地址。

问题描述 😯

No response

终端日志 📒

[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: wechatcomapp_agent_id=1000002
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: wechatcomapp_token=meiweijiankangxiehuangbao
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: single_chat_prefix=[""]
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: single_chat_reply_prefix=[bot]
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: wechatcom_corp_id=wwf2c9fb41d2d17c3c
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: speech_recognition=True
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: image_create_prefix=["画", "看", "找"]
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: wechatcomapp_port=9898
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: voice_reply_voice=False
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: wechatcomapp_secret=lye6lAUUkMJ3DrbVStH1kfzEewBHFSfV_9TiawXwtE4
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: open_ai_api_key=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
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: wechatcomapp_aes_key=iEZzPiID99KCMVH6AIhRmKJglW6AjXUobXJijsY8Lkc
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: expires_in_seconds=3600
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: conversation_max_tokens=5000
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: model=gpt-3.5-turbo
[INFO][2023-04-29 02:05:21][config.py:180] - [INIT] override config by environ args: channel_type=wechatcom_app
[INFO][2023-04-29 02:05:21][config.py:195] - [INIT] load config: {'open_ai_api_key': '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', 'model': 'gpt-3.5-turbo', 'proxy': '', 'single_chat_prefix': [''], 'single_chat_reply_prefix': '[bot] ', 'group_chat_prefix': ['@bot'], 'group_name_white_list': ['ChatGPT测试群', 'ChatGPT测试群2'], 'group_chat_in_one_session': ['ChatGPT测试群'], 'image_create_prefix': ['画', '看', '找'], 'speech_recognition': True, 'group_speech_recognition': False, 'voice_reply_voice': False, 'conversation_max_tokens': 5000, 'expires_in_seconds': 3600, 'character_desc': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。', 'subscribe_msg': '感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输入。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持tool、角色扮演和文字冒险等丰富的插件。\n输入{trigger_prefix}#help 查看详细指令。', 'wechatcomapp_agent_id': 1000002, 'wechatcomapp_token': 'meiweijiankangxiehuangbao', 'wechatcom_corp_id': 'wwf2c9fb41d2d17c3c', 'wechatcomapp_port': 9898, 'wechatcomapp_secret': 'lye6lAUUkMJ3DrbVStH1kfzEewBHFSfV_9TiawXwtE4', 'wechatcomapp_aes_key': 'iEZzPiID99KCMVH6AIhRmKJglW6AjXUobXJijsY8Lkc', 'channel_type': 'wechatcom_app'}
[INFO][2023-04-29 02:05:21][config.py:145] - [Config] User datas file not found, ignore.
wwf2c9fb41d2d17c3c lye6lAUUkMJ3DrbVStH1kfzEewBHFSfV_9TiawXwtE4 1000002 meiweijiankangxiehuangbao iEZzPiID99KCMVH6AIhRmKJglW6AjXUobXJijsY8Lkc
[INFO][2023-04-29 02:05:22][wechatcomapp_channel.py:39] - [wechatcom] init: corp_id: wwf2c9fb41d2d17c3c, secret: lye6lAUUkMJ3DrbVStH1kfzEewBHFSfV_9TiawXwtE4, agent_id: 1000002, token: meiweijiankangxiehuangbao, aes_key: iEZzPiID99KCMVH6AIhRmKJglW6AjXUobXJijsY8Lkc
[INFO][2023-04-29 02:05:22][plugin_manager.py:50] - Loading plugins config...
[INFO][2023-04-29 02:05:22][plugin_manager.py:66] - Scaning plugins ...
[INFO][2023-04-29 02:05:22][plugin_manager.py:41] - Plugin Hello_v0.1 registered, path=./plugins/hello
[INFO][2023-04-29 02:05:22][plugin_manager.py:41] - Plugin Dungeon_v1.0 registered, path=./plugins/dungeon
[INFO][2023-04-29 02:05:22][plugin_manager.py:41] - Plugin Finish_v1.0 registered, path=./plugins/finish
[INFO][2023-04-29 02:05:22][plugin_manager.py:41] - Plugin Godcmd_v1.0 registered, path=./plugins/godcmd
[INFO][2023-04-29 02:05:22][plugin_manager.py:41] - Plugin Keyword_v0.1 registered, path=./plugins/keyword
[INFO][2023-04-29 02:05:22][plugin_manager.py:41] - Plugin Banwords_v1.0 registered, path=./plugins/banwords
[INFO][2023-04-29 02:05:22][plugin_manager.py:41] - Plugin Role_v1.0 registered, path=./plugins/role
chatgpt-tool-hub version: 0.4.3
[INFO][2023-04-29 02:05:23][plugin_manager.py:41] - Plugin tool_v0.4 registered, path=./plugins/tool
[INFO][2023-04-29 02:05:23][plugin_manager.py:41] - Plugin BDunit_v0.1 registered, path=./plugins/bdunit
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin GODCMD not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin KEYWORD not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin BANWORDS not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin TOOL not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin ROLE not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin DUNGEON not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin BDUNIT not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin HELLO not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][plugin_manager.py:101] - Plugin FINISH not found in pconfig, adding to pconfig...
[INFO][2023-04-29 02:05:23][godcmd.py:181] - [Godcmd] 因未设置口令,本次的临时口令为8035。
[INFO][2023-04-29 02:05:23][godcmd.py:196] - [Godcmd] inited
[INFO][2023-04-29 02:05:23][keyword.py:40] - [keyword] {}
[INFO][2023-04-29 02:05:23][keyword.py:42] - [keyword] inited.
[WARNING][2023-04-29 02:05:23][banwords.py:53] - [Banwords] init failed, ignore or see https://github.com/zhayujie/chatgpt-on-wechat/tree/master/plugins/banwords .
[ERROR][2023-04-29 02:05:23][plugin_manager.py:126] - Failed to init BANWORDS, diabled. [Errno 2] No such file or directory: '/app/plugins/banwords/banwords.txt'
[INFO][2023-04-29 02:05:23][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[INFO][2023-04-29 02:05:23][__init__.py:29] - [visual_dl] init failed, error_info: ModuleNotFoundError("No module named 'torch'")
[WARNING][2023-04-29 02:05:23][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[WARNING][2023-04-29 02:05:23][chatgpt.py:171] - proxy no find, directly request to chatgpt instead
[INFO][2023-04-29 02:05:23][victorinox.py:86] - use_tools=['python', 'meteo-weather', 'terminal', 'url-get'], params: {'debug': False, 'openai_api_key': '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', 'open_ai_api_base': 'https://api.openai.com/v1';, 'proxy': '', 'request_timeout': 120, 'model_name': 'gpt-3.5-turbo', 'no_default': False, 'top_k_results': 3, 'news_api_key': '', 'bing_subscription_key': '', 'google_api_key': '', 'google_cse_id': '', 'searx_search_host': '', 'wolfram_alpha_appid': '', 'morning_news_api_key': '', 'cuda_device': 'cpu', 'think_depth': 3, 'arxiv_summary': True, 'morning_news_use_llm': False}
[INFO][2023-04-29 02:05:23][tool.py:32] - [tool] inited
[INFO][2023-04-29 02:05:23][role.py:69] - [Role] inited
[INFO][2023-04-29 02:05:23][dungeon.py:56] - [Dungeon] inited
[WARNING][2023-04-29 02:05:23][bdunit.py:47] - [BDunit] init failed, ignore
[ERROR][2023-04-29 02:05:23][plugin_manager.py:126] - Failed to init BDUNIT, diabled. config.json not found
[INFO][2023-04-29 02:05:23][hello.py:23] - [Hello] inited
[INFO][2023-04-29 02:05:23][finish.py:23] - [Finish] inited
192.168.0.3:48746 - - [29/Apr/2023 02:07:47] "HTTP/1.1 GET /" - 404 Not Found
192.168.0.3:48758 - - [29/Apr/2023 02:07:47] "HTTP/1.1 GET /" - 404 Not Found
192.168.0.3:48758 - - [29/Apr/2023 02:07:47] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
192.168.0.3:48760 - - [29/Apr/2023 02:07:47] "HTTP/1.1 GET /favicon.ico" - 404 Not Found
192.168.0.3:38402 - - [29/Apr/2023 02:11:18] "HTTP/1.1 GET /" - 404 Not Found
192.168.0.3:38416 - - [29/Apr/2023 02:11:18] "HTTP/1.1 GET /" - 404 Not Found
lanvent commented 1 year ago

碰巧看到,这是@6vision 提供的实操教程,可以参考一下 https://mp.weixin.qq.com/s/Ultc3LKDnoX9VRW-S9tXhw

melodyjerry commented 1 year ago

本人已接收,辛苦了!

Nizernizer commented 1 year ago

大佬们这是什么原因呢?

[INFO][2023-04-29 15:34:43][chat_gpt_bot.py:49] - [CHATGPT] query=你好
[WARNING][2023-04-29 15:34:44][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:147] - [CHATGPT] 第1次重试
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:147] - [CHATGPT] 第2次重试
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[INFO][2023-04-29 15:35:25][wechatcomapp_channel.py:63] - [wechatcom] Do send text to NiuErZhuang: [ERROR]
提问太快啦,请休息一下再问我吧
Nizernizer commented 1 year ago

大佬们这是什么原因呢?

[INFO][2023-04-29 15:34:43][chat_gpt_bot.py:49] - [CHATGPT] query=你好
[WARNING][2023-04-29 15:34:44][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:147] - [CHATGPT] 第1次重试
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:147] - [CHATGPT] 第2次重试
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[INFO][2023-04-29 15:35:25][wechatcomapp_channel.py:63] - [wechatcom] Do send text to NiuErZhuang: [ERROR]
提问太快啦,请休息一下再问我吧

https://community.openai.com/t/openai-error-ratelimiterror-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details/180159/3

6vision commented 1 year ago

大佬们这是什么原因呢?

[INFO][2023-04-29 15:34:43][chat_gpt_bot.py:49] - [CHATGPT] query=你好
[WARNING][2023-04-29 15:34:44][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:147] - [CHATGPT] 第1次重试
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:147] - [CHATGPT] 第2次重试
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[INFO][2023-04-29 15:35:25][wechatcomapp_channel.py:63] - [wechatcom] Do send text to NiuErZhuang: [ERROR]
提问太快啦,请休息一下再问我吧

https://community.openai.com/t/openai-error-ratelimiterror-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details/180159/3

额度用完了?需要绑卡,或者超过免费账户一分钟三次调用的限制了,可以参考这里https://www.wangpc.cc/aigc/openai-payment-menthonds/

Nizernizer commented 1 year ago

大佬们这是什么原因呢?

[INFO][2023-04-29 15:34:43][chat_gpt_bot.py:49] - [CHATGPT] query=你好
[WARNING][2023-04-29 15:34:44][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:147] - [CHATGPT] 第1次重试
[WARNING][2023-04-29 15:35:04][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:147] - [CHATGPT] 第2次重试
[WARNING][2023-04-29 15:35:24][chat_gpt_bot.py:128] - [CHATGPT] RateLimitError: You exceeded your current quota, please check your plan and billing details.
[INFO][2023-04-29 15:35:25][wechatcomapp_channel.py:63] - [wechatcom] Do send text to NiuErZhuang: [ERROR]
提问太快啦,请休息一下再问我吧

https://community.openai.com/t/openai-error-ratelimiterror-you-exceeded-your-current-quota-please-check-your-plan-and-billing-details/180159/3

额度用完了?需要绑卡,或者超过免费账户一分钟三次调用的限制了,可以参考这里https://www.wangpc.cc/aigc/openai-payment-menthonds/

感谢大佬,已解决

yuhongwg commented 1 year ago

使用RailWay部署项目(在这个过程中,需要填写Port、Token、EncodingAESKey的参数,但是我无法获取到RailWay的ip,无法创建企业微信应用的API接收消息) 在RailWay 部署好项目后,会自动生成一个domain,但是这个domain在配置url时又是不可用的,需要IP地址。

这两问题解决了吗?

6vision commented 1 year ago

使用RailWay部署项目(在这个过程中,需要填写Port、Token、EncodingAESKey的参数,但是我无法获取到RailWay的ip,无法创建企业微信应用的API接收消息) 在RailWay 部署好项目后,会自动生成一个domain,但是这个domain在配置url时又是不可用的,需要IP地址。

这两问题解决了吗?

请参考我的教程:https://mp.weixin.qq.com/s/Ultc3LKDnoX9VRW-S9tXhw

prooyf commented 1 year ago

使用RailWay部署项目(在这个过程中,需要填写Port、Token、EncodingAESKey的参数,但是我无法获取到RailWay的ip,无法创建企业微信应用的API接收消息) 在RailWay 部署好项目后,会自动生成一个domain,但是这个domain在配置url时又是不可用的,需要IP地址。 这两问题解决了吗?

请参考我的教程:https://mp.weixin.qq.com/s/Ultc3LKDnoX9VRW-S9tXhw

您好,参考你的教程,我在railway上部署的,但是到最后一步,build logs 和 deploy logs什么东西都没有,请问了解什么原因吗?

lanvent commented 1 year ago

logs为空,需要redeploy下