Skip to content

Commit 26a5b37

Browse files
committed
fix: only return text from subagents
1 parent 7e34f3e commit 26a5b37

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

redel/delegation/delegate_and_wait.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ async def _task():
7272
async for stream in helper.full_round_stream(instructions):
7373
msg = await stream.message()
7474
log.info(f"{helper.name}-{helper.depth}: {msg}")
75-
if msg.role == ChatRole.ASSISTANT and msg.content:
76-
result.append(msg.content)
75+
if msg.role == ChatRole.ASSISTANT and msg.text:
76+
result.append(msg.text)
7777
await helper.cleanup()
7878
return "\n".join(result), helper.name
7979
except Exception as e:

redel/delegation/delegate_one.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async def delegate(
4242
async for stream in helper.full_round_stream(instructions, max_function_rounds=5): # TODO temp
4343
msg = await stream.message()
4444
log.info(msg)
45-
if msg.role == ChatRole.ASSISTANT and msg.content:
46-
result.append(msg.content)
45+
if msg.role == ChatRole.ASSISTANT and msg.text:
46+
result.append(msg.text)
4747
await helper.cleanup()
4848
return "\n".join(result)

0 commit comments

Comments
 (0)