Skip to content

Commit

Permalink
fix: ensure cache is set for graph in build flow (#3531)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ogabrielluiz authored and anovazzi1 committed Aug 26, 2024
1 parent 4fca058 commit 677dfbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/base/langflow/api/v1/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ async def _build_vertex(
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)
Expand Down

0 comments on commit 677dfbf

Please sign in to comment.