File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
preview/reasoning_engines/templates Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -603,18 +603,23 @@ async def _init_session(
603603 """Initializes the session, and returns the session id."""
604604 from google .adk .events .event import Event
605605 import random
606+ from google .cloud .aiplatform import base
607+
608+ _LOGGER = base .Logger (__name__ )
606609
607610 session_state = None
608611 if request .authorizations :
609612 session_state = {}
610613 for auth_id , auth in request .authorizations .items ():
611614 auth = _Authorization (** auth )
612- session_state [f"temp: { auth_id } " ] = auth .access_token
615+ session_state [auth_id ] = auth .access_token
613616
614617 if request .session_id :
615618 session_id = request .session_id
616619 else :
617620 session_id = f"temp_session_{ random .randbytes (8 ).hex ()} "
621+ _LOGGER .info ("session_state: %s" , session_state )
622+ print ("session_state: %s" , session_state )
618623 session = await session_service .create_session (
619624 app_name = self ._tmpl_attrs .get ("app_name" ),
620625 user_id = request .user_id ,
Original file line number Diff line number Diff line change @@ -551,8 +551,13 @@ async def _init_session(
551551 """Initializes the session, and returns the session id."""
552552 from google .adk .events .event import Event
553553 import random
554+ from google .cloud .aiplatform import base
555+
556+ _LOGGER = base .Logger (__name__ )
554557
555558 session_state = None
559+ _LOGGER .info ("authorizations: %s" , request .authorizations )
560+ print ("authorizations: %s" , request .authorizations )
556561 if request .authorizations :
557562 session_state = {}
558563 for auth_id , auth in request .authorizations .items ():
@@ -563,6 +568,8 @@ async def _init_session(
563568 session_id = request .session_id
564569 else :
565570 session_id = f"temp_session_{ random .randbytes (8 ).hex ()} "
571+ _LOGGER .info ("session_state: %s" , session_state )
572+ print ("session_state: %s" , session_state )
566573 session = await session_service .create_session (
567574 app_name = self ._tmpl_attrs .get ("app_name" ),
568575 user_id = request .user_id ,
You can’t perform that action at this time.
0 commit comments