KenyonY / openai-forward

🚀 大语言模型高效转发服务 · An efficient forwarding service designed for LLMs. · OpenAI API Reverse Proxy
https://api.openai-forward.com
MIT License
839 stars 288 forks source link

如果我想二次转发,我应该配置哪里? #101

Closed IAmKongHai closed 11 months ago

IAmKongHai commented 11 months ago

Checklist

详细描述

如果我不想直连 https://api.openai.com ,比如我想链接到 api.openai-forward.com 二次转发,我应该修改哪里?好像要改的地方很多,我都改 ,但是没生效

IAmKongHai commented 11 months ago

希望能改成有一个统一配置的地方

KenyonY commented 11 months ago

直接修改环境变量或.env文件中 OPENAI_BASE_URL=https://api.openai-forward.com 就可以。

IAmKongHai commented 11 months ago

直接修改环境变量或.env文件中 OPENAI_BASE_URL=https://api.openai-forward.com 就可以。

我已经修改了,不行。 我还在 settings.py 里面找到:第 26行: OPENAI_BASE_URL = env2list("OPENAI_BASE_URL", sep=ENV_VAR_SEP) or [ "https://api.openai.com" ] 我把这个也改了试试

IAmKongHai commented 11 months ago

现在报这个错了

Error 1101 Ray ID: 8389dc9e2f141668 • 2023-12-20 18:13:52 UTC Worker threw exception What happened? You've requested a page on a website (openai.wndbac.cn) that is on the Cloudflare network. An unknown error occurred while rendering the page.

What can I do? If you are the owner of this website: you should login to Cloudflare and check the error logs for openai.wndbac.cn.

IAmKongHai commented 11 months ago

二次转发的地址改成这个可以了:https://api.openai-forward.com