Skip to content

Commit 5d5708b

Browse files
hangfeicopybara-github
authored andcommitted
chore: Add debug logging for live connection
This CL adds debug logs to show the history being sent to the live connection and the live connect config used. Co-authored-by: Hangfei Lin <hangfei@google.com> PiperOrigin-RevId: 831473597
1 parent 52b1dfe commit 5d5708b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/google/adk/models/gemini_llm_connection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ async def send_history(self, history: list[types.Content]):
6161
for content in history
6262
if content.parts and content.parts[0].text
6363
]
64+
logger.debug('Sending history to live connection: %s', contents)
6465

6566
if contents:
6667
await self._gemini_session.send(

src/google/adk/models/google_llm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ async def connect(self, llm_request: LlmRequest) -> BaseLlmConnection:
288288
llm_request.live_connect_config.tools = llm_request.config.tools
289289
logger.info('Connecting to live for model: %s', llm_request.model)
290290
logger.debug('Connecting to live with llm_request:%s', llm_request)
291+
logger.debug('Live connect config: %s', llm_request.live_connect_config)
291292
async with self._live_api_client.aio.live.connect(
292293
model=llm_request.model, config=llm_request.live_connect_config
293294
) as live_session:

0 commit comments

Comments
 (0)