zhayujie / chatgpt-on-wechat

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

扫码登录出时间异常问题 #2075

Closed sky0987 closed 1 week ago

sky0987 commented 2 weeks ago

前置确认

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

操作系统类型?

Linux

运行的python版本是?

python 3.10

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

Latest Release

运行的channel类型是?

wx(个人微信, itchat)

复现步骤 🕹

扫码登录 输入关键词报错

问题描述 😯

扫码登录 输入关键词报错

终端日志 📒

Traceback (most recent call last): File "/data/chatgpt-on-wechat/lib/itchat/components/register.py", line 63, in configured_reply r = replyFn(msg) File "/data/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 47, in handler_group_msg WechatChannel().handle_group(cmsg) File "/data/chatgpt-on-wechat/common/time_check.py", line 40, in _time_checker f(self, *args, **kwargs) # 未开启时间模块则直接回答 File "/data/chatgpt-on-wechat/channel/wechat/wechat_channel.py", line 57, in wrapper self.receivedMsgs[msgId] = True File "/data/chatgpt-on-wechat/common/expired_dict.py", line 18, in setitem expiry_time = datetime.now() + timedelta(seconds=self.expires_in_seconds) TypeError: unsupported type for timedelta seconds component: NoneType

6vision commented 2 weeks ago

配置文件可以截图看看嘛

sky0987 commented 2 weeks ago

{ "channel_type": "wx", "model": "gpt-3.5-turbo",
"open_ai_api_key": "YOUR API KEY",
"proxy": "",
"single_chat_prefix": ["bot", "@bot"],
"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": ["画", "看", "找"],
"conversation_max_tokens": 1000,
"speech_recognition": false,
"group_speech_recognition": false,
"voice_reply_voice": false,
"character_desc": "你是基于大语言模型的AI智能助手,旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。", "subscribe_msg": "感谢您的关注!\n这里是ChatGPT,可以自由对话。\n支持语音对话。\n支持图片输出,画字开头的消息将按要求创作图片。\n支持角色扮演和文字冒险等丰富插件。\n输入{trigger_prefix}#help 查看详细指令。", "use_linkai": false,
"linkai_api_key": "xx",
"linkai_app_code": "xxx"
} 用的link

6vision commented 2 weeks ago

使用linkai的话,是"use_linkai": true,其他配置好像没问题,感觉这个是偶发的,可以重启试试看