We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
if token == toString the encoder errors out with this error.
toString
https://github.com/latitudegames/GPT-3-Encoder/blob/master/Encoder.js#L163
Suggested fix: Cast token to string:
token
(toString).split(' ') VM236:1 Uncaught TypeError: toString.split is not a function at <anonymous>:1:12
('toString').split(' ') ['toString']
EDIT:
same issue occured with constructor. The encoder may struggle with all reserved JS keywords :/
constructor
The text was updated successfully, but these errors were encountered:
I have the same issue with this:
var gpt3Encoder = require("gpt-3-encoder") gpt3Encoder.encode(`foo.valueOf()`);
With some console logging, I can see that the bpe function returns [Function: valueOf] rather than a string.
bpe
[Function: valueOf]
Sorry, something went wrong.
This is fixed in my fork: https://www.npmjs.com/package/@nick.heiner/gpt-3-encoder.
Fixed with an upgrade to 1.1.4
No branches or pull requests
if token ==
toString
the encoder errors out with this error.https://github.com/latitudegames/GPT-3-Encoder/blob/master/Encoder.js#L163
Suggested fix: Cast
token
to string:EDIT:
same issue occured with
constructor
. The encoder may struggle with all reserved JS keywords :/The text was updated successfully, but these errors were encountered: