juzeon / poe-openai-proxy

A wrapper that lets you use the reverse-engineered Python library poe-api library as if it was the OpenAI API for ChatGPT. You can connect your favorite OpenAI API based apps to this proxy and enjoy the ChatGPT API for free!
GNU General Public License v3.0
425 stars 98 forks source link

请问这个项目能正常运行吗?我搭建了无法正常返回 #1

Closed pizixi closed 1 year ago

pizixi commented 1 year ago

使用的是chatgpt-web项目,配置文件如下:(其中OPENAI_API_KEY乱写的)

# OpenAI API Key - https://platform.openai.com/overview
OPENAI_API_KEY=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

# change this to an `accessToken` extracted from the ChatGPT site's `https://chat.openai.com/api/auth/session` response
OPENAI_ACCESS_TOKEN=

# OpenAI API Base URL - https://api.openai.com
OPENAI_API_BASE_URL=http://192.168.1.130:3700

# OpenAI API Model - https://platform.openai.com/docs/models
OPENAI_API_MODEL=

# set `true` to disable OpenAI API debug log
OPENAI_API_DISABLE_DEBUG=

# Reverse Proxy - Available on accessToken
# Default: https://bypass.churchless.tech/api/conversation
# More: https://github.com/transitive-bullshit/chatgpt-api#reverse-proxy
API_REVERSE_PROXY=

# timeout
TIMEOUT_MS=100000

# Rate Limit
MAX_REQUEST_PER_HOUR=

# Secret key
AUTH_SECRET_KEY=

# Socks Proxy Host
SOCKS_PROXY_HOST=192.168.1.130

# Socks Proxy Port
SOCKS_PROXY_PORT=7788

# Socks Proxy Username
SOCKS_PROXY_USERNAME=

# Socks Proxy Password
SOCKS_PROXY_PASSWORD=

# HTTPS PROXY
HTTPS_PROXY=

python 日志如下: image

juzeon commented 1 year ago

poe.com 需要代理才可以连接,可以尝试部署到国外服务器。Windows上可以用proxifier,等等。

pizixi commented 1 year ago

本地能连poe,python日志也显示 Connected to poe successfully,这是网络问题吗

juzeon commented 1 year ago

我这边刚刚测试了一下接入chatgpt-web是可以的,可能是网络问题?我刚刚push了一个新版本可以设置proxy地址,你可以先试试。如果还是不行的话,可以方便贴一下Go后端的控制台输出吗?

pizixi commented 1 year ago

这个多了一个h吧 proxy = "socks5h://127.0.0.1:7890"

pizixi commented 1 year ago

好像还是不行 image image

pizixi commented 1 year ago

找到原因了,是我的chatgpt-web之前配的socks代理没删,之前访问openai的时候需要,现在是访问内网去掉就好了,感谢,可惜没有go的api,不然一套带走了

juzeon commented 1 year ago

好的👌