Skip to content

gargximran/ChatGPT-4o-API-simulation

Repository files navigation

ChatGPT Chat System Simulation

This is a simple chat system simulation using OpenAI's GPT-4o model. It is built with Next.js and styled using TailwindCSS. The app allows users to chat with the GPT-4o model by entering their OpenAI API key and sending messages.

Features

  • Chat with OpenAI's GPT-4o model
  • Input field for API key
  • Simple and clean UI with TailwindCSS
  • Loading spinner while fetching responses
  • Error handling for empty input fields

Installation

  1. Clone the repository:

    git clone [email protected]:gargximran/ChatGPT-4o-API-simulation.git
    cd ChatGPT-4o-API-simulation
  2. Install dependencies:

    npm install
  3. Run the development server:

    npm run dev

    Open http://localhost:3000 with your browser to see the result.

Usage

  1. Enter your OpenAI API key:

    • On the chat page, input your OpenAI API key in the designated input field.
  2. Chat with GPT-4o:

    • Type your message in the message input field and press Enter or click the "Send" button to receive a response from the model.

Dependencies

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any improvements or new features.

Contact

For any questions or issues, please open an issue in this repository.