File tree Expand file tree Collapse file tree
integrations/strands/python/examples Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ def _message_text(message: Message | object) -> str:
4343 ]
4444 return "\n " .join (parts ) if parts else str (message )
4545
46+
4647# ---------------------------------------------------------------------------
4748# Configuration
4849# ---------------------------------------------------------------------------
@@ -116,8 +117,7 @@ async def main() -> None:
116117 # Flush pending extraction writes before moving on.
117118 if agent1 .memory_manager is not None :
118119 await agent1 .memory_manager .flush ()
119- text = getattr (result , "message" , None ) or result
120- print (f"Agent: { text } \n " )
120+ print (f"Agent: { _message_text (result .message )} \n " )
121121
122122 wait_seconds = 20
123123 print (f"--- Waiting { wait_seconds } s for Zep to process the graph ---\n " )
@@ -128,8 +128,7 @@ async def main() -> None:
128128 recall = "Where do I live, and what do I like to do on weekends?"
129129 print (f"User: { recall } " )
130130 result = await agent2 .invoke_async (recall )
131- text = getattr (result , "message" , None ) or result
132- print (f"Agent: { text } \n " )
131+ print (f"Agent: { _message_text (result .message )} \n " )
133132
134133
135134if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments