Giter Club home page Giter Club logo

Comments (4)

songquanpeng avatar songquanpeng commented on May 24, 2024

我记得是api要求这样的,我自己当然不想额外加这种判断,如果现在claude 的api情况变了请测试后反馈

from one-api.

bbb3n avatar bbb3n commented on May 24, 2024

我记得是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.

songquanpeng avatar songquanpeng commented on May 24, 2024

所以就像你说的,其他都会默认带,oneapi本身也只是提供一个默认值,也不会影响到这种会传递maxtokens的客户端。除此之外,openai格式并不要求,claude要求,那我理解oneapi需要去做这个兼容逻辑。当然,欢迎继续讨论。之后也可以考虑做一个开关让用户自己选择。

from one-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.