Skip to content

Commit ab14a32

Browse files
Update src/google/adk/memory/sqlite_memory_service.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 7b8fe1a commit ab14a32

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/google/adk/memory/sqlite_memory_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,7 @@ def _enforce_max_bytes(
463463
for item in (session_json, search_text, extracted_json, metadata_json):
464464
if item:
465465
total_bytes += len(item.encode("utf-8"))
466-
if total_bytes > max_bytes:
467-
raise ValueError(f"Session payload is too large ({total_bytes} bytes).")
466+
raise ValueError(f"Session payload is too large ({total_bytes} bytes), exceeding the limit of {max_bytes} bytes.")
468467

469468

470469
def _build_raw_text(events: list[Event]) -> str:

0 commit comments

Comments
 (0)