Giter Club home page Giter Club logo

chatgpt-ui's Introduction

ChatGPT WebUI

Welcome to the ChatGPT WebUI, a user-friendly interface for interacting with ChatGPT. This application is built using React.js for the basic UI, Redux for state management, TailwindCSS for styling, and yarn for dependency management.

Screenshots

image image image

Features

1. API Integration

a. Actual Response

The application successfully integrates with the ChatGPT API to provide actual responses to user queries. Axios library is utilized for making API requests. To enhance user experience, local storage is employed for caching, ensuring that previously fetched responses are stored locally.

b. Multiple Chat Instances

The primary data structure for managing conversations is an array of threads. Each thread represents a chat stream, consisting of a unique ID and an array of chats. A chat, in turn, represents a query-response pair.

  • Thread Structure:

    • Unique ID
    • Array of Chats
  • Chat Structure:

    • Query
    • Response (Initially set to null)

When a user requests the homepage, a new thread is created with a single chat inside it. Since responses take some time to load, the initial response after firing the request is set to null. Once the promise of the request is resolved, the corresponding chat is populated with the correct response, replacing the null placeholder.

All changes to threads are recorded in local storage, ensuring the application maintains consistency even after a page reload.

2. User-Friendly Interface and Responsiveness

The application features a user-friendly interface designed for ease of use. TailwindCSS is employed for styling, providing a clean and modern look. Additionally, the use of appropriate media queries ensures that the application is responsive across various devices, adapting to different screen sizes for an optimal user experience.

Getting Started

To run the ChatGPT WebUI locally, follow these steps:

  1. Clone the repository:

    git clone https://github.com/Yousuf-Ejaz/chatGPT-UI.git
    
  2. Navigate to the project directory:

    cd chatGPT-UI
    
  3. Install dependencies:

    yarn
    
  4. Create a .env file with the following field:

    VITE_LONGSHOT_API_KEY = your_key
    
  5. Start the development server:

    yarn dev
    

The application should now be running locally at http://localhost:5173.

Feel free to explore the ChatGPT WebUI and engage in interactive conversations with the ChatGPT model!

Feedback and Contributions

If you have any feedback or would like to contribute to the project, please feel free to contact me. Your input is highly valued.

Happy chatting with ChatGPT! ๐Ÿš€

chatgpt-ui's People

Contributors

yousuf-ejaz avatar

Watchers

 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.