Open lemyx opened 1 year ago
我刚刚试验了自己的,可以用。你的账号被封锁了吗?
我刚刚试验了自己的,可以用。你的账号被封锁了吗?
谢谢懒猫,我再申请一下新的key试试吧。
Wait ChatGPT...
Wrote /home/name/chatgpt/conversation/0003.chat
Wait ChatGPT...
[Mind-Wave] Traceback (most recent call last):
File "/home/name/.emacs.d/site-lisp/mind-wave/mind_wave.py", line 38, in wrapper
return func(*args, **kwargs)
File "/home/name/.emacs.d/site-lisp/mind-wave/mind_wave.py", line 130, in send_stream_request
response = openai.ChatCompletion.create(
File "/home/name/.local/lib/python3.10/site-packages/openai/api_resources/chat_completion.py", line 25, in create
return super().create(*args, **kwargs)
File "/home/name/.local/lib/python3.10/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/home/name/.local/lib/python3.10/site-packages/openai/api_requestor.py", line 216, in request
result = self.request_raw(
File "/home/name/.local/lib/python3.10/site-packages/openai/api_requestor.py", line 516, in request_raw
result = _thread_context.session.request(
File "/home/name/.local/lib/python3.10/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/home/name/.local/lib/python3.10/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/home/name/.local/lib/python3.10/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/home/name/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/home/name/.local/lib/python3.10/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1323, in _send_request
self.putheader(hdr, value)
File "/usr/lib/python3.10/http/client.py", line 1255, in putheader
values[i] = one_value.encode(’latin-1’)
UnicodeEncodeError: ’latin-1’ codec can’t encode characters in position 58-59: ordinal not in range(256)
换了个新 key,报了另外的错误 是在 Ubuntu 上测试的
pip install --upgrade openai requests
升级一下看看?
我没有遇到过这个编码错误。 ;)
向 ChatGPT 发去问题,得到报错:
这个 sk- 开头的 API key 在 Chrome 的 ChatHub 插件是能用的,应该能排除 key 过期的问题