zhaoqingang
2025-02-27 345f2822f5072c34d9f969ae077830af968043b9
app/api/chat.py
@@ -325,7 +325,7 @@
        # token = get_dify_token(db, current_user.id)
        try:
            async def forward_to_dify():
                if agent.type == "imageTalk":
                if chat_type == "imageTalk":
                    token = DfTokenDao(db).get_token_by_id(IMAGE_TO_TEXT)
                    if not token:
                        await websocket.send_json({"message": "Invalid token", "type": "error"})
@@ -431,7 +431,7 @@
                                result = {"message": f"内部错误: {e2}", "type": "close"}
                                await websocket.send_json(result)
                                print(f"Error process message of ragflow: {e2}")
                elif agent.type == "reportWorkflow":
                elif chat_type == "reportWorkflow":
                    while True:
                        receive_message = await websocket.receive_json()