Closed braco closed 1 year ago
Hi @braco!
Thank you for the report, it does seem like langchain keeps reinstatiating the encoder without freeing it. Will look into further into it after some time.
In general, langchain
will be fixed in https://github.com/hwchase17/langchainjs/pull/1239 by replacing WASM package with the JS port.
The note with .free()
still should be valid for the WASM package. Closing for now!
I'm running langchainjs with its default summarizer, in a loop over different documents. tiktoken seems to start producing this error at some point, and closing / reopening the process eliminates the error.
Also filed in langchainjs, not sure where the issue is: https://github.com/hwchase17/langchainjs/issues/1009