You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
fix: save sessions with camelCase aliases
Make sure that the adk run --save_session writes session JSON using the Pydantic camelCase aliases (by_alias=True), matching ADK Web and keeping session files consistent Close #3558 Co-authored-by: George Weale <gweale@google.com> PiperOrigin-RevId: 834847209
This commit is contained in:
committed by
Copybara-Service
parent
caf23ac49f
commit
bf8b85da52
@@ -218,6 +218,8 @@ async def run_cli(
|
||||
session_id=session.id,
|
||||
)
|
||||
with open(session_path, 'w', encoding='utf-8') as f:
|
||||
f.write(session.model_dump_json(indent=2, exclude_none=True))
|
||||
f.write(
|
||||
session.model_dump_json(indent=2, exclude_none=True, by_alias=True)
|
||||
)
|
||||
|
||||
print('Session saved to', session_path)
|
||||
|
||||
Reference in New Issue
Block a user