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

GPT-4 提示和补全的倍率分层 #53

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

GPT-4 提示和补全的倍率分层 #53

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

Comments

@18870
Copy link

18870 commented May 10, 2023

补全的价格是提示的两倍,但是现在实际计算的时候是按照 tokens 的总和扣除额度

  "usage": {
    "completion_tokens": 13,
    "prompt_tokens": 17,
    "total_tokens": 30
  }

目前倍率设置为15的情况下,扣除了450额度
正确的情况是扣除 (17+13*2)*15=645

或者提示和补全可以分别自定义倍率

@songquanpeng
Copy link
Owner

Okay,主要是不同模型 token 消耗计算方式不一样,为了省事这样搞的。

我先想一想怎么处理比较方便。

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

已修复,已推送 v0.2.2,期待测试反馈。

k8scat pushed a commit to k8scat/one-api that referenced this issue Jun 7, 2024
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