A chat application built with Next.js that simulates a conversation between a user and an AI using LangChain. The app features multiple personality options for the AI, including Default, Pirate, Comedian, and Robot, allowing for varied and engaging interactions.
-
Clone the repository:
git clone https://github.com/atilmohamine/next-ai-chat.git
-
Navigate to the project directory:
cd next-ai-chat
-
Install the dependencies:
npm install
-
Set up your OpenAI API key:
Create a
.env.local
file in the root of your project and add your OpenAI API key:OPENAI_API_KEY=your-api-key
-
Start the development server:
npm run dev
-
Open your browser and go to http://localhost:3000.
-
Interact with the chat interface by sending messages.