zhangxiao
2024-10-17 89f14223b3a02a3620f2f070e5088cc98c007b61
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}")