zhaoqingang
2024-12-13 f2c43713b16e821f4a1ae97804c60f18734d5f6a
app/api/chat.py
@@ -41,13 +41,16 @@
        ret = {"message": "Agent not found", "type": "close"}
        await websocket.send_json(ret)
        return
    print(1111)
    agent_type = agent.agent_type
    print(agent_type)
    if chat_id == "" or chat_id == "0":
        ret = {"message": "Chat ID not found", "type": "close"}
        await websocket.send_json(ret)
        return
    if agent_type == AgentType.RAGFLOW:
        print(222)
        ragflow_service = RagflowService(settings.fwr_base_url)
        token = await get_ragflow_token(db, current_user.id)
        try: