Hello, I'm a front-end engineer and I like to build anything.
- I am learning English.
- Usually use
React
, I also likeVue
. - Mail me at [email protected]
- ...
One-click deployment of the ChatGPT private proxy, power by Next.js
Hello, I'm a front-end engineer and I like to build anything.
React
, I also like Vue
.from pathlib import Path
from openai import OpenAI
# replace https://api.openai.com to access from china
base_url = "https://xxx.cc/proxy"
api_key = "sk-xxx"
client = OpenAI(
api_key=api_key,
base_url=base_url,
)
speech_file_path = Path(__file__).parent / "speech.mp3"
response = client.audio.speech.create(
model="tts-1",
voice="alloy",
input="Today is a wonderful day to build something people love!",
)
response.stream_to_file(speech_file_path)
print(f"Done! See {speech_file_path}")
报错
Traceback (most recent call last):
File "/Users/jackiexiao/code/openai_tts/demo_tts.py", line 17, in <module>
response = client.audio.speech.create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jackiexiao/anaconda3/lib/python3.11/site-packages/openai/resources/audio/speech.py", line 71, in create
return self._post(
^^^^^^^^^^^
File "/Users/jackiexiao/anaconda3/lib/python3.11/site-packages/openai/_base_client.py", line 1055, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jackiexiao/anaconda3/lib/python3.11/site-packages/openai/_base_client.py", line 834, in request
return self._request(
^^^^^^^^^^^^^^
File "/Users/jackiexiao/anaconda3/lib/python3.11/site-packages/openai/_base_client.py", line 877, in _request
raise self._make_status_error_from_response(err.response) from None
openai.NotFoundError: Error code: 404 - {'error': {'message': 'Invalid URL (POST /audio/speech)', 'type': 'invalid_request_error', 'param': None, 'code': None}}
docker,http可以访问,https无法访问,应该如何设置呢?
不想通过docker,如果手动部署的话,可以怎么操作呢?感谢
比如对于国外不能访问chat.openai.com的机房IP,需要在套一层cf warp吗
https://gpt-proxy.zeabur.app/
https://gpt-proxy.zeabur.app/proxy
例如在捷径里填入以上两个地址都不行。
有没有具体一点的配置
部署完后在哪里配置API?Variables?那key的名字是什么?
我已经生成了二级域名,但是打开后404
https://chat.openai.com/
这是聊天页面的域名。我替换为代理域名无法访问
ChatGPTUnofficialProxyAPI 使用非官方代理服务器访问 ChatGPT 的后端API,绕过Cloudflare(使用真实的的ChatGPT,非常轻量级,但依赖于第三方服务器,并且有速率限制)
SSE模式不生效,好像是完全没有接通;
使用是这样的:
原接口:https://api.openai.com/v1/chat/completions
那么非sse的就是:https://自定义的.zeabur.app/proxy/v1/chat/completions
这个是生效的
sse的是:https://自定义的.zeabur.app/proxy-sse/v1/chat/completions
但是这个是接不通的
这样就不会封号是吗?
因为之前用[Zeabur]这个已经取消了,所以在VPS上弄了一下。
运行都是正常运行的。
但是,很明显不支持SSE模式;无法像之前一样 一个字一个字的输出
因为我已经通过docker部署了chatgpt-web占用了3000端口,所以我修改了这个项目中的dockerfile文件里端口3000为2999。我运行docker run --name chatgpt-proxy -d -p 8000:2999 chatgpt-proxy ,部署成功了,但是http://193.32.150.247:8000/打不开。没有出来项目演示的界面。不知道问题出在哪里。
直接用openai的接口是逐个字输出的,用了代理之后,一段一段文字输出,没有打字机效果了
我在自己的服务器上部署了chatgpt代理,且服务器也已经有了clash代理服务,但是任然不起效果
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.