Skip to content

Commit a6a94ea

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

File tree

1 file changed

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

1 file changed

+5
-0
lines changed

vertexai/agent_engines/templates/adk.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,8 +1073,12 @@ 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))
1081+
_LOGGER.info(f"request: {request.artifacts}")
10781082
if not self._tmpl_attrs.get("in_memory_runner"):
10791083
self.set_up()
10801084
if not self._tmpl_attrs.get("runner"):
@@ -1140,6 +1144,7 @@ async def streaming_agent_run_with_events(self, request_json: str):
11401144
yield converted_event
11411145
finally:
11421146
if session and not request.session_id:
1147+
_LOGGER.info(f"Dumping session state: {session.state}")
11431148
app = self._tmpl_attrs.get("app")
11441149
await session_service.delete_session(
11451150
app_name=app.name if app else self._tmpl_attrs.get("app_name"),

0 commit comments

Comments
 (0)