{"id":27551851,"url":"https://github.com/akshaymittal143/cloudybot-devops-ai","last_synced_at":"2026-05-01T18:31:41.739Z","repository":{"id":288200054,"uuid":"967143440","full_name":"akshaymittal143/CloudyBot-DevOps-AI","owner":"akshaymittal143","description":"Provide a conversational assistant that can answer DevOps-related questions. This helps demonstrate how large language models (LLMs) can be applied to real-world knowledge domains (in this case, cloud and DevOps topics). For students, it’s a fun, interactive example of AI services.","archived":false,"fork":false,"pushed_at":"2025-04-16T05:14:55.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T06:34:44.884Z","etag":null,"topics":["ai","chatbot","huggingface","openai","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/akshaymittal143.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-04-16T02:07:17.000Z","updated_at":"2025-04-16T05:14:59.000Z","dependencies_parsed_at":"2025-04-16T06:35:18.449Z","dependency_job_id":"dc62d254-84c2-4ad5-85d8-2512d09e89bd","html_url":"https://github.com/akshaymittal143/CloudyBot-DevOps-AI","commit_stats":null,"previous_names":["akshaymittal143/ai-in-the-cloud-demo","akshaymittal143/cloudybot-devops-ai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymittal143%2FCloudyBot-DevOps-AI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymittal143%2FCloudyBot-DevOps-AI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymittal143%2FCloudyBot-DevOps-AI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/akshaymittal143%2FCloudyBot-DevOps-AI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/akshaymittal143","download_url":"https://codeload.github.com/akshaymittal143/CloudyBot-DevOps-AI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249666830,"owners_count":21308154,"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","chatbot","huggingface","openai","python"],"created_at":"2025-04-19T09:44:37.364Z","updated_at":"2026-05-01T18:31:41.729Z","avatar_url":"https://github.com/akshaymittal143.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudyBot: AI-Powered DevOps Assistant Chatbot\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)\n[![OpenAI](https://img.shields.io/badge/OpenAI-API-green.svg)](https://openai.com/blog/openai-api)\n[![Streamlit](https://img.shields.io/badge/Streamlit-App-FF4B4B.svg)](https://streamlit.io)\n\n\u003e An intelligent DevOps assistant powered by AI, helping you with cloud infrastructure, Kubernetes, Docker, and more.\n\n[Live Demo](https://akshaymittal143-ai-in-the-cloud-demo-app-deploy-r9k6vd.streamlit.app/)\n\n![CloudyBot](cloudybot/local.png)\n\n## Architecture\n\n```mermaid\ngraph TD\n    A[User Input] --\u003e B[Streamlit UI]\n    B --\u003e C[CloudyBot Core]\n    C --\u003e D{Model Provider}\n    D --\u003e|OpenAI| E[OpenAI API]\n    D --\u003e|Local| F[Hugging Face FLAN-T5]\n    E --\u003e G[Response]\n    F --\u003e G\n    G --\u003e B\n```\n\n## Features\n🤖 **Dual AI Backend**\n- OpenAI GPT integration for powerful natural language understanding\n- Local Hugging Face models (FLAN-T5) for offline operation\n- Configurable model selection\n\n🎯 **DevOps Expertise**\n- Infrastructure as Code guidance\n- Container orchestration help\n- CI/CD pipeline assistance\n- Cloud platform support (AWS, GCP, Azure)\n\n💻 **User Experience**\n- Clean, intuitive Streamlit interface\n- Real-time responses\n- Chat history management\n- Example query suggestions\n\n## Prerequisites\n\n- Python 3.8+ - CloudyBot is a Python application. Ensure you have Python installed. You can check by running python --version in your terminal.\n- API keys (for OpenAI usage): You can obtain an API key by creating an account on OpenAI’s platform and generating a key from their dashboard. Note: This is unrelated to Streamlit.\nstreamlit.io\n. (If you only plan to use the local Hugging Face model, no external API key is required, although a Hugging Face Hub token could be used if you want to load models via their API or need to access gated models – for our default FLAN-T5, this is not necessary.)\n\n## Quick Start\n\n```bash\n# Clone repository\ngit clone https://github.com/akshaymittal143/CloudyBot-DevOps-AI.git\ncd CloudyBot-DevOps-AI\n\n# Set up virtual environment\npython3 -m venv venv\nsource venv/bin/activate  # Linux/Mac\n# or\nvenv\\Scripts\\activate     # Windows\n\n# Install dependencies\npip install -r requirements.txt\n\n# Configure environment\n# Option A: OpenAI (requires API key)\necho \"MODEL_PROVIDER=OPENAI\" \u003e .env\necho \"OPENAI_API_KEY=your_key_here\" \u003e\u003e .env\n\n# Option B: Local model (no API key needed)\necho \"MODEL_PROVIDER=HUGGINGFACE\" \u003e .env\necho \"HUGGINGFACE_TEMPERATURE=0.7\" \u003e\u003e .env\necho \"HUGGINGFACE_MAX_LENGTH=512\" \u003e\u003e .env\n\n# Run application\nstreamlit run app.py\n\n# To deactivate virtual environment when done\ndeactivate  # Works for both Windows and Unix-like systems\n```\n\n## Development Setup\n\n### Requirements\n- Python 3.8+\n- pip package manager\n- Virtual environment (recommended)\n\n### Dependencies\n```plaintext\nstreamlit\u003e=1.28.0    # UI framework\nopenai\u003e=1.0.0        # OpenAI API integration\ntransformers\u003e=4.31.0 # Hugging Face models\npython-dotenv\u003e=1.0.0 # Environment management\ntorch\u003e=2.1.0         # Machine learning backend\nnumpy==1.24.3        # Numerical operations\npillow\u003e=9.5.0       # Image processing\nprotobuf\u003e=4.21.0    # Protocol buffers\n```\n\n### Environment Variables\nRequired variables in `.env`:\n```ini\n# For OpenAI\nMODEL_PROVIDER=OPENAI\nOPENAI_API_KEY=your_api_key_here\nOPENAI_MODEL=gpt-3.5-turbo\n\n# For Hugging Face\nMODEL_PROVIDER=HUGGINGFACE\nHUGGINGFACE_MODEL=google/flan-t5-base\nHUGGINGFACE_TEMPERATURE=0.7\nHUGGINGFACE_MAX_LENGTH=512\nHUGGINGFACE_DEVICE=auto\n```\n\n## Deployment Options\n\n### Deployment on Streamlit Cloud\n\n- Deploy from GitHub via [Streamlit Cloud](https://streamlit.io).\n- Configure secrets (`OPENAI_API_KEY`) through Streamlit secrets.\n\n1. Fork this repository\n2. Go to [Streamlit Cloud](https://share.streamlit.io)\n3. Deploy from GitHub\n4. Add these secrets in Streamlit Cloud dashboard:\n   ```plaintext\n   OPENAI_API_KEY = \"your-api-key\"\n   MODEL_PROVIDER = \"OPENAI\"\n   OPENAI_MODEL = \"gpt-3.5-turbo\"\n   ```\n\n\n## Usage Examples\n\n- \"How do I restart a Kubernetes pod?\"\n- \"Explain blue-green deployment.\"\n- \"How to debug Docker container failures?\"\n\n## Troubleshooting\n\n### Common Issues\n\n1. **OpenAI API Error**\n   ```\n   Error: OpenAI API request failed\n   ```\n   ➡️ Check your API key and internet connection\n\n2. **Memory Issues with Local Models**\n   ```\n   CUDA out of memory\n   ```\n   ➡️ Try reducing model size or batch size\n\n3. **Streamlit Connection Error**\n   ```\n   Connection error: Connection refused\n   ```\n   ➡️ Check if port 8501 is available\n\n### Debug Mode\n```bash\nstreamlit run app.py --logger.level=debug\n```\n\n## Project Structure\n\n```\nAI-in-the-Cloud-Demo/\n├── app.py                    # Main Streamlit application\n├── bot.py                    # AI provider router\n├── hf_client.py             # Hugging Face client\n├── openai_client.py         # OpenAI client\n├── requirements.txt         # Dependencies\n├── requirements-dev.txt     # Development dependencies\n├── README.md               # Documentation\n├── DEMO_CODE_FLOW.md       # Code flow demonstration\n├── CONTRIBUTING.md         # Contributing guidelines\n├── LICENSE                 # Apache 2.0 license\n├── setup.sh               # Environment setup script\n├── packages.txt           # System packages for devcontainer\n├── .gitignore            # Git ignore patterns\n├── .streamlit/           # Streamlit configuration\n│   ├── config.toml       # App configuration\n│   └── secrets.toml      # Secrets (not in repo)\n├── .devcontainer/        # VS Code devcontainer\n├── cloudybot/           # Assets\n│   └── local.png        # Screenshot\n├── tests/               # Test files\n└── venv/               # Virtual environment (not in repo)\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Commit changes\n4. Push to branch\n5. Open a Pull Request\n\n## Future Roadmap\n\nCloudyBot is a work in progress. There are many ways it could be enhanced, and we welcome ideas or contributions! If you're interested in contributing, please check out our [CONTRIBUTING.md](https://github.com/akshaymittal143/CloudyBot-DevOps-AI/blob/main/CONTRIBUTING.md) file for guidelines or visit our [GitHub Issues page](https://github.com/akshaymittal143/CloudyBot-DevOps-AI/issues) to see open tasks and feature requests.\n\nHere are some potential future improvements:\n- Live Data Integration: Connecting CloudyBot to live systems (APIs, databases, cloud services) so it can fetch real-time information. For instance, integrate with AWS/GCP SDKs to answer “What’s the CPU usage of EC2 instance X?” by actually calling CloudWatch metrics. This would make answers more dynamic and context-specific. It could be done securely by allowing certain read-only credentials configured in the environment.\n- Executing Commands (Actionable Bot): Taking the above further, allow CloudyBot to execute certain actions when prompted. For example, “CloudyBot, restart the backend service” could trigger a predefined script or API call (maybe hitting a Kubernetes endpoint to restart a pod, etc.). This is essentially building ChatOps capabilities. We’d have to implement a permissions layer and confirmation (to avoid accidental destructive actions). Possibly maintain a list of allowed operations the bot can do.\n- Enhanced Conversation Memory: Currently, the conversation memory might be limited (especially with local model). We can extend this by caching past interactions and summarizing them when they get too long, or by using a vector store to dynamically fetch relevant past bits. Also, if using OpenAI GPT-4, we’d get a larger context window enabling longer dialogues. Future models (like GPT-4 32k context or others) could vastly improve how much history CloudyBot can remember and reason over.\n- Knowledge Base Integration: As mentioned, hooking up a documentation knowledge base. We could store documentation (Kubernetes docs, AWS docs, internal docs, etc.) and have CloudyBot retrieve and cite them. Perhaps using an approach with LangChain or similar frameworks: user question -\u003e search docs -\u003e give relevant snippets to LLM -\u003e LLM answers using those. This would reduce hallucination and increase accuracy for domain-specific questions. It would also allow CloudyBot to answer questions like “According to our dev guide, how do we release a new version?” with exact steps from the guide.\n- Support More Models/Providers: There’s interest in adding support for more open-source LLMs that are more powerful than FLAN-T5. For example: Alpaca/LLaMA derivatives, GPT-J/GPT-NeoX, Dolly 2.0, OpenAI’s newer models, Cohere API, etc. We could create a plugin system where if you have a model’s API or weights, you drop in a new client class and configure it. CloudyBot could even run a small model by default and escalate to a bigger model for harder questions (to optimize response time vs quality).\nMulti-language Support: Maybe some users might ask questions in different languages. We could incorporate translation or use models that support multilingual queries so CloudyBot can assist non-English speakers on DevOps topics.\n- UI Enhancements: The Streamlit UI can be made more robust: add an “Export conversation” feature to save the Q\u0026A as a text or PDF. Add a “Clear chat” button to reset the session. Possibly allow the user to toggle between dark/light theme for better viewing. Another idea is to have a “persona” or “mode” switch: e.g., “Beginner mode” where CloudyBot gives more basic, step-by-step answers, vs “Expert mode” where it can be more concise and assume background knowledge. This could be a toggle that changes the system prompt to adjust the answer detail.\n- Error Handling and Fail-safes: Currently, basic error handling is implemented to catch exceptions such as OpenAI request timeouts or rate limit errors, providing a friendly message like “Sorry, I’m having trouble reaching the AI service. Please try again.” Future improvements include detecting nonsensical outputs from the local model and responding appropriately, such as retrying or indicating uncertainty.\nContributing Guide: If opening the project to contributors, provide guidelines on how to add new features, coding style, etc. Perhaps write tests for the core logic (ensuring the OpenAI and HF clients work as expected given dummy inputs). This encourages community involvement to add the above features.\n- Error Handling and Fail-safes: Improve how the bot handles cases where the AI model doesn’t know an answer or fails. We can catch exceptions (like OpenAI request timeouts or rate limit errors) and respond with a friendly message like “Sorry, I’m having trouble reaching the AI service. Please try again.” rather than just breaking. If the local model produces nonsense, maybe detect if output is empty or too off-topic and either retry or say it’s unsure.\n- Security Considerations: If CloudyBot ever executes commands, ensure it cannot be tricked into doing something dangerous. Implement confirmations (“Are you sure? [Yes/No]”) for critical actions. Possibly maintain a whitelist of safe commands. Also, sanitize user input if it might go into any shell calls (to prevent injection). For now, as a read-only assistant, it’s mostly about not revealing secrets (which we handle via environment and not echoing them).\n\nFeel free to raise issues or pull requests on the GitHub repo if you have ideas or improvements. CloudyBot can grow with community input, especially as new AI capabilities emerge.\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**Akshay Mittal** - [GitHub Profile](https://github.com/akshaymittal143)\n\n---\n\n📧 **Contact**: For support, reach out to [project maintainers](mailto:maintainers@cloudybot.com)\n\n**Happy DevOps Chatting!** ☁️🤖","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaymittal143%2Fcloudybot-devops-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakshaymittal143%2Fcloudybot-devops-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaymittal143%2Fcloudybot-devops-ai/lists"}