ai-dev-system / api /app /agents /devops.py
42hgyn26hz-cpu
Initial commit
4f4aa9b
raw
history blame contribute delete
743 Bytes
import requests
from app.config import REASON_MODEL_URL
MODEL_NAME = "Qwen/Qwen2.5-7B-Instruct"
def devops_agent(plan: str) -> str:
prompt = f"""
You are a DevOps engineer.
Based on this project plan:
{plan}
Generate:
- Dockerfile for backend
- docker-compose.yml
- Production deployment notes
- Environment variables structure
Return clean production-ready configuration files.
"""
payload = {
"model": MODEL_NAME,
"messages": [{"role": "user", "content": prompt}],
"temperature": 0.2,
}
response = requests.post(REASON_MODEL_URL, json=payload, timeout=300)
response.raise_for_status()
return response.json()["choices"][0]["message"]["content"]