Skip to content

Commit

Permalink
Fix image/video serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkvolter committed Dec 11, 2024
1 parent 5b07b70 commit 02a6b7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions phi/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,9 @@ def get_agent_data(self) -> Dict[str, Any]:
if self.model is not None:
agent_data["model"] = self.model.to_dict()
if self.images is not None:
agent_data["images"] = [img.model_dump() for img in self.images]
agent_data["images"] = [img if isinstance(img, dict) else img.model_dump() for img in self.images]
if self.videos is not None:
agent_data["videos"] = [vid.model_dump() for vid in self.videos]
agent_data["videos"] = [vid if isinstance(vid, dict) else vid.model_dump() for vid in self.videos]
return agent_data

def get_session_data(self) -> Dict[str, Any]:
Expand Down

0 comments on commit 02a6b7f

Please sign in to comment.