No project description provided
Project description
Openai forwarding agent
openai 接口转发服务.
用途:
解决国内无法直接访问openai的问题,将该服务部署在海外服务器上,通过该服务转发openai的请求。即搭建反向代理服务
服务部署
方式一: 使用 pip
Install
pip install openai-forward
Run
openai_forward run --port 8000 --worders=1
方式二: 使用Docker compose
下载项目根目录下的docker-compose.yaml
文件,然后在文件路径下执行以下命令即可。
docker-compose up -d
服务调用
替换openai的api地址为该服务的地址即可,如:
https://api.openai.com/v1/chat/completions
替换为
http://{服务器ip}:8000/v1/chat/completions
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
openai_forward-0.0.1.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for openai_forward-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26d7d00157d1ae72094ee4d14b9ff0aece4393ede08019d53731e22e84e1dc28 |
|
MD5 | 03b47c4927c44cd8363ca3359a10678c |
|
BLAKE2b-256 | 3d2dd769caf93fea6d1a2b313273b54252ed8564333be87531ba514b665feee6 |