pengzhile / pandora Goto Github PK
View Code? Open in Web Editor NEW潘多拉,一个让你呼吸顺畅的ChatGPT。Pandora, a ChatGPT that helps you breathe smoothly.
Home Page: https://chat.zhile.io
License: GNU General Public License v2.0
潘多拉,一个让你呼吸顺畅的ChatGPT。Pandora, a ChatGPT that helps you breathe smoothly.
Home Page: https://chat.zhile.io
License: GNU General Public License v2.0
用Nginx 非443端口https反代 pandora,发现浏览器获取chat历史记录的时候一直请求443端口,导致失败,并且也无法进行交互操作。
❯ pandora
Pandora - A command-line interface to ChatGPT
Github: https://github.com/pengzhile/pandora
A saved access token has been detected. Do you want to use it? [y/n/del] (n): y
==================== New Chat ====================
Double enter to send. Type /? for help.
You:
你好
ChatGPT:
CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')]
感谢大佬修复bug!目前来看登录, 好像还需要自己手动登录
现在如果 -s 指定了 127.0.0.1:3100 在访问 3100 的 web 页面的时候, 请求也是 http://127.0.0.1:3100
官方抽风了,淡定。
-e PANDORA_CLOUD=cloud
设置环境变量是使用该命令吗
感谢大佬提供的第三方代理,这个代理是否有速率限制呢?
version: '3.3'
services:
pandora:
image: pengzhile/pandora
container_name: pandoraGPT
#这里host模式是为用本机设置的cf-warp代理
network_mode: host
volumes:
- ./data:/data
environment:
- PANDORA_SERVER=0.0.0.0:23460
- PANDORA_PROXY=socks5://127.0.0.1:40000
- PANDORA_ACCESS_TOKEN={获取的accessToken}
- PANDORA_API=true
restart: unless-stopped
大佬您好,接口好像404了
Sentry Issue: PANDORA-Z
ConnectionResetError: [WinError 10054] 远程主机强迫关闭了一个现有的连接。
(3 additional frame(s) were not displayed)
...
File "urllib3\util\ssl_.py", line 449, in ssl_wrap_socket
ssl_sock = _ssl_wrap_socket_impl(
File "urllib3\util\ssl_.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "ssl.py", line 513, in wrap_socket
return self.sslsocket_class._create(
File "ssl.py", line 1071, in _create
self.do_handshake()
File "ssl.py", line 1342, in do_handshake
self._sslobj.do_handshake()
MaxRetryError: HTTPSConnectionPool(host='apps.openai.com', port=443): Max retries exceeded with url: /api/conversations?offset=0&limit=20 (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)))
File "requests\adapters.py", line 489, in send
resp = conn.urlopen(
File "urllib3\connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "urllib3\util\retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
ProxyError: HTTPSConnectionPool(host='apps.openai.com', port=443): Max retries exceeded with url: /api/conversations?offset=0&limit=20 (Caused by ProxyError('Cannot connect to proxy.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None)))
(4 additional frame(s) were not displayed)
...
File "pandora\openai\api.py", line 131, in list_conversations
resp = self.session.get(url=url, headers=self.basic_headers, **self.req_kwargs)
File "requests\sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "requests\sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "requests\adapters.py", line 559, in send
raise ProxyError(e, request=request)
When calling the api of GPT, it is not accessing the official api of openai, but the author's proxy domain (chat.gateway.do)
More information in the source code
pandora/src/pandora/openai/api.py
Lines 109 to 119 in 4313154
Please ask anyone using the interface to cancel the token and regenerate it, and hopefully the author will provide the option for users to decide whether to use your interface or not.
看代码是build之后的文件,有没有源码的仓库方便提供一下呢
抓包还要登录,能否直接把账号密码写到docker环境变量里。
感谢作者开源如此优秀的作品!server版web页面,左边聊天列表点选切换会话后,黑暗/明亮模式切换按钮会消失,大佬抽空能看看么
目前数据存储在内存中,服务重启就丢失。
使用了api key,使用了大概两分钟,没有使用代理。
This key is associated with a deactivated account. If you feel this is an error, contact us through our help center at help.openai.com.
An error occurred. If this issue persists please contact us through our help center at help.openai.com.
我是想在群晖的docker中部署,但是这教程太简陋了,完全无从下手
Pandora - A command-line interface to ChatGPT
Github: https://github.com/pengzhile/pandora
Version: 0.2.9
Do you want to save your access token for the next login? [y/n] (n): y
### Error occurred: list conversations failed: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
Hello I've been using this fantastic tools to connect to ChatGPT for a few days. However when I'm doing upgrade operation for it to version 0.6.3 I got this error:
pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: '0.23ubuntu1' (package: distro-info)
How to solve this?
I'm using Ubuntu20.4 and python 3.8.10
Docker 版本号: 20.10.21
docker build -t pandora . 构建成功
问题描述: 使用浏览器访问 chat.openai.com 是正常的, 通过 Docker 容器运行后提示 Max retries exceeded with url.
# docker run -it --rm pandora --token_file /opt/app/token.txt --proxy http://172.25.64.1:7890 -v
Pandora - A command-line interface to ChatGPT
Github: https://github.com/pengzhile/pandora
Do you want to save your access token for the next login? [y/n] (n): y
The access token has been saved to the file:
/root/.config/Pandora-ChatGPT/access_token.dat
/api/conversations?offset=0&limit=20 (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error')))
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3-1.26.14-py3.7.egg/urllib3/connectionpool.py", line 700, in urlopen
self.prepare_proxy(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3-1.26.14-py3.7.egg/urllib3/connectionpool.py", line 996, in prepare_proxy
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3-1.26.14-py3.7.egg/urllib3/connection.py", line 424, in connect
tls_in_tls=tls_in_tls,
File "/usr/local/lib/python3.7/site-packages/urllib3-1.26.14-py3.7.egg/urllib3/util/ssl.py", line 450, in ssl_wrap_socket
sock, context, tls_in_tls, server_hostname=server_hostname
File "/usr/local/lib/python3.7/site-packages/urllib3-1.26.14-py3.7.egg/urllib3/util/ssl.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python3.7/ssl.py", line 423, in wrap_socket
session=session
File "/usr/local/lib/python3.7/ssl.py", line 870, in _create
self.do_handshake()
File "/usr/local/lib/python3.7/ssl.py", line 1139, in do_handshake
self._sslobj.do_handshake()
OSError: [Errno 0] Error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/requests-2.28.2-py3.7.egg/requests/adapters.py", line 499, in send
timeout=timeout,
File "/usr/local/lib/python3.7/site-packages/urllib3-1.26.14-py3.7.egg/urllib3/connectionpool.py", line 788, in urlopen
method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
File "/usr/local/lib/python3.7/site-packages/urllib3-1.26.14-py3.7.egg/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/conversations?offset=0&limit=20 (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/Pandora_ChatGPT-0.1.2-py3.7.egg/pandora/launcher.py", line 129, in run
main()
File "/usr/local/lib/python3.7/site-packages/Pandora_ChatGPT-0.1.2-py3.7.egg/pandora/launcher.py", line 124, in main
ChatBot(ChatGPT(access_token, args.proxy)).run()
File "/usr/local/lib/python3.7/site-packages/Pandora_ChatGPT-0.1.2-py3.7.egg/pandora/openai/bot.py", line 39, in run
conversation_base = self.__choice_conversation()
File "/usr/local/lib/python3.7/site-packages/Pandora_ChatGPT-0.1.2-py3.7.egg/pandora/openai/bot.py", line 262, in
__choice_conversation
conversations = self.chatgpt.list_conversations((page - 1) * page_size, page_size)
File "/usr/local/lib/python3.7/site-packages/Pandora_ChatGPT-0.1.2-py3.7.egg/pandora/openai/api.py", line 44, in
list_conversations
resp = self.session.get(url=url, headers=self.basic_headers, allow_redirects=False, timeout=100)
File "/usr/local/lib/python3.7/site-packages/requests-2.28.2-py3.7.egg/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests-2.28.2-py3.7.egg/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests-2.28.2-py3.7.egg/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests-2.28.2-py3.7.egg/requests/adapters.py", line 559, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='apps.openai.com', port=443): Max retries exceeded with url:
/api/conversations?offset=0&limit=20 (Caused by ProxyError('Cannot connect to proxy.', OSError(0, 'Error')))
Sentry Issue: PANDORA-Y
Exception: list models failed: <html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
(1 additional frame(s) were not displayed)
...
File "pandora\launcher.py", line 167, in main
ChatBotLegacy(chatgpt).run()
File "pandora\bots\legacy.py", line 45, in run
self.__new_conversation()
File "pandora\bots\legacy.py", line 171, in __new_conversation
self.state = State(model_slug=self.__choice_model()['slug'])
File "pandora\bots\legacy.py", line 403, in __choice_model
models = self.chatgpt.list_models()
File "pandora\openai\api.py", line 120, in list_models
raise Exception('list models failed: ' + self.__get_error(resp))
Version: 0.6.9, Mode: cli, Engine: free
偶然重命名标题失败,两次全新会话,内容一样,一次重命名失败,一次成功。
### Error occurred: gen title failed: Hmm...something seems to have gone wrong.
Maybe try me again in a little bit.
File "/usr/local/python3/tutorial-env/bin/pandora", line 33, in
sys.exit(load_entry_point('Pandora-ChatGPT==0.6.11', 'console_scripts', 'pandora')())
File "/usr/local/python3/tutorial-env/bin/pandora", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/local/python3/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/usr/local/python3/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/local/python3/tutorial-env/lib/python3.8/site-packages/pandora/launcher.py", line 28, in
readline.set_auto_history(False)
AttributeError: module 'readline' has no attribute 'set_auto_history'
有人碰到过吗,windows下可以,linux下就报上面的错
网页端是可以修改提问然后重新生成的
比如提问内容有错字或者容易误解的内容之类的,可以进行修改然后重新生成回答
你好,我想在1个主机上面同时部署多个服务,需要映射不同端口,但我尝试 -e PANDORA_SERVER=0.0.0.0:8028 ... -p 8028:8008 这个启动命令,无法访问服务。只有映射默认的8008才好用。请问如何在一台机器上改不同实例的默认启动端口呢?
我这访问都是404了
出现一个奇怪的问题,就是copy code的按钮点击无反应,换过多个浏览器均一样,也没有错误日志
Version: 0.6.9, Mode: cli, Engine: free
A saved access token has been detected. Do you want to use it? [y/n/del] (y):
Choice conversation (Page 1):
1. New chat
t?. Set title for the conversation, eg: t1
d?. Delete the conversation, eg: d1
dd. !! Clear all conversations
r. Refresh conversation list
c. ** Start new chat
Your choice: c
Choice model:
1. Turbo (Default for free users) - The standard ChatGPT model
2. Turbo (Default for free users) - The standard ChatGPT model
r. Refresh model list
Your choice: 1
这个插件可以配置API URL和API URL 路径,是否可以通过修改这些参数来使用?
chrome商店地址:https://chrome.google.com/webstore/detail/openai-translator/ogjibjphoadhljaoicdnjnmgokohngcc
调试到 __part_six() 这一步提示 404,未返回期望的 200
请教下是因为什么?
你好:
使用pip安装的时候,报错
" Could not find a version that satisfies the requirement pandora-tiktoken~=0.3.1 (from Pandora-ChatGPT==0.6.10) (from versions:)
No matching distribution found for pandora-tiktoken~=0.3.1 (from Pandora-ChatGPT==0.6.10)"
切换清华和阿里的源还是同样的报错,怎么解决呢?万分感谢
提示同时只能有一个会话,说明点停止并没有把前一个停掉
我按照教程安装完成之后,在cmd命令行输入pandora,提示我‘不是内部或外部命令’,是需要在添加环境变量吗?如果需要添加该怎么加呢?
Was it with subfinder
or through some other sort of leak?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.