{"id":27979392,"url":"https://github.com/andredisa/ai-codesolver","last_synced_at":"2026-03-05T12:31:21.461Z","repository":{"id":291919800,"uuid":"978750887","full_name":"andredisa/AI-CodeSolver","owner":"andredisa","description":"💻 AI_CodeSolver is an intelligent assistant for developers, students, and coding enthusiasts, helping with learning, solving algorithmic problems, and debugging code.","archived":false,"fork":false,"pushed_at":"2025-05-19T12:41:53.000Z","size":24,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-22T22:02:50.739Z","etag":null,"topics":["ai-architecture","codesolutions","flask","gemini","openai","python","sandbox"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andredisa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-06T13:05:08.000Z","updated_at":"2025-05-19T12:41:56.000Z","dependencies_parsed_at":"2025-05-07T08:24:02.094Z","dependency_job_id":"f0a710f1-0727-4c36-a603-7e36859ce9dd","html_url":"https://github.com/andredisa/AI-CodeSolver","commit_stats":null,"previous_names":["andredisa/ai-codesolver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andredisa/AI-CodeSolver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andredisa%2FAI-CodeSolver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andredisa%2FAI-CodeSolver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andredisa%2FAI-CodeSolver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andredisa%2FAI-CodeSolver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andredisa","download_url":"https://codeload.github.com/andredisa/AI-CodeSolver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andredisa%2FAI-CodeSolver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261374406,"owners_count":23148974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-architecture","codesolutions","flask","gemini","openai","python","sandbox"],"created_at":"2025-05-08T02:52:47.081Z","updated_at":"2026-03-05T12:31:21.408Z","avatar_url":"https://github.com/andredisa.png","language":"Python","funding_links":["https://www.buymeacoffee.com/andredisa"],"categories":[],"sub_categories":[],"readme":"# 🧠 **AI_CodeSolver** 🤖\n\n\u003e Welcome to **AI_CodeSolver**! 🚀 This is a powerful Python project that leverages state-of-the-art AI models to help you solve coding problems automatically! Whether you're a beginner or an expert, this tool will assist you in generating optimal solutions and executing them in a safe sandbox environment.\n\n\u003e🔧 **AI_CodeSolver** uses OpenAI's GPT-3, Google's Gemini, and E2B sandbox environments to analyze coding problems, generate solutions, and run them in real-time.\n\n---\n\n## 🧑‍💻 **Features** ✨\n\n- **📸 Image Processing**: Upload an image of a coding problem, and the system will extract the problem description using advanced image recognition (powered by Gemini).\n- **📝 Text Input**: You can also directly type your coding problem.\n- **💻 Code Generation**: The AI will generate a clean, efficient, and documented Python solution for your coding problem.\n- **🚀 Code Execution**: Execute the generated solution in a secure sandbox environment, and get real-time results.\n- **🔒 Safe Environment**: Run potentially unsafe or untrusted Python code without worrying about security issues using the E2B sandbox.\n- **⚡ Optimized for LeetCode-like Problems**: Designed to handle typical coding challenges with proper time and space complexity.\n\n---\n\n## 💻 **Installation** 🚀\n\n### Prerequisites 🔑\n\n1. **Python 3.x** installed on your machine.\n2. **API keys** for OpenAI, Gemini, and E2B (sandbox execution).\n\n### Steps to Set Up 🛠️\n\n1. **Clone the Repository**:\n\n    ```bash\n    git clone https://github.com/andredisa/AI_CodeSolver.git\n    cd AI_CodeSolver\n    ```\n\n2. **Create a Virtual Environment** (optional but recommended):\n\n    ```bash\n    python3 -m venv venv\n    source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n    ```\n\n3. **Install Dependencies**:\n\n    ```bash\n    pip install -r requirements.txt\n    ```\n\n4. **Set Up API Keys** 🔑:\n\n    - Create a `.env` file in the project root directory (same level as this README).\n    - Add your API keys in this format:\n\n    ```ini\n    OPENAI_API_KEY=your-openai-api-key\n    GEMINI_API_KEY=your-gemini-api-key\n    E2B_API_KEY=your-e2b-api-key\n    ```\n\n    Make sure you never push your `.env` file to GitHub for security reasons! 🔐\n\n5. **Run the Application**:\n\n    Start the app with Streamlit:\n\n    ```bash\n    streamlit run app/ui.py\n    ```\n\n    Your application will open in your browser! 🌐\n\n---\n\n## 🖥️ **How to Use** 🤖\n\n1. **Input Coding Problem**:\n   - You can **upload an image** of a coding problem or directly **type** the problem in the text box.\n   \n2. **Generate \u0026 Execute**:\n   - Once you’ve entered the problem, hit the **\"Generate \u0026 Execute Solution\"** button to let the AI generate a solution and run the code.\n\n3. **Review the Results**:\n   - The AI will return the solution with a breakdown of the code.\n   - The generated code will be executed in the E2B sandbox, and you’ll get the results right on the platform.\n\n4. **Check Files** (if any):\n   - If the execution creates any files, they’ll be listed below the execution results for you to download.\n\n---\n\n## 🎨 **UI/UX Overview** 💡\n\n- **Sidebar Configuration**: On the left side, configure your **API keys** for OpenAI, Gemini, and E2B.\n- **Main Area**: \n  - Input your coding problem as text or upload an image.\n  - Get the AI-generated solution along with the execution results.\n- **Real-time Feedback**: See step-by-step execution logs and any generated files right after the code runs.\n\n---\n\n## 🔧 **Technologies Used** ⚙️\n\n- **Streamlit**: The frontend framework to build the web interface.\n- **OpenAI GPT-3**: Used for generating Python solutions.\n- **Google Gemini**: For analyzing and extracting coding problems from images.\n- **E2B Sandbox**: A secure environment to run Python code without any security concerns.\n\n---\n\n## 📦 **File Structure** 🗂️\n\nHere’s an overview of the project structure:\n```bash\nAI_CodeSolver/\n│\n├── app/ # Main application code\n│ ├── init.py\n│ ├── ui.py # UI code (Streamlit app)\n│ ├── agents.py # Agents for AI interactions (OpenAI, Gemini)\n│ ├── sandbox.py # Sandbox management\n│ └── image_processing.py # Image processing (Gemini API)\n│\n├── .env # Your sensitive API keys (don't upload this to GitHub)\n├── .env.example # Example .env file\n├── .gitignore # Ignore sensitive files (e.g., .env)\n└── requirements.txt # List of Python dependencies\n```\n\n## 🤩 **Contribute** 💬\n\nWe welcome contributions! 🚀 If you have ideas for improvements, bug fixes, or new features, feel free to:\n\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-name`).\n3. Commit your changes (`git commit -am 'Add new feature'`).\n4. Push to the branch (`git push origin feature-name`).\n5. Open a Pull Request.\n\n---\n\n## 📝 **License** 📜\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## ☕ Support Me\n\nIf you find my work useful and would like to support me, you can buy me a coffee! Your support helps me keep creating and improving my projects. Thank you! 😊\n\n\u003ca href=\"https://www.buymeacoffee.com/andredisa\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\n---\n\n## 🎉 **Enjoy solving problems with AI CodeSolver!** 🌟\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandredisa%2Fai-codesolver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandredisa%2Fai-codesolver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandredisa%2Fai-codesolver/lists"}