chatgpt-svelte icon indicating copy to clipboard operation
chatgpt-svelte copied to clipboard

text.match is not a function

Open weepy opened this issue 2 years ago • 1 comments

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 ()

weepy avatar Apr 08 '23 06:04 weepy

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

ichbtrv avatar Apr 12 '23 08:04 ichbtrv