Skip to content

Commit 70b6ece

Browse files
committed
adding the new image
1 parent e1cc8ae commit 70b6ece

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

examples/tutorials/10_async/10_temporal/010_agent_chat/tests/test_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ async def test_multi_turn_conversation(self, client: AsyncAgentex, agent_id: str
156156
agent_id=agent_id,
157157
task_id=task.id,
158158
user_message=user_message_1,
159-
timeout=20,
159+
timeout=30,
160160
sleep_interval=1.0,
161161
):
162162
assert isinstance(message, TaskMessage)

examples/tutorials/test_utils/async_utils.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,16 +125,10 @@ async def poll_messages(
125125

126126
if yield_updates:
127127
# For streaming: track content changes
128-
content_str = message.content.content if message.content and hasattr(message.content, 'content') else ""
129-
# Ensure content_str is always a string to avoid concatenation errors
130-
if isinstance(content_str, list):
131-
# If it's a list, convert to string representation
132-
content_str = str(content_str)
133-
elif content_str is None:
134-
content_str = ""
135-
elif not isinstance(content_str, str):
136-
# Handle any other non-string types
137-
content_str = str(content_str)
128+
# Use getattr to safely extract content and convert to string
129+
# This handles various content structures at runtime
130+
raw_content = getattr(message.content, 'content', message.content) if message.content else None
131+
content_str = str(raw_content) if raw_content is not None else ""
138132

139133
# Ensure streaming_status is also properly converted to string
140134
streaming_status_str = str(message.streaming_status) if message.streaming_status is not None else ""

0 commit comments

Comments
 (0)