diff --git a/sources/agents/agent.py b/sources/agents/agent.py index a154867..5f49cec 100644 --- a/sources/agents/agent.py +++ b/sources/agents/agent.py @@ -248,7 +248,6 @@ class Agent(): answer = "I will execute:\n" + answer # there should always be a text before blocks for the function that display answer self.success = True - self.blocks_result = [] for name, tool in self.tools.items(): feedback = "" blocks, save_path = tool.load_exec_block(answer) diff --git a/sources/agents/code_agent.py b/sources/agents/code_agent.py index fd030de..f7ba3b9 100644 --- a/sources/agents/code_agent.py +++ b/sources/agents/code_agent.py @@ -46,7 +46,7 @@ class CoderAgent(Agent): async def process(self, prompt, speech_module) -> str: answer = "" attempt = 0 - max_attempts = 4 + max_attempts = 5 prompt = self.add_sys_info_prompt(prompt) self.memory.push('user', prompt) clarify_trigger = "REQUEST_CLARIFICATION" diff --git a/sources/interaction.py b/sources/interaction.py index d814658..e878d5d 100644 --- a/sources/interaction.py +++ b/sources/interaction.py @@ -140,6 +140,11 @@ class Interaction: self.last_query = query return query + def set_query(self, query: str) -> None: + """Set the query""" + self.is_active = True + self.last_query = query + async def think(self) -> bool: """Request AI agents to process the user input.""" push_last_agent_memory = False