Spaces:
No application file
No application file
File size: 743 Bytes
4f4aa9b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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"]
|