Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix types #18

Open
qgustavor opened this issue May 15, 2023 · 1 comment
Open

Fix types #18

qgustavor opened this issue May 15, 2023 · 1 comment

Comments

@qgustavor
Copy link

The types of the library are wrong: https://arethetypeswrong.github.io/?p=gpt3-tokenizer%401.1.3

Because of this issue the example in the documentation does not work in some environments, at the moment you need to use const tokenizer = new GPT3Tokenizer.default({ type: 'gpt3' }); on those instead.

Is a common issue with TypeScript projects... so common someone had to make a website to detect that issue. If the types are hard to fix (the website above makes fixing it look simple) just add a note in documentation. It's a bit frustrating testing out a new library, the first example in the documentation does not work and having to debug why, then you find the solution and question yourself why you are a JavaScript programmer and how those kind of issues still exist even with TypeScript... 😑

@arnaudbzn
Copy link

Issue reproduced with Deno. The workaround is to use.default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants