mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
chore: Stop logging the full content of LLM blobs
The blob content is often large and binary, which makes the logs unreadable and can cause excessive logging. Co-authored-by: Hangfei Lin <hangfei@google.com> PiperOrigin-RevId: 828523413
This commit is contained in:
committed by
Copybara-Service
parent
aa77834e2e
commit
082675546f
@@ -105,13 +105,14 @@ class GeminiLlmConnection(BaseLlmConnection):
|
||||
"""
|
||||
if isinstance(input, types.Blob):
|
||||
input_blob = input.model_dump()
|
||||
logger.debug('Sending LLM Blob: %s', input_blob)
|
||||
# The blob is binary and is very large. So let's not log it.
|
||||
logger.debug('Sending LLM Blob.')
|
||||
await self._gemini_session.send(input=input_blob)
|
||||
elif isinstance(input, types.ActivityStart):
|
||||
logger.debug('Sending LLM activity start signal')
|
||||
logger.debug('Sending LLM activity start signal.')
|
||||
await self._gemini_session.send_realtime_input(activity_start=input)
|
||||
elif isinstance(input, types.ActivityEnd):
|
||||
logger.debug('Sending LLM activity end signal')
|
||||
logger.debug('Sending LLM activity end signal.')
|
||||
await self._gemini_session.send_realtime_input(activity_end=input)
|
||||
else:
|
||||
raise ValueError('Unsupported input type: %s' % type(input))
|
||||
|
||||
Reference in New Issue
Block a user