🐛 fix(process.py): fix session_id assignment logic to ensure it is generated if not provided
This commit is contained in:
parent
f7e5a3d422
commit
a6e9cce02f
1 changed files with 4 additions and 0 deletions
|
|
@ -188,6 +188,10 @@ async def process_graph_cached(
|
||||||
) -> Tuple[Any, str]:
|
) -> Tuple[Any, str]:
|
||||||
clear_caches_if_needed(clear_cache)
|
clear_caches_if_needed(clear_cache)
|
||||||
session_manager = get_session_manager()
|
session_manager = get_session_manager()
|
||||||
|
if session_id is None:
|
||||||
|
session_id = session_manager.generate_key(
|
||||||
|
session_id=session_id, data_graph=data_graph
|
||||||
|
)
|
||||||
# Load the graph using SessionManager
|
# Load the graph using SessionManager
|
||||||
langchain_object, artifacts = session_manager.load_session(session_id, data_graph)
|
langchain_object, artifacts = session_manager.load_session(session_id, data_graph)
|
||||||
processed_inputs = process_inputs(inputs, artifacts)
|
processed_inputs = process_inputs(inputs, artifacts)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue