Inspiration
The Fortune Teller project was inspired by the idea of combining humor, creativity, and AI to create a fun and engaging experience. We wanted to build something that could make people laugh while showcasing the power of natural language processing (NLP) and AI in generating creative content.
What it does
The Fortune Teller is an AI-powered web application that provides users with humorous, sarcastic, and slightly savage predictions based on their questions. Users can input any question, and the app generates a witty and absurd response using OpenAI's GPT-3.5 Turbo model. The app features a visually appealing interface with a glowing crystal ball and animations to enhance the user experience.
How we built it
Frontend: Built with HTML, CSS, and JavaScript. Designed a visually stunning interface with a glowing crystal ball, animations, and a dark theme.
Backend: Built with Node.js and Express. Created a proxy server to handle API requests to OpenAI securely.
AI Integration: Integrated OpenAI's GPT-3.5 Turbo model for generating responses. Designed a system prompt to ensure the AI responds in a sarcastic and humorous tone.
Deployment: The frontend is a static HTML file, and the backend is a Node.js server that can be deployed on platforms like Heroku or Vercel.
Challenges we ran into
CORS Issues: The frontend couldn't directly call the OpenAI API due to CORS restrictions. Solved by setting up a backend proxy server.
API Key Security: Exposing the OpenAI API key in client-side code was a security risk. Addressed by moving the API key to the backend.
Response Quality: Ensuring the AI generated consistently funny and on-brand responses was challenging. Solved by fine-tuning the system prompt.
User Experience: Balancing the loading time with a dramatic pause for effect was tricky. Added a loading spinner and animations to keep users engaged.
Accomplishments that we're proud of
Seamless AI Integration: Successfully integrated OpenAI's GPT-3.5 Turbo model to generate creative and humorous responses.
Engaging UI/UX: Designed a visually appealing interface with a glowing crystal ball and animations.
Security: Implemented a secure backend proxy to protect the OpenAI API key and handle CORS issues.
Humor and Creativity: Created a system prompt that ensures the AI responds in a sarcastic and humorous tone.
What we learned
AI Prompt Engineering: Learned how to craft effective prompts to guide the AI's behavior and tone.
Backend Development: Gained experience in building a backend server with Node.js and Express.
Frontend Animations: Explored CSS animations and JavaScript to create engaging visual effects.
Error Handling: Improved skills in handling errors gracefully and providing meaningful feedback to users.
What's next for fortunee teller
Multi-Language Support: Add support for multiple languages.
User Accounts: Allow users to create accounts and save their favorite fortunes.
Customizable Themes: Introduce different themes (e.g., spooky, futuristic, romantic).
Mobile App: Develop a mobile version of the app for iOS and Android.
Advanced AI Models: Experiment with more advanced AI models like GPT-4.
Social Sharing: Add features for users to share their fortunes on social media.
Gamification: Introduce a points system or achievements for creative questions.
Voice Input: Allow users to ask questions using voice input.
Log in or sign up for Devpost to join the conversation.