An interactive gaming chatbot that combines classic games with AI-powered conversations for a more engaging and dynamic experience.
-
🎮 Interactive Games:
- Number Guessing
- Rock Paper Scissors
- Riddles
- Trivia
-
🤖 AI-Powered Features:
- Natural conversations
- Dynamic game commentary
- Contextual hints
- Adaptive responses
- Personality and humor
-
💫 Modern UI:
- Clean, responsive design
- Smooth animations
- Real-time interactions
- Mobile-friendly interface
- Clone the repository
- Get an OpenAI API key from OpenAI's platform
- Update
config.js
with your API key:OPENAI_API_KEY: 'your-api-key-here'
- Serve the files using a local server (due to ES6 modules):
# Using Python python -m http.server 8000 # Using Node.js npx http-server
- Open
http://localhost:8000
in your browser
- Type "play" to see available games
- Click the quick action buttons for instant access
- Chat naturally with the AI
- Ask for jokes or fun facts
- Get hints during games
- Built with vanilla JavaScript
- Uses OpenAI's GPT-3.5 API for conversations
- Tailwind CSS for styling
- ES6 Modules for code organization
- Async/await for API handling
Never expose your API key in the frontend. In a production environment, you should:
- Move the API key to a backend server
- Implement proper authentication
- Use environment variables
- Add rate limiting