From 0e7dc3557a0f83db4afe173133ff4a62e2dc5221 Mon Sep 17 00:00:00 2001 From: Kye Gomez Date: Sat, 27 Jul 2024 19:38:46 -0400 Subject: [PATCH] [FIXES] --- example.py | 2 +- pyproject.toml | 2 +- swarms/structs/agent.py | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/example.py b/example.py index 4410ceb0..c647556d 100644 --- a/example.py +++ b/example.py @@ -10,7 +10,7 @@ agent = Agent( agent_name="Financial-Analysis-Agent", system_prompt=FINANCIAL_AGENT_SYS_PROMPT, llm=model, - max_loops=1, + max_loops=2, autosave=True, # dynamic_temperature_enabled=True, dashboard=False, diff --git a/pyproject.toml b/pyproject.toml index 9ad22d31..6dfae968 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "5.4.3" +version = "5.4.4" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/swarms/structs/agent.py b/swarms/structs/agent.py index a7854a70..9e493ee4 100644 --- a/swarms/structs/agent.py +++ b/swarms/structs/agent.py @@ -357,7 +357,7 @@ class Agent(BaseStructure): self.top_k = top_k self.frequency_penalty = frequency_penalty self.presence_penalty = presence_penalty - self.temperature + self.temperature = temperature # Name self.name = agent_name @@ -808,7 +808,7 @@ class Agent(BaseStructure): content=evaluated_response, ) - all_responses.append(evaluated_response) + # all_responses.append(evaluated_response) # Sentiment analysis if self.sentiment_analyzer: @@ -886,8 +886,11 @@ class Agent(BaseStructure): if self.agent_ops_on is True: self.check_end_session_agentops() + # final_response = " ".join(all_responses) + all_responses = [response for response in all_responses if response is not None] final_response = " ".join(all_responses) + if self.return_history: return self.short_memory.return_history_as_string() else: