diff --git a/media/exemples/basic_web_search.png b/media/exemples/basic_web_search.png new file mode 100644 index 0000000..c1eaab2 Binary files /dev/null and b/media/exemples/basic_web_search.png differ diff --git a/media/exemples/files_interaction.png b/media/exemples/files_interaction.png new file mode 100644 index 0000000..ac57958 Binary files /dev/null and b/media/exemples/files_interaction.png differ diff --git a/media/exemples/find_files.png b/media/exemples/find_files.png new file mode 100644 index 0000000..d5b4406 Binary files /dev/null and b/media/exemples/find_files.png differ diff --git a/media/whale_readme.jpg b/media/whale_readme.jpg new file mode 100644 index 0000000..1ad7539 Binary files /dev/null and b/media/whale_readme.jpg differ diff --git a/sources/agents/agent.py b/sources/agents/agent.py index fa5d7d2..37205c3 100644 --- a/sources/agents/agent.py +++ b/sources/agents/agent.py @@ -3,10 +3,13 @@ from typing import Tuple, Callable from abc import abstractmethod import os import random +import time from sources.memory import Memory from sources.utility import pretty_print +random.seed(time.time()) + class executorResult: """ A class to store the result of a tool execution. @@ -106,7 +109,6 @@ class Agent(): if speech_module is None: return messages = ["Please be patient sir, I am working on it.", - "At it, sir. In the meantime, how about a joke?", "Computing... I recommand you have a coffee while I work.", "Hold on, I’m crunching numbers.", "Working on it sir, please let me think."] diff --git a/sources/agents/casual_agent.py b/sources/agents/casual_agent.py index 0b5f6ca..314c3b8 100644 --- a/sources/agents/casual_agent.py +++ b/sources/agents/casual_agent.py @@ -22,7 +22,6 @@ class CasualAgent(Agent): def process(self, prompt, speech_module) -> str: complete = False - exec_success = False self.memory.push('user', prompt) self.wait_message(speech_module) diff --git a/sources/agents/file_agent.py b/sources/agents/file_agent.py index 3f69ac1..cc16adb 100644 --- a/sources/agents/file_agent.py +++ b/sources/agents/file_agent.py @@ -30,6 +30,10 @@ class FileAgent(Agent): exec_success, _ = self.execute_modules(answer) answer = self.remove_blocks(answer) self.last_answer = answer + complete = True + for name, tool in self.tools.items(): + if tool.found_executable_blocks(): + complete = False # AI read results and continue the conversation return answer, reasoning if __name__ == "__main__": diff --git a/sources/tools/fileFinder.py b/sources/tools/fileFinder.py index 715b343..273356c 100644 --- a/sources/tools/fileFinder.py +++ b/sources/tools/fileFinder.py @@ -62,7 +62,6 @@ class FileFinder(Tools): file_path = None excluded_files = [".pyc", ".o", ".so", ".a", ".lib", ".dll", ".dylib", ".so", ".git"] for root, dirs, files in os.walk(directory_path): - print(f"Root: {root}, Files: {files}") for file in files: if any(excluded_file in file for excluded_file in excluded_files): continue