Mirrored from https://github.com/Camo67/OCIU-npo.git
Synced Nov 21, 06:00 UTC
fix/ociu-remove-placeholder-content
| 1 | from backend.agents.base import BaseAgent |
| 2 | from backend.services.model_router import TaskComplexity |
| 3 | import os |
| 4 | from backend.services.model_router import router |
| 5 | |
| 6 | class ContentGeneratorAgent(BaseAgent): |
| 7 | def __init__(self): |
| 8 | super().__init__("ContentGenerator", TaskComplexity.MID) |
| 9 | |
| 10 | async def run(self, topic: str) -> dict: |
| 11 | prompt = f"Generate a social media post about {topic}. Brand voice: Professional yet engaging." |
| 12 | |
| 13 | # Explicitly check router here for debugging in test |
| 14 | # model = router.select_model(self.complexity) |
| 15 | |
| 16 | result = await self.generate_response(prompt) |
| 17 | |
| 18 | self.log_to_vault(f"content_{hash(topic) % 10000}", result) |
| 19 | |
| 20 | return { |
| 21 | "model_used": self.last_model_used, |
| 22 | "output": result |
| 23 | } |
| 24 | |
| 25 | content_agent = ContentGeneratorAgent() |