fixes issue with Claude <EOT> token disallowed
This commit is contained in:
parent
c8d8e2e58f
commit
358339d48b
|
@ -22,6 +22,6 @@ export function getTokenCount(prompt: string, _model: string) {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
tokenizer: "@anthropic-ai/tokenizer",
|
tokenizer: "@anthropic-ai/tokenizer",
|
||||||
token_count: encoder.encode(prompt).length,
|
token_count: encoder.encode(prompt.normalize("NFKC"), "all").length,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue