From b769e90b7b1f5875e16ce5994f7238b3cb33e08b Mon Sep 17 00:00:00 2001 From: TransformerOptimus Date: Fri, 14 Jul 2023 19:33:11 +0530 Subject: [PATCH] cleaning up the initial prompt --- superagi/helper/feed_parser.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/superagi/helper/feed_parser.py b/superagi/helper/feed_parser.py index 5ed13d2fb..c1e868b38 100644 --- a/superagi/helper/feed_parser.py +++ b/superagi/helper/feed_parser.py @@ -41,7 +41,12 @@ def parse_feed(feed): "time_difference": feed.time_difference} except Exception: return feed + if feed.role == "system": - return feed + final_output = feed.feed + if "json-schema.org" in feed.feed: + final_output = feed.feed.split("TOOLS")[0] + return {"role": "system", "feed": final_output, "updated_at": feed.updated_at, + "time_difference": feed.time_difference} return feed