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

text.match is not a function #1

Open
weepy opened this issue Apr 8, 2023 · 1 comment
Open

text.match is not a function #1

weepy opened this issue Apr 8, 2023 · 1 comment

Comments

@weepy
Copy link

weepy commented Apr 8, 2023

running this - I get the following stack trace when i submit something .

TypeError: text.match is not a function
at GPT3NodeTokenizer.encode (/Users/jonahfox/Downloads/chatgpt-svelte-main/node_modules/.pnpm/[email protected]/node_modules/gpt3-tokenizer/dist/gpt3-tokenizer.cjs.development.js:155:26)
at Module.getTokens (/src/lib/utils/tokenizer.ts:8:28)
at eval (/src/routes/api/chat/+server.ts:28:44)
at Array.forEach ()

@ichbtrv
Copy link
Owner

ichbtrv commented Apr 12, 2023

Can you provide more context? The project itself is definitely more like a starting off point for people who want to use the ChatGPT api so there is definitely room for improvement, but I myself wasn't getting any errors with where it was at.

https://github.com/botisan-ai/gpt3-tokenizer

here is the repo for the tokenizer

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