A fun, interactive chat interface built with React and Vite, allowing users to:
- Talk to AI-powered characters like Tony Stark or Cleopatra
- Choose different AI models (GPT-3.5, GPT-4, Claude, etc.) via OpenRouter
- Listen to responses with voice output (TTS)
- See which models are free
- Save chat history locally
- π§ββοΈ Chat with AI Characters β Select from a growing list of fictional or historical personas
- π§ Model Selector β Choose from GPT, Claude, Mistral, and more through OpenRouter
- π’ Free Model Flags β Instantly see which models cost $0
- πΌοΈ Model Logos β Logos next to model names for a cleaner UX
- π TTS Output β Read AI replies aloud with voice selection
- πΎ Chat History β Automatically stored in
localStorage
for persistent sessions
- React + Vite β For a lightning-fast frontend
- OpenRouter API β To connect to various LLMs
- Web Speech API β For text-to-speech support
- TailwindCSS β Clean and modern UI
- LocalStorage β To persist chat history
src/
βββ components/
β βββ ChatWindow.jsx # Chat interface and layout
β βββ ModelSelector.jsx # Dropdown for choosing LLM
β βββ VoiceSelector.jsx # Dropdown for TTS voices
β βββ MessageBubble.jsx # Styles user and AI messages
βββ lib/
β βββ openai.js # Handles fetch requests to OpenRouter API
βββ utils/
β βββ localStorage.js # Save/load chat history
βββ App.jsx # Main component
βββ main.jsx # App entry point
git clone https://github.com/your-username/ai-character-chat.git
cd ai-character-chat
npm install
Create a .env
file in the root:
VITE_OPENROUTER_API_KEY=your_openrouter_key_here
β You can use many models for free β no credit card needed for OpenRouter.
npm run dev
- π User login + backend storage
- π Custom character creator
- π€ Share or export conversations
- π¨ Light/Dark themes
- π§© Plugin or tool integrations (memory, file access, etc.)
MIT β free to use, adapt, and remix.