Load and Save state in AgentChat (#4436)

1. convert dataclass types to pydantic basemodel 
2. add save_state and load_state for ChatAgent
3. state types for AgentChat
---------

Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
This commit is contained in:
Victor Dibia
2024-12-04 16:14:41 -08:00
committed by GitHub
parent fef06fdc8a
commit 777f2abbd7
39 changed files with 3684 additions and 2964 deletions

View File

@@ -33,7 +33,7 @@ class LLMAgent(RoutedAgent):
@property
def _fixed_message_history_type(self) -> List[SystemMessage]:
return [SystemMessage(msg.content) for msg in self._chat_history]
return [SystemMessage(content=msg.content) for msg in self._chat_history]
@default_subscription