Skip to content

Commit 78466bb

Browse files
Tongzhou-Jiangcopybara-github
authored andcommitted
fix: investigation on session state
PiperOrigin-RevId: 831082835
1 parent 0013865 commit 78466bb

File tree

1 file changed

+4
-0
lines changed
  • vertexai/agent_engines/templates

1 file changed

+4
-0
lines changed

vertexai/agent_engines/templates/adk.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,9 @@ async def streaming_agent_run_with_events(self, request_json: str):
10731073
import json
10741074
from google.genai import types
10751075
from google.genai.errors import ClientError
1076+
from google.cloud.aiplatform import base
1077+
1078+
_LOGGER = base.Logger(__name__)
10761079

10771080
request = _StreamRunRequest(**json.loads(request_json))
10781081
if not self._tmpl_attrs.get("in_memory_runner"):
@@ -1140,6 +1143,7 @@ async def streaming_agent_run_with_events(self, request_json: str):
11401143
yield converted_event
11411144
finally:
11421145
if session and not request.session_id:
1146+
_LOGGER.info(f"Dumping session state: {session.state}")
11431147
app = self._tmpl_attrs.get("app")
11441148
await session_service.delete_session(
11451149
app_name=app.name if app else self._tmpl_attrs.get("app_name"),

0 commit comments

Comments
 (0)