diff options
| author | sigoden <sigoden@gmail.com> | 2023-12-19 20:37:53 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-19 20:37:53 +0800 |
| commit | 6286251d320a7f512e49534c30b42452d30d93cc (patch) | |
| tree | d2c08ea4ff1f48042666624ebbb821e3136854c5 /src/utils/mod.rs | |
| parent | 3adfeb1ae7c22e54570df69053aa3db226733384 (diff) | |
| download | aichat-6286251d320a7f512e49534c30b42452d30d93cc.tar.gz | |
feat: support gemini (#273)
Diffstat (limited to 'src/utils/mod.rs')
| -rw-r--r-- | src/utils/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs index 8a80b23..bd9f381 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -94,4 +94,9 @@ mod tests { assert_eq!(tokenize("π hello world"), ["π", " hello", " world"]); assert_eq!(tokenize("δΈη"), ["δΈ", "η"]); } + + #[test] + fn test_count_tokens() { + assert_eq!(count_tokens("π hello world"), 4); + } } |
