Comments (4)
我记得是api要求这样的,我自己当然不想额外加这种判断,如果现在claude 的api情况变了请测试后反馈
from one-api.
我记得是api要求这样的,我自己当然不想额外加这种判断,如果现在claude 的api情况变了请测试后反馈
您好像没有理解我的意思。
claude 是这么要求了,我的意思是不管官方有没有要求,带不带 max_tokens 都不应该由 one-api 这种中转系统来考虑
即,one-api不应该在 客户端请求体中 没带 max_tokens 时,默认带一个 4096 的参数,这是毫无意义的。
除非你是为了适配 next-chat 这种由于作者个人意图删除掉 max_tokens 参数的客户端
其他开源/闭源客户端都会传 max_tokens 参数,所以 one-api 不需要且没必要考虑 请求体带没带 max_tokens
说实话,我为什么要说这个,因为我认为这样导致了一种 " 误解 " ,即官方允许不带 max_tokens ,这是不好的
from one-api.
所以就像你说的,其他都会默认带,oneapi本身也只是提供一个默认值,也不会影响到这种会传递maxtokens的客户端。除此之外,openai格式并不要求,claude要求,那我理解oneapi需要去做这个兼容逻辑。当然,欢迎继续讨论。之后也可以考虑做一个开关让用户自己选择。
from one-api.
个人建议:
- 如果one-api只是一个单纯的转发系统,就原封不动的做mapping转发出去即可;
- 但是目前的one-api并不是这样的定位,更多的还是一个分发系统,项目介绍中也多次出现“分发”、“分发管理key”,因此就需要一些“防呆”机制在一定程度上提高系统的兼容性和易用性;
综上,我认为此功能有必要保留,以防误解在文档中加入简单的说明即可。
from one-api.
Related Issues (20)
- 功能:需要支持内容审计,将外发及AI响应的内容记录下来 HOT 8
- 用docker离线部署时,总是访问下载cl100k_base.tiktoken HOT 1
- 部署之后报错,不知道啥意思,请各位大佬看看啥问题 HOT 2
- 登录报错:无法保存会话信息,请重试
- 关于主题引入的问题 HOT 1
- 升级 0.66 版本后,berry主题首页控制台报错(图表无法加载) HOT 2
- 部署新版本后怎样加入原版本的配置? HOT 2
- 通义千问空请求. HOT 2
- 星火认知Lite 报错 HOT 4
- Zhipu 渠道 glm-4 模型,流式回答被截断
- 腾讯的混元模型 API 接口更新了 HOT 2
- 高并发下出现bug,导致程序崩溃
- 不支持dify HOT 1
- 流输出无法正确报错
- zeabur部署最新版报错 HOT 2
- 星火认知大模型的Spark Lite模型支持 HOT 8
- 增加 coze bot api的请求接口 HOT 2
- 讯飞星火大模型一直报websocket:bad handshake HOT 3
- 本地部署不能调用 HOT 1
- cannot unmarshal object into Go struct field ChatCompletion.tool_choice of type string
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 one-api.