mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
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
This commit is contained in:
committed by
Copybara-Service
parent
52b1dfea14
commit
5d5708b2ab
@@ -61,6 +61,7 @@ class GeminiLlmConnection(BaseLlmConnection):
|
||||
for content in history
|
||||
if content.parts and content.parts[0].text
|
||||
]
|
||||
logger.debug('Sending history to live connection: %s', contents)
|
||||
|
||||
if contents:
|
||||
await self._gemini_session.send(
|
||||
|
||||
@@ -288,6 +288,7 @@ class Gemini(BaseLlm):
|
||||
llm_request.live_connect_config.tools = llm_request.config.tools
|
||||
logger.info('Connecting to live for model: %s', llm_request.model)
|
||||
logger.debug('Connecting to live with llm_request:%s', llm_request)
|
||||
logger.debug('Live connect config: %s', llm_request.live_connect_config)
|
||||
async with self._live_api_client.aio.live.connect(
|
||||
model=llm_request.model, config=llm_request.live_connect_config
|
||||
) as live_session:
|
||||
|
||||
Reference in New Issue
Block a user