Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

禁止超额度使用 #52

Closed
18870 opened this issue May 10, 2023 · 2 comments
Closed

禁止超额度使用 #52

18870 opened this issue May 10, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@18870
Copy link

18870 commented May 10, 2023

像API2D一样禁止超限使用
提前根据请求的 max_token 判断额度是否足够

max_tokens:如果不指定,每次请求会预先冻结 模型支持的最大个数 Token,如果是 3.5 也就是 41P ,在请求完成后按 usage 字段多退少补。如果账户余额少于 41P 就会报错,此时可以指定 max_tokens,这样就会按 max_tokens 来冻结 - https://api2d.com/doc/doc

另外,考虑到 #53,GPT-4 应该按照补全(或最高的)的倍率冻结额度。

related issue #51

@songquanpeng
Copy link
Owner

Okay,之后搞一下

@songquanpeng songquanpeng added the enhancement New feature or request label May 10, 2023
@songquanpeng
Copy link
Owner

已经支持在后台设置预扣费的额度,该额度会乘上后台设置的不同模型的比率,算出实际上的预扣费额度。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants