A web application that helps optimize and enhance prompts for AI models using Google's Gemini API. PEO.AI provides real-time feedback and suggestions to improve your prompts for better AI interactions.
peo.ai.demo.2-1741985334621.mp4
- 🎨 Modern, responsive dark mode UI built with React and Material-UI
- 🧠 Intelligent prompt optimization powered by Google's Gemini API
- ⚡ Real-time streaming responses with SSE (Server-Sent Events)
- 💬 Conversation history with markdown and code block support
- 📋 Easy code copying with hover-to-reveal copy buttons
- 🔄 Follow-up prompts for iterative optimization
- Python 3.8+
- Node.js 14+
- npm or yarn
- Google Gemini API key
-
Create a
.envfile in the root directory with your Gemini API key:GEMINI_API_KEY=your_api_key_here -
Install Python dependencies:
pip install -r requirements.txt -
Run the Flask server:
python app.py
-
Navigate to the frontend directory:
cd frontend -
Install dependencies:
npm install -
Start the development server:
npm run dev
- Open your browser and navigate to the URL shown in the Vite output (typically http://localhost:5173)
- Enter your prompt in the input field
- Receive optimized prompt suggestions with detailed explanations
- Continue the conversation with follow-up prompts
- Use the copy button to easily copy code blocks
- Clear the conversation at any time with the delete button
- React 18
- Material-UI (MUI)
- React Markdown
- Syntax Highlighting with react-syntax-highlighter
- Vite for fast development and building
- Flask
- Flask-CORS
- Google Gemini API (gemini-2.0-flash model)
- Server-Sent Events (SSE) for streaming responses
peo.ai/
├── .env # Environment variables (create this file)
├── app.py # Flask server and API endpoints
├── main.py # Conversation class and Gemini API integration
├── requirements.txt # Python dependencies
└── frontend/ # React frontend
├── index.html # HTML entry point
├── package.json # Frontend dependencies
└── src/ # React source code
├── App.jsx # Main application component
├── main.jsx # React entry point
└── theme.js # MUI theme configuration
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.