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

Server keeps crashing on text.matchAll is not a function #3

Open
TVScoundrel opened this issue Mar 28, 2024 · 0 comments
Open

Server keeps crashing on text.matchAll is not a function #3

TVScoundrel opened this issue Mar 28, 2024 · 0 comments

Comments

@TVScoundrel
Copy link

exo-server/node_modules/gpt-3-encoder/Encoder.js:157
const matches = Array.from(text.matchAll(pat)).map(x => x[0])
^

TypeError: text.matchAll is not a function
at encode (/Users/tomvanschoor/Projects/Exo/exo-server/node_modules/gpt-3-encoder/Encoder.js:157:35)
at truncateStringTokens (/Users/tomvanschoor/Projects/Exo/exo-server/dist/server/api/openAi/openAi.repository.js:26:19)
at /Users/tomvanschoor/Projects/Exo/exo-server/dist/server/api/openAi/openAi.repository.js:84:24
at Array.map ()
at /Users/tomvanschoor/Projects/Exo/exo-server/dist/server/api/openAi/openAi.repository.js:81:30
at Generator.next ()
at /Users/tomvanschoor/Projects/Exo/exo-server/dist/server/api/openAi/openAi.repository.js:9:71
at new Promise ()
at __awaiter (/Users/tomvanschoor/Projects/Exo/exo-server/dist/server/api/openAi/openAi.repository.js:5:12)
at createEmbeddings (/Users/tomvanschoor/Projects/Exo/exo-server/dist/server/api/openAi/openAi.repository.js:77:12)

Node.js v18.20.0

It appears to be a result of a 404 at openai:

The name of the directory is Interfaces. Summarize an explanation of this directory into a paragraph:
\ Summarizing code \Error: Request failed with status code 404
at createError (/Users/tomvanschoor/Projects/Exo/exo-server/node_modules/openai/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/tomvanschoor/Projects/Exo/exo-server/node_modules/openai/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/Users/tomvanschoor/Projects/Exo/exo-server/node_modules/openai/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:529:35)
at endReadableNT (node:internal/streams/readable:1400:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

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

1 participant