Spaces:
Sleeping
Sleeping
| import fastapi | |
| import logging | |
| router = fastapi.APIRouter() | |
| async def analyse_url(thread_id:str,url: str): | |
| try: | |
| if not url: | |
| return {"data": "URL missing in headers"} | |
| res = await run_agent(thread_id, url) | |
| return {"data": res} | |
| except Exception as e: | |
| logging.error(f"Chat endpoint error: {e}") | |
| return {"data": "Failed to chat"} |