mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Convert tiktoken file loading to async (#18756)
This commit is contained in:
@@ -51,7 +51,7 @@ export class TokenTextSplitter extends TextSplitter implements TokenTextSplitter
|
||||
|
||||
// Use tiktoken for normal text
|
||||
try {
|
||||
this.tokenizer ??= getEncoding(this.encodingName);
|
||||
this.tokenizer ??= await getEncoding(this.encodingName);
|
||||
|
||||
const splits: string[] = [];
|
||||
const input_ids = this.tokenizer.encode(text, this.allowedSpecial, this.disallowedSpecial);
|
||||
|
||||
Reference in New Issue
Block a user