refactor(core): Convert tiktoken file loading to async (#18756)

This commit is contained in:
jeanpaul
2025-08-25 20:33:38 +02:00
committed by GitHub
parent fd12b3d5ce
commit e233dfa4a2
4 changed files with 37 additions and 37 deletions

View File

@@ -136,7 +136,7 @@ export async function estimateTokensFromStringList(
return 0;
}
const encoder = encodingForModel(model);
const encoder = await encodingForModel(model);
const encodedListLength = await Promise.all(
list.map(async (text) => {
try {