File size: 352 Bytes
718aa48 fb07cb8 a50063c |
1 2 3 4 5 6 7 8 9 10 11 |
def aggregate_responses(responses: list) -> str:
if not responses:
return "No responses received."
# Sanitize: only join valid strings
safe_responses = [r if isinstance(r, str) else str(r) for r in responses]
combined = "\n".join(safe_responses)
return f"Final synthesized response based on multiple agents:\n{combined}"
|