From 24b981753ddc08c4f910aaa2f68cdb74ee9828ca Mon Sep 17 00:00:00 2001 From: Kalki Date: Fri, 15 Sep 2023 11:28:39 +0530 Subject: [PATCH 1/6] Dev Fixes --- gui/pages/Content/Agents/ActivityFeed.js | 2 +- superagi/worker.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/pages/Content/Agents/ActivityFeed.js b/gui/pages/Content/Agents/ActivityFeed.js index d2bfe1da7..9b92c77ab 100644 --- a/gui/pages/Content/Agents/ActivityFeed.js +++ b/gui/pages/Content/Agents/ActivityFeed.js @@ -185,7 +185,7 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
-
{parseTextWithLinks(errorMsg)}
+
{errorMsg}
} diff --git a/superagi/worker.py b/superagi/worker.py index cf5987805..47552a2dd 100644 --- a/superagi/worker.py +++ b/superagi/worker.py @@ -99,7 +99,7 @@ def summarize_resource(agent_id: int, resource_id: int): documents = ResourceManager(str(agent_id)).create_llama_document(file_path) logger.info("Summarize resource:" + str(agent_id) + "," + str(resource_id)) - resource_summarizer = ResourceSummarizer(session=session, agent_id=agent_id) + resource_summarizer = ResourceSummarizer(session=session, agent_id=agent_id, model=agent_config["model"]) resource_summarizer.add_to_vector_store_and_create_summary(resource_id=resource_id, documents=documents) session.close() From bb0d27a4bab7316fba4e229eb8627b68409f3ae2 Mon Sep 17 00:00:00 2001 From: Kalki Date: Fri, 15 Sep 2023 12:37:48 +0530 Subject: [PATCH 2/6] Dev Fixes --- gui/pages/Content/Agents/ActivityFeed.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/gui/pages/Content/Agents/ActivityFeed.js b/gui/pages/Content/Agents/ActivityFeed.js index 9b92c77ab..0d341852f 100644 --- a/gui/pages/Content/Agents/ActivityFeed.js +++ b/gui/pages/Content/Agents/ActivityFeed.js @@ -16,7 +16,6 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat const [scheduleTime, setScheduleTime] = useState(null); const [isLoading, setIsLoading] = useState(true); const [waitingPeriod, setWaitingPeriod] = useState(null); - const [waitingPeriodOver, setWaitingPeriodOver] = useState(null); const [errorMsg, setErrorMsg] = useState(''); useEffect(() => { @@ -78,10 +77,6 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat EventBus.emit('reFetchAgents', {}); }, [runStatus]) - useEffect(() => { - setWaitingPeriodOver(updateDateBasedOnValue(convertWaitingPeriod(waitingPeriod))) - }, [waitingPeriod]); - function fetchFeeds() { if (selectedRunId !== null) { setIsLoading(true); @@ -157,7 +152,7 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat
-
Waiting Block Initiated. The Agent will wait for {convertWaitingPeriod(waitingPeriod) || null} and continue on {waitingPeriodOver || 'soon'}
+
Waiting Block Initiated. The Agent will wait for {convertWaitingPeriod(waitingPeriod) || null}
} {runStatus === 'RUNNING' && From 493698ff5c9f92d67c887601e60f283cbb53cea6 Mon Sep 17 00:00:00 2001 From: Kalki Date: Fri, 15 Sep 2023 12:41:32 +0530 Subject: [PATCH 3/6] Dev Fixes --- superagi/agent/agent_iteration_step_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/superagi/agent/agent_iteration_step_handler.py b/superagi/agent/agent_iteration_step_handler.py index 6c0f33e9f..dd5a14575 100644 --- a/superagi/agent/agent_iteration_step_handler.py +++ b/superagi/agent/agent_iteration_step_handler.py @@ -90,7 +90,8 @@ def execute_step(self): print("Decoding JSON has failed") tool_name = '' - CallLogHelper(session=self.session, organisation_id=organisation.id).create_call_log(execution.name,agent_config['agent_id'],total_tokens, tool_name,agent_config['model']) + CallLogHelper(session=self.session, organisation_id=organisation.id).create_call_log(execution.name, + agent_config['agent_id'], total_tokens, tool_name, agent_config['model']) assistant_reply = response['content'] output_handler = get_output_handler(iteration_workflow_step.output_type, From d8b43a9bb4ea872e319eda10d2254c94094c0210 Mon Sep 17 00:00:00 2001 From: Kalki Date: Fri, 15 Sep 2023 12:41:41 +0530 Subject: [PATCH 4/6] Dev Fixes --- gui/utils/utils.js | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/gui/utils/utils.js b/gui/utils/utils.js index b00bcff19..7ef7015ce 100644 --- a/gui/utils/utils.js +++ b/gui/utils/utils.js @@ -523,23 +523,23 @@ export const convertWaitingPeriod = (waitingPeriod) => { return convertedValue + ' ' + unit; } -export const updateDateBasedOnValue = (convertedValue, inputDate = new Date()) => { - const [value, unit] = convertedValue.split(' '); - const unitConversion = { - 'seconds': 1000, - 'minutes': 1000 * 60, - 'hours': 1000 * 60 * 60, - 'days': 1000 * 60 * 60 * 24, - 'weeks': 1000 * 60 * 60 * 24 * 7 - }; - - const updatedDate = new Date(inputDate.getTime() + parseInt(value, 10) * unitConversion[unit]); - - return updatedDate.toLocaleString('en-US', { - day: 'numeric', - month: 'long', - year: 'numeric', - hour: 'numeric', - minute: 'numeric' - }); -} \ No newline at end of file +// export const updateDateBasedOnValue = (convertedValue, inputDate = new Date()) => { +// const [value, unit] = convertedValue.split(' '); +// const unitConversion = { +// 'seconds': 1000, +// 'minutes': 1000 * 60, +// 'hours': 1000 * 60 * 60, +// 'days': 1000 * 60 * 60 * 24, +// 'weeks': 1000 * 60 * 60 * 24 * 7 +// }; +// +// const updatedDate = new Date(inputDate.getTime() + parseInt(value, 10) * unitConversion[unit]); +// +// return updatedDate.toLocaleString('en-US', { +// day: 'numeric', +// month: 'long', +// year: 'numeric', +// hour: 'numeric', +// minute: 'numeric' +// }); +// } \ No newline at end of file From bbdaae2b2dc0be57e6890c0681b70dfb96706b54 Mon Sep 17 00:00:00 2001 From: Kalki Date: Fri, 15 Sep 2023 13:08:21 +0530 Subject: [PATCH 5/6] Dev Fixes --- gui/pages/Content/Agents/ActivityFeed.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/pages/Content/Agents/ActivityFeed.js b/gui/pages/Content/Agents/ActivityFeed.js index 0d341852f..89cd97709 100644 --- a/gui/pages/Content/Agents/ActivityFeed.js +++ b/gui/pages/Content/Agents/ActivityFeed.js @@ -20,7 +20,7 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat useEffect(() => { const interval = window.setInterval(function () { - if (selectedRunStatus === "RUNNING") { + if (selectedRunStatus !== "ERROR_PAUSED") { fetchFeeds(); } }, 5000); @@ -83,6 +83,8 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat getExecutionFeeds(selectedRunId) .then((response) => { const data = response.data; + console.log(data) + console.log(data.status) setFeeds(data.feeds); setErrorMsg(data.errors) setRunStatus(data.status); From e4088354c4245e02d555a00bd49748c9f86e8037 Mon Sep 17 00:00:00 2001 From: Kalki Date: Fri, 15 Sep 2023 13:33:44 +0530 Subject: [PATCH 6/6] Dev Fixes --- gui/pages/Content/Agents/ActivityFeed.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/gui/pages/Content/Agents/ActivityFeed.js b/gui/pages/Content/Agents/ActivityFeed.js index 89cd97709..36b0b7c91 100644 --- a/gui/pages/Content/Agents/ActivityFeed.js +++ b/gui/pages/Content/Agents/ActivityFeed.js @@ -83,8 +83,6 @@ export default function ActivityFeed({selectedRunId, selectedView, setFetchedDat getExecutionFeeds(selectedRunId) .then((response) => { const data = response.data; - console.log(data) - console.log(data.status) setFeeds(data.feeds); setErrorMsg(data.errors) setRunStatus(data.status);