diff --git a/media/exemples/brooo.png b/media/exemples/brooo.png new file mode 100644 index 0000000..74e691c Binary files /dev/null and b/media/exemples/brooo.png differ diff --git a/sources/agents/file_agent.py b/sources/agents/file_agent.py index e14f24d..0b8192d 100644 --- a/sources/agents/file_agent.py +++ b/sources/agents/file_agent.py @@ -27,13 +27,13 @@ class FileAgent(Agent): exec_success = False prompt += f"\nWork directory: {self.work_dir}" self.memory.push('user', prompt) - - self.wait_message(speech_module) - animate_thinking("Thinking...", color="status") - answer, reasoning = self.llm_request() - exec_success, _ = self.execute_modules(answer) - answer = self.remove_blocks(answer) - self.last_answer = answer + while exec_success is False: + self.wait_message(speech_module) + animate_thinking("Thinking...", color="status") + answer, reasoning = self.llm_request() + exec_success, _ = self.execute_modules(answer) + answer = self.remove_blocks(answer) + self.last_answer = answer return answer, reasoning if __name__ == "__main__":