Comments (2)
Bot detected the issue body's language is not English, translate it automatically.
Title: I hope to add an option to disable the model, because gpt4 is too expensive and does not want to be called by users in some situations.
Checklist
- I believe this idea is great and will make the framework better
- I have searched for similar requests in the issue, including closed requests
A detailed description
I hope to add an option to disable the model, because gpt4 is too expensive and does not want to be called by users in some situations.
from openai-forward.
这个选项也许将来会考虑与forward_key结合起来,为不同的forward_key分配不同的权限;但实现日期无法确定 ¯_(ツ)_/¯
如果你希望现在就实现一个简易版本的禁用选项,可以在这里:
openai-forward/openai_forward/forward/base.py
Lines 471 to 473 in 4d26d6d
接在这后面,添加对model名称的判断,大概这样:
if valid_payload:
if payload_info['model'].startswith("gpt-4"):
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"model_not_found",
)
v0.7.0版本后已实现对不同的key的权限控制。
from openai-forward.
Related Issues (20)
- 如果我想二次转发,我应该配置哪里? HOT 5
- Feat: Supports the latest `/v1/chat/completion` routing HOT 2
- Feat: Convert local model output to OpenAI API format
- 429 Too Many Requests HOT 1
- Update docs HOT 3
- 现在cf render vercel 部署后访问都是404 HOT 1
- 使用gpt4,不使用流式返回,提交长文本之后,会返回(504 Gateway Time-out),代码把httpx超时和转发的超时都设置成120也不管用 HOT 34
- 能否实现按照 model 进行区分 HOT 5
- 请问可否在启动命令中增加port和webui port的设置 HOT 8
- 根据Forward key限制模型访问未生效 HOT 3
- Render部署失败 HOT 3
- 想知道什么样的服务器做中转速度才能快呢,能添加一些测试服务器是否适合的功能吗. HOT 2
- 没办法实现流式 HOT 1
- pip安装的0.7.2启动失败 HOT 3
- env中部分配置不生效
- webui 无法保存设置 HOT 2
- 经常模型奇妙的崩溃 HOT 2
- TOKEN_RATE_LIMIT 配置报错TypeError: string indices must be integers HOT 3
- 我想请问提供的地址可以直接使用吗? HOT 1
- 405 Method Not Allowed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openai-forward.