You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: handle ChatMessage objects in log_messages by converting at call sites
- Modified memory.py to convert ChatMessage objects to dicts before calling log_messages
- Kept AgentLogger.log_messages interface clean - only accepts list[dict] as documented
- Fixes TypeError when calling agent.replay(detailed=True)
- Conversion happens at the 2 call sites in ActionStep and PlanningStep replay
- Maintains type safety and clear separation of concerns
This cleaner approach:
- Makes the log_messages interface predictable and type-safe
- Explicitly converts ChatMessage objects where they're used
- Avoids mixing domain objects with logging utilities
- Follows 'be conservative in what you send' principle
Resolves issue where replay(detailed=True) would crash with:
TypeError: 'ChatMessage' object is not iterable
0 commit comments