From d9a9401e3ba3a528adf16bd0a4d492418ce14d24 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Fri, 23 Aug 2024 14:08:38 -0300 Subject: [PATCH] fix: ensure cache is set for graph in build flow (#3531) added a condition to set the cache for the graph when it is built. this ensures that the latest graph state is stored in the chat service. --- src/backend/base/langflow/api/v1/chat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backend/base/langflow/api/v1/chat.py b/src/backend/base/langflow/api/v1/chat.py index 5e47861aa..c15c1cb39 100644 --- a/src/backend/base/langflow/api/v1/chat.py +++ b/src/backend/base/langflow/api/v1/chat.py @@ -261,6 +261,8 @@ async def build_flow( data=result_data_response, artifacts=artifacts, ) + else: + await chat_service.set_cache(flow_id_str, graph) timedelta = time.perf_counter() - start_time duration = format_elapsed_time(timedelta)