Open sshadmand opened 1 year ago
Package installed
"dependencies": { ... "gpt-3-encoder": "^1.1.3", ... }
When ran
ReferenceError: TextEncoder is not defined at Object.<anonymous> (node_modules/gpt-3-encoder/Encoder.js:21:21)
Which references: https://github.com/latitudegames/GPT-3-Encoder/blob/master/Encoder.js#L21
Suggestion: Potentially allow pass in for TextEncoder or change to NodeJS reco:
var util = require('util'); let encoder = new util.TextEncoder(); let uint8Array = encoder.encode("Hello"); console.log(uint8Array);
NodeJS compatible fork PR here: https://github.com/latitudegames/GPT-3-Encoder/pull/16
Package installed
When ran
Which references: https://github.com/latitudegames/GPT-3-Encoder/blob/master/Encoder.js#L21
Suggestion: Potentially allow pass in for TextEncoder or change to NodeJS reco: