Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.99-fix 版代码 bug 专用 #26

Closed
SnapdragonLee opened this issue Mar 4, 2023 · 32 comments
Closed

v0.99-fix 版代码 bug 专用 #26

SnapdragonLee opened this issue Mar 4, 2023 · 32 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@SnapdragonLee
Copy link
Owner

SnapdragonLee commented Mar 4, 2023

v0.99-dev增加异步回复,多线程画图,以及修复了n多个bug,具体设置请参见 readme.md

由于v0.99-dev版本嵌入了线程与消息队列,难免会发生奇奇怪怪的bug。
命令行窗口是多线程打印信息,不专门找很难定位问题。所以当发生bug时,如果你可以trace数据流,那请你把这些珍贵的信息放在评论区;如果你不可以,那就把你遇到的现象放在这里也可以。

之前的bug issue也会在这里继续

@SnapdragonLee SnapdragonLee added bug Something isn't working documentation Improvements or additions to documentation labels Mar 4, 2023
@tommyxps
Copy link

tommyxps commented Mar 5, 2023

出现以下错误,字面理解是长时间没有输入导致无法连接 time out
gptchat vip 加拿大IP

ask:在么
Exception in thread Thread-5:
Traceback (most recent call last):
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connection.py", line 174, in _new_conn
conn = connection.create_connection(
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
raise err
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connection.py", line 186, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x00000219A086BF10>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\tommy\anaconda3\lib\site-packages\requests\adapters.py", line 489, in send
resp = conn.urlopen(
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='apps.openai.com', port=443): Max retries exceeded with url: /api/conversation (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000219A086BF10>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\tommy\anaconda3\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\multithread\threads.py", line 23, in run
item.play()
File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\basic\task.py", line 51, in play
for data in self.bot.ask(
File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\revChat\revChatGPT.py", line 178, in ask
response = self.session.post(
File "C:\Users\tommy\anaconda3\lib\site-packages\requests\sessions.py", line 635, in post
return self.request("POST", url, data=data, json=json, **kwargs)
File "C:\Users\tommy\anaconda3\lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\tommy\anaconda3\lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "C:\Users\tommy\anaconda3\lib\site-packages\requests\adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='apps.openai.com', port=443): Max retries exceeded with url: /api/conversation (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000219A086BF10>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

@SnapdragonLee
Copy link
Owner Author

出现以下错误,字面理解是长时间没有输入导致无法连接 time out

gptchat vip 加拿大IP

ask:在么

Exception in thread Thread-5:

Traceback (most recent call last):

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connection.py", line 174, in _new_conn

conn = connection.create_connection(

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection

raise err

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection

sock.connect(sa)

TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen

httplib_response = self._make_request(

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request

self._validate_conn(conn)

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn

conn.connect()

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connection.py", line 358, in connect

self.sock = conn = self._new_conn()

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connection.py", line 186, in _new_conn

raise NewConnectionError(

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x00000219A086BF10>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\tommy\anaconda3\lib\site-packages\requests\adapters.py", line 489, in send

resp = conn.urlopen(

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen

retries = retries.increment(

File "C:\Users\tommy\anaconda3\lib\site-packages\urllib3\util\retry.py", line 592, in increment

raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='apps.openai.com', port=443): Max retries exceeded with url: /api/conversation (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000219A086BF10>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "C:\Users\tommy\anaconda3\lib\threading.py", line 980, in _bootstrap_inner

self.run()

File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\multithread\threads.py", line 23, in run

item.play()

File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\basic\task.py", line 51, in play

for data in self.bot.ask(

File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\revChat\revChatGPT.py", line 178, in ask

response = self.session.post(

File "C:\Users\tommy\anaconda3\lib\site-packages\requests\sessions.py", line 635, in post

return self.request("POST", url, data=data, json=json, **kwargs)

File "C:\Users\tommy\anaconda3\lib\site-packages\requests\sessions.py", line 587, in request

resp = self.send(prep, **send_kwargs)

File "C:\Users\tommy\anaconda3\lib\site-packages\requests\sessions.py", line 701, in send

r = adapter.send(request, **kwargs)

File "C:\Users\tommy\anaconda3\lib\site-packages\requests\adapters.py", line 565, in send

raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='apps.openai.com', port=443): Max retries exceeded with url: /api/conversation (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000219A086BF10>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond'))

确实有过这种问题,但是不能稳定触发,回头我看看逆向API有没有其他的更新,我跟进一下

@lpflhh
Copy link

lpflhh commented Mar 5, 2023

大佬,v0.99 项目中 groupChatKey 如果设置为 @ai 似乎无效,在群聊中即使不加@ai 机器人也一并回复,对比了 0.98,似乎0.98没有这个问题

@SnapdragonLee
Copy link
Owner Author

大佬,v0.99 项目中 groupChatKey 如果设置为 @ai 似乎无效,在群聊中即使不加@ai 机器人也一并回复,对比了 0.98,似乎0.98没有这个问题

紧急修复了一版,你看看有没有解决问题

@lpflhh
Copy link

lpflhh commented Mar 5, 2023

大佬,v0.99 项目中 groupChatKey 如果设置为 @ai 似乎无效,在群聊中即使不加@ai 机器人也一并回复,对比了 0.98,似乎0.98没有这个问题

紧急修复了一版,你看看有没有解决问题

测试完毕,问题已完美修复

@SHEN2BAIYI
Copy link

大佬好,这个项目之前能用,然后我把这个项目放了一周,今天重新启动的时候不能使用了。我也更新了最新的代码,但是不能使用 chatGPT。我尝试更换session_token,发现这个参数在每次刷新网页后都会变换了,是不是被封锁了什么的

出现如下错误:
`Traceback (most recent call last):
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 175, in _new_conn
(self._dns_host, self.port), self.timeout, **extra_kw
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection
raise err
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection
sock.connect(sa)
TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 710, in urlopen
chunked=chunked,
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn
conn.connect()
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 358, in connect
self.sock = conn = self._new_conn()
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 187, in _new_conn
self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\adapters.py", line 499, in send
timeout=timeout,
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 788, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/session (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 451, in
main(configure())
File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 385, in main
parent_id=config.get("parent_id"),
File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 68, in init
self.__check_credentials()
File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 81, in __check_credentials
self.login()
File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 111, in login
auth.get_access_token()
File "D:\Anaconda\envs\chatBot\lib\site-packages\OpenAIAuth.py", line 315, in get_access_token
"https://explorer.api.openai.com/api/auth/session",
File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\adapters.py", line 565, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/session (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))
`

@SnapdragonLee
Copy link
Owner Author

大佬好,这个项目之前能用,然后我把这个项目放了一周,今天重新启动的时候不能使用了。我也更新了最新的代码,但是不能使用 chatGPT。我尝试更换session_token,发现这个参数在每次刷新网页后都会变换了,是不是被封锁了什么的

出现如下错误:

`Traceback (most recent call last):

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 175, in _new_conn

(self._dns_host, self.port), self.timeout, **extra_kw

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection

raise err

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection

sock.connect(sa)

TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 710, in urlopen

chunked=chunked,

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request

self._validate_conn(conn)

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn

conn.connect()

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 358, in connect

self.sock = conn = self._new_conn()

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 187, in _new_conn

self, "Failed to establish a new connection: %s" % e

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\adapters.py", line 499, in send

timeout=timeout,

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 788, in urlopen

method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\retry.py", line 592, in increment

raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/session (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 451, in

main(configure())

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 385, in main

parent_id=config.get("parent_id"),

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 68, in init

self.__check_credentials()

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 81, in __check_credentials

self.login()

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 111, in login

auth.get_access_token()

File "D:\Anaconda\envs\chatBot\lib\site-packages\OpenAIAuth.py", line 315, in get_access_token

"https://explorer.api.openai.com/api/auth/session",

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 600, in get

return self.request("GET", url, **kwargs)

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 587, in request

resp = self.send(prep, **send_kwargs)

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 701, in send

r = adapter.send(request, **kwargs)

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\adapters.py", line 565, in send

raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/session (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))

`

OK 我大概明白是什么问题了,你这个并发量大概是个什么水平,是保证一直都有问答进行嘛

@SHEN2BAIYI
Copy link

大佬好,这个项目之前能用,然后我把这个项目放了一周,今天重新启动的时候不能使用了。我也更新了最新的代码,但是不能使用 chatGPT。我尝试更换session_token,发现这个参数在每次刷新网页后都会变换了,是不是被封锁了什么的
出现如下错误:
`Traceback (most recent call last):
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 175, in _new_conn

(self._dns_host, self.port), self.timeout, **extra_kw

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\connection.py", line 95, in create_connection

raise err

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\connection.py", line 85, in create_connection

sock.connect(sa)

TimeoutError: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 710, in urlopen

chunked=chunked,

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 386, in _make_request

self._validate_conn(conn)

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 1042, in _validate_conn

conn.connect()

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 358, in connect

self.sock = conn = self._new_conn()

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connection.py", line 187, in _new_conn

self, "Failed to establish a new connection: %s" % e

urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\adapters.py", line 499, in send

timeout=timeout,

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\connectionpool.py", line 788, in urlopen

method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]

File "D:\Anaconda\envs\chatBot\lib\site-packages\urllib3\util\retry.py", line 592, in increment

raise MaxRetryError(_pool, url, error or ResponseError(cause))

urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/session (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 451, in

main(configure())

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 385, in main

parent_id=config.get("parent_id"),

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 68, in init

self.__check_credentials()

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 81, in __check_credentials

self.login()

File "E:/pythonProject/ChatBot/utils/revChat/test.py", line 111, in login

auth.get_access_token()

File "D:\Anaconda\envs\chatBot\lib\site-packages\OpenAIAuth.py", line 315, in get_access_token

"https://explorer.api.openai.com/api/auth/session",

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 600, in get

return self.request("GET", url, **kwargs)

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 587, in request

resp = self.send(prep, **send_kwargs)

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\sessions.py", line 701, in send

r = adapter.send(request, **kwargs)

File "D:\Anaconda\envs\chatBot\lib\site-packages\requests\adapters.py", line 565, in send

raise ConnectionError(e, request=request)

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='explorer.api.openai.com', port=443): Max retries exceeded with url: /api/auth/session (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x0000017DE4CB9288>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))
`

OK 我大概明白是什么问题了,你这个并发量大概是个什么水平,是保证一直都有问答进行嘛

没有一直问答进行,在上次问题解决过后,我就暂停项目了。偶尔去网页上使用,今天打开就出现这个问题,并且我重新创建了一个账号依旧是同样的问题。

@SnapdragonLee
Copy link
Owner Author

@SHEN2BAIYI 暂时没办法复现这个问题,可能帮不到你。
如果上来都登录不上去,很有可能是你的代理、全局模式有问题,也可能这个ip被ban了,需要换一个ip

如果上来可以登录,那我就没有办法了,逆向工程的API与网页端一样,有时候难免出现一两个错误

@SHEN2BAIYI
Copy link

@SHEN2BAIYI 暂时没办法复现这个问题,可能帮不到你。 如果上来都登录不上去,很有可能是你的代理、全局模式有问题,也可能这个ip被ban了,需要换一个ip

如果上来可以登录,那我就没有办法了,逆向工程的API与网页端一样,有时候难免出现一两个错误

好的,我不知道是账号还是ip被封了,我能够使用VPN登录网页版,但是不能使用项目。我之后尝试使用新的网络,机器和账号再尝试一遍。不行的话,我再尝试一下改变代理。感谢大佬

@SHEN2BAIYI
Copy link

@SHEN2BAIYI 暂时没办法复现这个问题,可能帮不到你。 如果上来都登录不上去,很有可能是你的代理、全局模式有问题,也可能这个ip被ban了,需要换一个ip
如果上来可以登录,那我就没有办法了,逆向工程的API与网页端一样,有时候难免出现一两个错误

好的,我不知道是账号还是ip被封了,我能够使用VPN登录网页版,但是不能使用项目。我之后尝试使用新的网络,机器和账号再尝试一遍。不行的话,我再尝试一下改变代理。感谢大佬

我发现在issue中,已经有两三个出现这种问题了。有一个是改变全局代理修复的,还有一个是这个issue最上面的那个发言,他也是这个问题。

@tommyxps
Copy link

tommyxps commented Mar 6, 2023

有一个新的issue,trigger word 可以正确触发,但是有时会嵌入在问句之中,造成AI confuse,比如

ask:小明 报告一下
reply: 很抱歉,作为一个 AI 语言模型,我并不知道 "小明" 的报告内容。如果您能提供更多信息,我将尽力为您提供帮助。

ask 后面应该只提交 报告一下

用的是最新的0.99版,紧急修改之后的

@SnapdragonLee
Copy link
Owner Author

有一个新的issue,trigger word 可以正确触发,但是有时会嵌入在问句之中,造成AI confuse,比如

ask:小明 报告一下 reply: 很抱歉,作为一个 AI 语言模型,我并不知道 "小明" 的报告内容。如果您能提供更多信息,我将尽力为您提供帮助。

ask 后面应该只提交 报告一下

用的是最新的0.99版,紧急修改之后的

这个有时是指稳定触发嘛还是说特定情况触发之类的

@SnapdragonLee
Copy link
Owner Author

SnapdragonLee commented Mar 6, 2023

@SHEN2BAIYI 是的,这个问题你可以去 https://github.com/acheong08/ChatGPT 看看什么情况
那里关于这个问题的issue可能会更多一些

@tommyxps
Copy link

tommyxps commented Mar 6, 2023

目前是稳定触发 但不影响使用 比如 我把触发词改为“@小聪明” (小聪明是bot的名字),chatgpt 又好像能自动忽略 只回答后面问题,但是实际上是提交上去了,如下,明显@小聪明是问题一部分

ask:@小聪明 如何制作三明治
send: b'\x89\x80\xdc\x80\xb9\x8e'
reply: 制作三明治非常简单,只需要几步就可以了。下面是一份基本的三明治食谱:

  1. 准备食材:面包、黄油、肉类(如培根、火腿)、生菜、番茄、芝士等。

  2. 切面包:将面包切成适合吃的大小。

  3. 烤面包:在面包上涂一层黄油,放入烤箱烤5-7分钟,直到面包变得轻轻酥脆。

  4. 准备馅料:将肉类煎熟,切成小块;番茄切成薄片;生菜洗净;芝士切成薄片。

  5. 装馅:将烤好的面包一分为二,放入馅料,如肉类、生菜、番茄、芝士等。

  6. 合拢:将两片面包夹紧,把三明治装盒。

  7. 烤:将三明治再放入烤箱烤5-7分钟,直到芝士融化即可。

@tommyxps
Copy link

tommyxps commented Mar 6, 2023

加上config

{
"server_host": "127.0.0.1:5555",

"autoReply": true,

"groupChatKey": "@小聪明",
"grpReplyMode": true,
"grpCitationMode": true,
"privateChatKey": "",
"prvReplyMode": true,
"prvCitationMode": false,

"stableDiffRly": false,
"groupImgKey": "-tupian",
"privateImgKey": "-tupian",
"isCached": true,

"helpKey": "-hhh",
"resetChatKey": "-rs",
"regenerateKey": "-rg",
"rollbackKey": "-rb"
}

@SnapdragonLee
Copy link
Owner Author

@tommyxps 不出意外已经修复,请更新一下代码,可以看下效果

@tommyxps
Copy link

tommyxps commented Mar 6, 2023

@tommyxps 不出意外已经修复,请更新一下代码,可以看下效果

已修复 感谢!

@tommyxps
Copy link

tommyxps commented Mar 6, 2023

大佬,出现新的 error message,应该是来自于官网的,但是机器人之后就不响应了,如下:
另外能否加一个error 的输出,如果出现error了,提示用“-rs”重置?

{"detail":"Only one message at a time. Please allow any other responses to complete before sending another message, or wait one minute."}
Exception in thread Thread-5:
Traceback (most recent call last):
File "C:\Users\tommy\anaconda3\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\multithread\threads.py", line 23, in run
item.play()
File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\basic\task.py", line 50, in play
for data in self.bot.ask(
File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\revChat\revChatGPT.py", line 184, in ask
self.__check_response(response)
File "C:\ChatGPT-weBot\ChatGPT-weBot-0.99-dev\revChat\revChatGPT.py", line 246, in __check_response
raise error
revChat.revChatGPT.Error

@SnapdragonLee
Copy link
Owner Author

@tommyxps
是的,这是我正在改的,估计会稍晚些搞定,这是我的业余项目,没有太多集中时间及时做结构性大的改动

@tommyxps
Copy link

tommyxps commented Mar 6, 2023

没问题 感谢!

@wushi565
Copy link

wushi565 commented Mar 7, 2023

我看到chatgpt官网已经返回了消息,但是程序上没有返回消息,并且报以下错误,并且输入-rs也没法重置上下文
Exception in thread Thread-5:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\urllib3\response.py", line 761, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\urllib3\response.py", line 444, in _error_catcher
yield
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\urllib3\response.py", line 828, in read_chunked
self._update_chunk_length()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\urllib3\response.py", line 765, in _update_chunk_length
raise InvalidChunkLength(self, line)
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 byte
s read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\requests\models.py", line 816, in generate
yield from self.raw.stream(chunk_size, decode_content=True)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\urllib3\response.py", line 624, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\urllib3\response.py", line 857, in read_chunked
self._original_response.close()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\contex
tlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\urllib3\response.py", line 461, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got le
ngth b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\thread
ing.py", line 973, in _bootstrap_inner
self.run()
File "C:\Users\Administrator\Desktop\ChatGPT-weBot-maste123r\ChatGPT-weBot-mas
ter\multithread\threads.py", line 23, in run
item.play()
File "C:\Users\Administrator\Desktop\ChatGPT-weBot-maste123r\ChatGPT-weBot-mas
ter\basic\task.py", line 50, in play
for data in self.bot.ask(
File "C:\Users\Administrator\Desktop\ChatGPT-weBot-maste123r\ChatGPT-weBot-mas
ter\revChat\revChatGPT.py", line 185, in ask
for line in response.iter_lines():
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\requests\models.py", line 865, in iter_lines
for chunk in self.iter_content(
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-p
ackages\requests\models.py", line 818, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLengt
h(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes rea
d))

@SnapdragonLee
Copy link
Owner Author

@wushi565 这就是所谓的,chunked error,不支持http 1.1握手,我也会不稳定触发这个问题

@formero009
Copy link

+1

@tiexo
Copy link

tiexo commented Mar 8, 2023

{"detail":"Hmm...something seems to have gone wrong. Maybe try me again in a little bit."}
Exception in thread Thread-5:
Traceback (most recent call last):
File "C:\Users\csai\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\Users\csai\Desktop\ChatGPT-weBot-0.99-dev\multithread\threads.py", line 23, in run
item.play()
File "C:\Users\csai\Desktop\ChatGPT-weBot-0.99-dev\basic\task.py", line 50, in play
for data in self.bot.ask(
File "C:\Users\csai\Desktop\ChatGPT-weBot-0.99-dev\revChat\revChatGPT.py", line 184, in ask
self.__check_response(response)
File "C:\Users\csai\Desktop\ChatGPT-weBot-0.99-dev\revChat\revChatGPT.py", line 246, in __check_response
raise error
revChat.revChatGPT.Error

请问这是啥问题,是代理问题吗
我挂的v2rayn,网页版是可以正常登录的
不管用不用代理,都没法提问了

@rogue-shadowdancer
Copy link
Contributor

我也遇到这个问题,打印了一下错误代码是500。
image
错误信息如图,期间微信没有收到任何信息

@SnapdragonLee
Copy link
Owner Author

我也遇到这个问题,打印了一下错误代码是500。

image

错误信息如图,期间微信没有收到任何信息

两天以后会进行集中维护,这些错误我都会看到,谢谢大家支持

@SnapdragonLee
Copy link
Owner Author

SnapdragonLee commented Mar 8, 2023

@rogue-shadowdancer @tiexo
好的,已经观察到了,这两天我会试图定位问题,如果有新的错误或者自己有探索哪里出了问题,任何有用的信息都可以放在这里

@angwz
Copy link

angwz commented Mar 9, 2023

好的,大佬加油!!

@SnapdragonLee SnapdragonLee pinned this issue Mar 10, 2023
@SnapdragonLee SnapdragonLee changed the title v0.99-dev 版代码 bug 专用 v0.99-fix 版代码 bug 专用 Mar 10, 2023
@tiexo
Copy link

tiexo commented Mar 14, 2023

PS C:\Users\csai\Desktop\ChatGPT-weBot-0.99-dev> python main.py
<websocket._app.WebSocketApp object at 0x014B8250>
[WinError 10061] 由于目标计算机积极拒绝,无法连接。
<websocket._app.WebSocketApp object at 0x014B8250>
closed

这是啥问题,不能用了。

@SnapdragonLee
Copy link
Owner Author

我猜是你没有开启注入 @tiexo

@SnapdragonLee
Copy link
Owner Author

帖子转移到 v1.0版本的集中反馈,本帖子关闭 #50

@SnapdragonLee SnapdragonLee unpinned this issue Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

9 participants