Giter Site home page Giter Site logo

goonsyndicate / gpt-4-chat-uii Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hillis/gpt-4-chat-ui

0.0 0.0 0.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%

gpt-4-chat-uii's Introduction

GPT 4 Chat UI

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.

Features

  • Responsive chat interface
  • Auto-scroll to the latest message
  • Message input validation
  • OpenAI GPT-4 integration
  • Loading indicator during API requests

Getting Started

These instructions will help you set up the project on your local machine.

Prerequisites

  • Node.js >= 14.x
  • npm

Dependencies

  • @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.11
  • eslint: 8.36.0
  • eslint-config-next: 13.2.4
  • next: 13.2.4
  • openai: ^3.2.1
  • react: 18.2.0
  • react-dom: 18.2.0
  • react-markdown: ^8.0.6
  • typescript: 5.0.2

Installation

  1. Clone the repository:

git clone https://github.com/hillis/gpt-4-chat-ui.git

  1. Change to the project directory:

cd gpt-4-chat-ui

  1. Install dependencies:

npm install

  1. Add your OpenAI API key to a .env file:
envCopy code
OPENAI_API_KEY=your_openai_api_key_here

Make sure to replace your_openai_api_key_here with your actual OpenAI API key.

  1. Run the development server:

npm run dev

Now you can open your browser and navigate to http://localhost:3000 to see the chat interface in action.

Deployment

To deploy the application, follow the Next.js deployment documentation.

Built With

Contributing

Used Template and converted to Typescript Frontend of this repo is inspired by langchain-chat-nextjs LangChain-Chat-NextJS

License

This project is licensed under the MIT License -

gpt-4-chat-uii's People

Contributors

hillis avatar

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.