Coder Social home page Coder Social logo

hillis / gpt-4-chat-ui Goto Github PK

View Code? Open in Web Editor NEW
104.0 104.0 57.0 342 KB

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.

JavaScript 1.95% TypeScript 63.03% CSS 35.03%
chatgpt gpt4-api nextjs-template typescript

gpt-4-chat-ui's People

Contributors

hillis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gpt-4-chat-ui's Issues

Termux error

It happens when I try to send message to chat gpt
IMG_20231111_111342.jpg

○ 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

Add Streaming

Need to update so the response is displayed as each letter comes in and not when the full message is complete.

Got error on first use

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

Vercel Shipping?

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.

Error

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
}

Is it really GPT4

Good day,

I was interested in a GPT4 GUI and came across this project. It looks really nice but if I ask it if it's GPT4 it says no. Take a look for yourself:

ChatGPT

And yes, I have acces to GPT4:

GPT4 access

localhost:3000/api/chat 500 (Internal Server Error)

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

Integrate OpenAI Plugins

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.