Add benchmark reports and test results with metrics and visualizations
This commit is contained in:
1 parent
a6f82d5a0b
commit
1838c1d559
23 files changed
+1242
-187
No files matched your search
@@ -325,3 +325,9 @@ func (g *Generator) SelectPromptType() string {
|
||||
// 默认返回第一个类型
|
||||
return g.config.Requests[0].Type
|
||||
}
|
||||
|
||||
// CountTokens 返回字符串的 token 数
|
||||
func (g *Generator) CountTokens(s string) int {
|
||||
tokens := g.tokenizer.Encode(s, nil, nil)
|
||||
return len(tokens)
|
||||
}
|
||||
Reference in new issue
Block a user