diff --git a/agents-api/agents_api/rec_sum/summarize.py b/agents-api/agents_api/rec_sum/summarize.py index f0146210e..e103addfe 100644 --- a/agents-api/agents_api/rec_sum/summarize.py +++ b/agents-api/agents_api/rec_sum/summarize.py @@ -77,7 +77,10 @@ async def summarize_messages( assert "" in result["content"] summarized_messages = json.loads( - result["content"].split("")[-1].strip() + result["content"] + .split("")[-1] + .replace("", "") + .strip() ) assert all((msg.get("summarizes") is not None for msg in summarized_messages))