- Notifications
You must be signed in to change notification settings - Fork59
hillis/gpt-4-chat-ui
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
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.
- Responsive chat interface
- Auto-scroll to the latest message
- Message input validation
- OpenAI GPT-4 integration
- Loading indicator during API requests
These instructions will help you set up the project on your local machine.
- Node.js >= 14.x
- npm
@emotion/react: ^11.10.6@emotion/styled: ^11.10.6@mui/material: ^5.11.14@types/node: 18.15.10@types/react: 18.0.29@types/react-dom: 18.0.11eslint: 8.36.0eslint-config-next: 13.2.4next: 13.2.4openai: ^3.2.1react: 18.2.0react-dom: 18.2.0react-markdown: ^8.0.6typescript: 5.0.2
- Clone the repository:
git clone https://github.com/hillis/gpt-4-chat-ui.git- Change to the project directory:
cd gpt-4-chat-ui- Install dependencies:
npm install- Add your OpenAI API key to a
.envfile:
envCopy codeOPENAI_API_KEY=your_openai_api_key_hereMake sure to replaceyour_openai_api_key_here with your actual OpenAI API key.
- Run the development server:
npm run devNow you can open your browser and navigate tohttp://localhost:3000 to see the chat interface in action.
To deploy the application, follow theNext.js deployment documentation.
- Next.js - The React framework used
- TypeScript - The programming language used
- OpenAI API - The AI language model used
Used Template and converted to TypescriptFrontend of this repo is inspired by langchain-chat-nextjsLangChain-Chat-NextJS
This project is licensed under the MIT License -
About
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.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.