A modern Next.js application that allows users to chat with different AI models including GPT-4, Claude 3 Opus, and Mistral Large.
Clone the repository:
git clone https://github.com/yourusername/ai-chat-app.git
cd ai-chat-app
Install dependencies:
npm install
Set up environment variables:
.env.example
to .env.local
.env.local
:OPENAI_API_KEY=your_actual_openai_api_key
ANTHROPIC_API_KEY=your_actual_anthropic_api_key
Run the development server:
npm run dev
Open http://localhost:3000 in your browser.
.env.local
file or expose your API keys.env.example
file is provided as a template onlysrc/
├── app/
│ ├── api/
│ │ └── chat/
│ │ └── route.ts
│ ├── layout.tsx
│ └── page.tsx
├── components/
│ └── chat/
│ ├── ChatInterface.tsx
│ └── ModelSelector.tsx
├── config/
│ └── ai-models.ts
└── types/
└── chat.ts
git checkout -b feature/amazing-feature
)git commit -m 'Add some amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.