Skip to content

felixlaii/nextjs-openai

Repository files navigation

ChatGPT Clone

This is a simple chat application built with Next.js and integrated with the OpenAI API for generating responses. It allows users to interact with an AI assistant and view the conversation history.

This repository contains the source code for a simple chat application built with Next.js and integrated with the OpenAI API for generating responses. The application allows users to interact with an AI assistant and view the conversation history.

// Getting Started: To replicate this application on your own computer, follow these steps:

  1. Clone Repository https://github.com/felixlaii/nextjs-openai

  2. Install Dependencies Navigate into the cloned repository directory and install the dependencies using yarn: cd nextjs-openai-chat yarn

  3. Set Up Environment Variables rename .env_sample to .env.local and change placeholder values with your own. OPENAI_API_KEY=

  4. Start the Development Server yarn dev

The application should now be running on http://localhost:3000.

// Usage Once the application is running, you can interact with it in your web browser:

  1. Enter a message in the chat input field.
  2. Press Enter or click the send button to send the message to the AI assistant.
  3. View the response from the AI assistant in the chat interface.
  4. Repeat the process to continue the conversation.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published