File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
preview/reasoning_engines/templates Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1183,13 +1183,16 @@ async def streaming_agent_run_with_events(self, request_json: str):
11831183 session_service = self ._tmpl_attrs .get ("session_service" )
11841184 artifact_service = self ._tmpl_attrs .get ("artifact_service" )
11851185 runner = self ._tmpl_attrs .get ("runner" )
1186+ session = None
11861187 try :
11871188 session = await session_service .get_session (
11881189 app_name = app .name if app else self ._tmpl_attrs .get ("app_name" ),
11891190 user_id = request .user_id ,
11901191 session_id = request .session_id ,
11911192 )
11921193 except ClientError :
1194+ pass
1195+ if not session :
11931196 # Fall back to create session if the session is not found.
11941197 # Specifying session_id on creation is not supported,
11951198 # so session id will be regenerated.
Original file line number Diff line number Diff line change @@ -1017,14 +1017,19 @@ async def _invoke_agent_async():
10171017 session_service = self ._tmpl_attrs .get ("session_service" )
10181018 artifact_service = self ._tmpl_attrs .get ("artifact_service" )
10191019 runner = self ._tmpl_attrs .get ("runner" )
1020+ session = None
10201021 try :
10211022 session = await session_service .get_session (
10221023 app_name = self ._tmpl_attrs .get ("app_name" ),
10231024 user_id = request .user_id ,
10241025 session_id = request .session_id ,
10251026 )
10261027 except ClientError :
1028+ pass
1029+ if not session :
10271030 # Fall back to create session if the session is not found.
1031+ # Specifying session_id on creation is not supported,
1032+ # so session id will be regenerated.
10281033 session = await self ._init_session (
10291034 session_service = session_service ,
10301035 artifact_service = artifact_service ,
You can’t perform that action at this time.
0 commit comments