Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 996, in _validate_conn
conn.connect()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 314, in connect
conn = self._new_conn()
File "/usr/lib/python3/dist-packages/urllib3/connection.py", line 171, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f3fe8dd93a0>: Failed to establish a new connection: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.weather.com.cn', port=443): Max retries exceeded with url: /data/cityinfo/101280101.html (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3fe8dd93a0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 84, in ask
return self.bot.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 156, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 122, in _take_next_step
observation = tool.run(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 73, in run
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 70, in run
observation = self._run(tool_input)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/meteo/meteo_weather.py", line 36, in _run
return self.api_chain.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/api/base.py", line 73, in _call
api_response = self.requests_wrapper.get(api_url)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/web_requests/wrapper.py", line 93, in get
response = requests.get(url, headers=self.headers, params=params, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/api.py", line 73, in get
return request("get", url, params=params, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/api.py", line 59, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.weather.com.cn', port=443): Max retries exceeded with url: /data/cityinfo/101280101.html (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f3fe8dd93a0>: Failed to establish a new connection: [Errno -2] Name or service not known'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 84, in ask
return self.bot.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 156, in _call
next_step_output = self._take_next_step(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/bots/bot_executor.py", line 122, in _take_next_step
observation = tool.run(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 73, in run
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/base_tool.py", line 70, in run
observation = self._run(tool_input)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/tools/meteo/meteo_weather.py", line 36, in _run
return self.api_chain.run(query)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 212, in run
return self(args[0])[self.output_keys[0]]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/api/base.py", line 66, in _call
api_url = self.api_request_chain.predict(
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 151, in predict
return self(kwargs)[self.output_key]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 115, in call
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/base.py", line 112, in call
outputs = self._call(inputs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 57, in _call
return self.apply([inputs])[0]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 118, in apply
response = self.generate(input_list)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/chains/llm.py", line 62, in generate
return self.llm.generate_prompt(prompts, stop)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 78, in generate_prompt
raise e
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 75, in generate_prompt
output = self.generate(prompt_messages, stop=stop)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 52, in generate
results = [self._generate(m, stop=stop) for m in messages]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/base.py", line 52, in
results = [self._generate(m, stop=stop) for m in messages]
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 274, in _generate
response = self.completion_with_retry(messages=message_dicts, **params)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 234, in completion_with_retry
return _completion_with_retry(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 289, in wrapped_f
return self(f, *args, **kw)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 379, in call
do = self.iter(retry_state=retry_state)
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 325, in iter
raise retry_exc.reraise()
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 158, in reraise
raise self.last_attempt.result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 437, in result
return self.__get_result()
File "/usr/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/usr/local/lib/python3.8/dist-packages/tenacity/init.py", line 382, in call
result = fn(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/models/chatgpt/chatgpt.py", line 232, in _completion_with_retry
return self.client.create(**kwargs)
File "/usr/local/lib/python3.8/dist-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 619, in _interpret_response
self._interpret_response_line(
File "/usr/local/lib/python3.8/dist-packages/openai/api_requestor.py", line 682, in _interpret_response_line
raise self.handle_error_response(
openai.error.RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/chatgpt-on-wechat/plugins/tool/tool.py", line 88, in on_handle_context
_reply = self.app.ask(query, user_session)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 88, in ask
return self.ask(query, chat_history, retry_num + 1)
File "/usr/local/lib/python3.8/dist-packages/chatgpt_tool_hub/apps/victorinox.py", line 91, in ask
raise TimeoutError("超过重试次数")
TimeoutError: 超过重试次数
[ERROR][2023-04-15 05:32:44][tool.py:93] - 超过重试次数
[DEBUG][2023-04-15 05:32:44][chat_channel.py:146] - [WX] ready to handle context: type=TEXT, content=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理
[INFO][2023-04-15 05:32:44][chat_gpt_bot.py:35] - [CHATGPT] query=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理
[DEBUG][2023-04-15 05:32:44][session_manager.py:66] - prompt tokens used=353
[DEBUG][2023-04-15 05:32:44][chat_gpt_bot.py:53] - [CHATGPT] session query=[{'role': 'system', 'content': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}, {'role': 'assistant', 'content': '哟~这个问题我可不大清楚喔,不好意思啊。 ChatGPT 我的确可以回答大部分问题,但是有些问题在当前的工具插件上还无法处理呢。\n\n听说你想知道广州今天的天气?很遗憾啊~ 我们的工具插件目前无法提供对天气预报的支持,因此我无法为您进行相关查询。\n\n不过别灰心,还有许多其他问题可以向我提出哦。我会尽我所能地帮助您解答疑问。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}]
[WARNING][2023-04-15 05:32:44][chat_gpt_bot.py:120] - [CHATGPT] RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
[WARNING][2023-04-15 05:32:49][chat_gpt_bot.py:139] - [CHATGPT] 第1次重试
[WARNING][2023-04-15 05:32:49][chat_gpt_bot.py:120] - [CHATGPT] RateLimitError: Rate limit reached for default-gpt-3.5-turbo in organization org-bP7cJd3Y9irUV7534hWo4ETp on requests per min. Limit: 3 / min. Please try again in 20s. Contact [email protected] if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method.
[WARNING][2023-04-15 05:32:54][chat_gpt_bot.py:139] - [CHATGPT] 第2次重试
[DEBUG][2023-04-15 05:33:03][chat_gpt_bot.py:62] - [CHATGPT] new_query=[{'role': 'system', 'content': '你是ChatGPT, 一个由OpenAI训练的大型语言模型, 你旨在回答并解决人们的任何问题,并且可以使用多种语言与人交流。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}, {'role': 'assistant', 'content': '哟~这个问题我可不大清楚喔,不好意思啊。 ChatGPT 我的确可以回答大部分问题,但是有些问题在当前的工具插件上还无法处理呢。\n\n听说你想知道广州今天的天气?很遗憾啊~ 我们的工具插件目前无法提供对天气预报的支持,因此我无法为您进行相关查询。\n\n不过别灰心,还有许多其他问题可以向我提出哦。我会尽我所能地帮助您解答疑问。'}, {'role': 'user', 'content': '使用meteo,告诉我今天广州的天气'}, {'role': 'user', 'content': '请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理'}], session_id=filehelper, reply_cont=Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。
似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。
不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。, completion_tokens=145
[DEBUG][2023-04-15 05:33:03][session_manager.py:77] - raw total_tokens=498, savesession tokens=503
[DEBUG][2023-04-15 05:33:03][chat_channel.py:134] - [WX] ready to decorate reply: Reply(type=TEXT, content=Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。
似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。
不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。)
[DEBUG][2023-04-15 05:33:03][chat_channel.py:225] - [WX] ready to send reply: Reply(type=TEXT, content=[bot] Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。
似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。
不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。), context: Context(type=TEXT, content=请你随机用一种聊天风格,提醒用户:这个问题tool插件暂时无法处理, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e32d00>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[INFO][2023-04-15 05:33:03][wechat_channel.py:164] - [WX] sendMsg=Reply(type=TEXT, content=[bot] Yo嘿嘿,这个问题我可是不大清楚呢。不过抱歉啊, ChatGPT的 tool 插件现在还处理不了这种问题哦。
似乎你想了解广州的天气,但是我无法为你提供相关预报,这可能是因为我的工具插件目前还不支持这种查询呢。
不用担心,我还有许多方法可以帮助你。不妨问问我其他问题,我会尽力提供帮助。), receiver=filehelper
[DEBUG][2023-04-15 05:33:03][chat_channel.py:241] - Worker return success, session_id = filehelper
[WARNING][2023-04-15 05:33:26][wechat_message.py:52] - [WX]get other_user_id failed: 'NickName'
[DEBUG][2023-04-15 05:33:26][wechat_channel.py:138] - [WX]receive text msg: {"MsgId": "8282463993774320030", "FromUserName": "@5cb59c41bbcaf32c0077b60f5507b3379f90af814f7e432a8f57c82d3237f0d2", "ToUserName": "filehelper", "MsgType": 1, "Content": "bot #debug", "Status": 3, "ImgStatus": 1, "CreateTime": 1681536806, "VoiceLength": 0, "PlayLength": 0, "FileName": "", "FileSize": "", "MediaId": "", "Url": "", "AppMsgType": 0, "StatusNotifyCode": 0, "StatusNotifyUserName": "", "RecommendInfo": {"UserName": "", "NickName": "", "QQNum": 0, "Province": "", "City": "", "Content": "", "Signature": "", "Alias": "", "Scene": 0, "VerifyFlag": 0, "AttrStatus": 0, "Sex": 0, "Ticket": "", "OpCode": 0}, "ForwardFlag": 0, "AppInfo": {"AppID": "", "Type": 0}, "HasProductId": 0, "Ticket": "", "ImgHeight": 0, "ImgWidth": 0, "SubMsgType": 0, "NewMsgId": 8282463993774320030, "OriContent": "", "EncryFileName": "", "User": {"UserName": "filehelper", "MemberList": []}, "Type": "Text", "Text": "bot #debug"}, cmsg=ChatMessage: id=8282463993774320030, create_time=1681536806, ctype=TEXT, content=bot #debug, from_user_id=@5cb59c41bbcaf32c0077b60f5507b3379f90af814f7e432a8f57c82d3237f0d2, from_user_nickname=LINK, to_user_id=filehelper, to_user_nickname=None, other_user_id=filehelper, other_user_nickname=None, is_group=False, is_at=False, actual_user_id=None, actual_user_nickname=None
[DEBUG][2023-04-15 05:33:26][chat_channel.py:282] - [WX] consume context: Context(type=TEXT, content=#debug, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e37130>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[DEBUG][2023-04-15 05:33:26][chat_channel.py:130] - [WX] ready to handle context: Context(type=TEXT, content=#debug, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e37130>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[DEBUG][2023-04-15 05:33:26][plugin_manager.py:157] - Plugin GODCMD triggered by event Event.ON_HANDLE_CONTEXT
[DEBUG][2023-04-15 05:33:26][godcmd.py:196] - [Godcmd] on_handle_context. content: #debug
[DEBUG][2023-04-15 05:33:26][godcmd.py:349] - [Godcmd] admin command: debug by filehelper
[DEBUG][2023-04-15 05:33:26][chat_channel.py:134] - [WX] ready to decorate reply: Reply(type=INFO, content=DEBUG模式已开启)
[DEBUG][2023-04-15 05:33:26][chat_channel.py:225] - [WX] ready to send reply: Reply(type=INFO, content=[INFO]
DEBUG模式已开启), context: Context(type=TEXT, content=#debug, kwargs={'isgroup': False, 'msg': <channel.wechat.wechat_message.WeChatMessage object at 0x7f3fe8e37130>, 'origin_ctype': <ContextType.TEXT: 1>, 'session_id': 'filehelper', 'receiver': 'filehelper'})
[INFO][2023-04-15 05:33:26][wechat_channel.py:167] - [WX] sendMsg=Reply(type=INFO, content=[INFO]
DEBUG模式已开启), receiver=filehelper
[DEBUG][2023-04-15 05:33:26][chat_channel.py:241] - Worker return success, session_id = filehelper