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

支持基础的标记计数 #55

Merged
merged 1 commit into from
Jul 11, 2024
Merged

支持基础的标记计数 #55

merged 1 commit into from
Jul 11, 2024

Conversation

Richasy
Copy link
Owner

@Richasy Richasy commented Jul 11, 2024

Close #53

描述

借助 Tiktoken 实现基础的标记计数(估计值)

image

PR 类型

这个 PR 的目的是什么?

  • 功能

PR 检查清单

请检查你的 PR 是否满足以下要求:

  • 应用成功启动
  • 文件头已经被添加至所有源文件中
  • 包含破坏式更新

备注

每个服务基本都会返回真实的标记消耗,但并不适合对输入/系统指令等内容的实时计数,所以还是换用近似计数,比较方便

@Richasy Richasy added the enhancement New feature or request label Jul 11, 2024
@Richasy Richasy merged commit f97f001 into main Jul 11, 2024
1 check passed
@Richasy Richasy deleted the richasy/tokenCounter branch July 11, 2024 14:06
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

Successfully merging this pull request may close these issues.

[Feature] 增加当前对话轮次和会话的token消耗统计
1 participant