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.
Related Issues (20)
- 图片生成dall-e-3巨大Bug!引发size not supported for this image model HOT 3
- 访问api/models接口404
- default用户可以调用到vip令牌 HOT 3
- 对接讯飞星火v3.5测试提示invalid auth HOT 1
- 新注册提示验证码过期或者错误
- SYNC_FREQUENCY not set, Redis is disabled
- 希望可以代理Mathpix接口
- 使用vllm离线运行本地大模型,建立one-api渠道,显示测试无法接通。 HOT 3
- Gemini-1.5-pro出错 HOT 2
- 希望增加 gemini-1.0-ultra-latest 模型的支持 HOT 2
- UX小建议 - 本地缓存下渠道排序 HOT 3
- 阿里的模型,导入成功测试成功,怎么使用聊天啊,虚心求教 HOT 3
- 使用Redis后,用户余额缓存问题。
- LLM api response empty HOT 3
- 希望增加通过自定义模型名来轮询不同的国内AI服务商 HOT 5
- openai和claude的参数兼容 HOT 2
- 请支持阿里千文的FUNCTION调用 HOT 1
- 对接sunoapi HOT 1
- how to fix: react must be in scope when using JSX issue
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.