From 2dfbe42d649c0eb5297864d82607ef0600258917 Mon Sep 17 00:00:00 2001 From: Dmitry Paramonov Date: Tue, 28 May 2024 11:14:43 +0300 Subject: [PATCH] fix: Strip closing ct:summarized-messages tag --- agents-api/agents_api/rec_sum/summarize.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/agents-api/agents_api/rec_sum/summarize.py b/agents-api/agents_api/rec_sum/summarize.py index f0146210e..59d8f1c01 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))