diff --git a/Makefile b/Makefile index 328ac8580..d2adb3a7f 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ run_frontend: cd src/frontend && npm start run_backend: - poetry run uvicorn langflow.main:app --port 5003 --reload + poetry run uvicorn langflow.main:app --port 5003 --reload --log-level debug build_frontend: cd src/frontend && CI='' npm run build diff --git a/src/backend/langflow/api/chat_manager.py b/src/backend/langflow/api/chat_manager.py index e52e99832..60cb6950d 100644 --- a/src/backend/langflow/api/chat_manager.py +++ b/src/backend/langflow/api/chat_manager.py @@ -23,6 +23,7 @@ class ChatHistory(Subject): """Add a message to the chat history.""" self.history[client_id].append(message) + if not isinstance(message, FileResponse): self.notify() @@ -127,6 +128,9 @@ class ChatManager: # Iterate backwards through the history for msg in reversed(history): if isinstance(msg, FileResponse): + if msg.data_type == "image": + # Base64 encode the image + msg.data = pil_to_base64(msg.data) file_responses.append(msg) if msg.type == "start": break