Spaces:
Sleeping
Sleeping
| import asyncio | |
| from praisonai import PraisonAI | |
| from typing import List, AsyncIterable, Annotated, Optional | |
| async def process_agents(query: str) -> AsyncIterable[str]: | |
| # Create PraisonAI instance and task | |
| praisonai = PraisonAI(auto=query) | |
| print(praisonai.framework) | |
| # Run the task and await the result | |
| task = praisonai.main() | |
| # print(task) | |
| # Assuming `result` is an iterable of strings | |
| for item in task: | |
| yield item | |
| # await task | |