hillis / gpt-4-chat-ui Goto Github PK
View Code? Open in Web Editor NEWThis project is a simple React-based chat interface that uses Next.js and communicates with OpenAI's GPT-4 (or GPT-3.5-turbo) language model to generate responses.
This project is a simple React-based chat interface that uses Next.js and communicates with OpenAI's GPT-4 (or GPT-3.5-turbo) language model to generate responses.
It happens when I try to send message to chat gpt
○ Compiling /error ...
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data/data'
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data'
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/'
✓ Compiled /error in 9.5s (196 modules)
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data/data'
Watchpack Error (watcher): Error: EACCES: permission denied, watch '/data' Watchpack Error (watcher): Error: EACCES: permission denied, watch '/'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/data'
Watchpack Error (initial scan): Error: EACCES: permission denied, scandir '/'
⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies ○ Compiling / ...
✓ Compiled / in 7.4s (848 modules) ⚠ Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies ✓ Compiled /api/chat in 440ms (111 modules)
⨯ pages/api/chat.ts (10:22) @ eval ⨯ TypeError: openai__WEBPACK_IMPORTED_MODULE_0.Configuration is not a constructor at eval (webpack-internal:///(api)/./pages/api/chat.ts:11:23) 8 |
9 | > 10 | const configuration = new Configuration({
| ^ 11 | apiKey: process.env.OPENAI_API_KEY,
12 | }); 13 |
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
Just like ChatGPT, it would be great to retain conversations to keep the context long term.
Need to update so the response is displayed as each letter comes in and not when the full message is complete.
I've created .env.local
with my API key and ran it using npm run dev
On my first prompt I got this error in the UI:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Can we ship this to Vercel? I am using Vercel and I love this, but can't figure out how to ship it to Vercel because it throws errors every time I try.
I am getting this error, please help. Very much a beginner. When i load the local host i get no response, just spinning ball.
error - Error: Request failed with status code 404
at createError (/Users/patrickgregoire/PycharmProjects/drafts/gpt-4-chat-ui/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/patrickgregoire/PycharmProjects/drafts/gpt-4-chat-ui/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/Users/patrickgregoire/PycharmProjects/drafts/gpt-4-chat-ui/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
digest: undefined
}
After launching the dev and attempt to submit the first query got:
localhost:3000/api/chat 500 (Internal Server Error) on client side and
error - Error: Request failed with status code 404
at createError (/Users/x/Apps/gpt-4-chat-ui/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/x/Apps/gpt-4-chat-ui/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/Users/x/Apps/gpt-4-chat-ui/node_modules/axios/lib/adapters/http.js:322:11)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
digest: undefined
}
in console
First – this is a great and simple app you've authored...so thank you!!
I was wondering if you could add the capability of using some of OpenAI's plugins? Or at least the ability to have them configured. I know they are still rolling those out!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.