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.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-08-23 14:08:38 -03:00 committed by GitHub
commit d9a9401e3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)