| | |
| | | import asyncio |
| | | import websockets |
| | | from sqlalchemy.orm import Session |
| | | from app.api import get_current_user_websocket, ResponseList, get_current_user |
| | | from app.api import get_current_user_websocket, ResponseList, get_current_user, format_file_url, process_files |
| | | from app.config.config import settings |
| | | from app.models.agent_model import AgentModel, AgentType |
| | | from app.models.base_model import get_db |
| | |
| | | t = "close" |
| | | else: |
| | | t = "stream" |
| | | process_files(files, agent_id) |
| | | result = {"step_message": steps, "type": t, "files": files} |
| | | await websocket.send_json(result) |
| | | print(f"Forwarded to client, {chat_id}: {result}") |