zhangxiao
2024-10-18 2aca3fa30fac2aa5790f6b598dad7e2e59173012
app/api/chat.py
@@ -56,6 +56,11 @@
                                await websocket.send_json(result)
                                await websocket.close()
                                return
                        else:
                            chat_history.append({
                                "content": message["message"],
                                "role": "user"
                            })
                    async for rag_response in ragflow_service.chat(token, chat_id, chat_history):
                        try:
                            print(f"Received from ragflow: {rag_response}")