Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkbrnd committed Feb 12, 2025
1 parent d281d28 commit ac562e0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libs/agno/agno/models/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ def get_content_string(self) -> str:
if isinstance(self.content, str):
return self.content
if isinstance(self.content, list):
return self.content[0].get("text")
if len(self.content) > 0 and isinstance(self.content[0], dict) and "text" in self.content[0]:
return self.content[0].get("text")
else:
return json.dumps(self.content, indent=2)
return ""

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

0 comments on commit ac562e0

Please sign in to comment.