Fix : displaying issue + various bug

This commit is contained in:
martin legrand
2025-03-06 20:43:15 +01:00
parent 7df41da534
commit b29c3cd7fb
3 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -126,6 +126,7 @@ class Agent():
self.blocks_result[block_idx].show()
else:
pretty_print(line, color="output")
self.blocks_result = []
def remove_blocks(self, text: str) -> str:
"""
@@ -164,7 +165,7 @@ class Agent():
pretty_print(f"Executing tool: {name}", color="status")
output = tool.execute(blocks)
feedback = tool.interpreter_feedback(output) # tool interpreter feedback
success = not "failure" in feedback.lower()
success = not tool.execution_failure_check(output)
pretty_print(feedback, color="success" if success else "failure")
self.memory.push('user', feedback)
self.blocks_result.append(executorResult(blocks, feedback, success))
+3 -4
View File
@@ -2,7 +2,6 @@ import os
import stat
import mimetypes
import configparser
from abc import ABC
if __name__ == "__main__":
from tools import Tools
@@ -10,7 +9,7 @@ else:
from sources.tools.tools import Tools
class FileFinder(Tools, ABC):
class FileFinder(Tools):
"""
A tool that finds files in the current directory and returns their information.
"""
@@ -19,8 +18,8 @@ class FileFinder(Tools, ABC):
self.tag = "file_finder"
self.current_dir = os.path.dirname(os.getcwd())
config = configparser.ConfigParser()
config.read('../../config.ini')
self.current_dir = config['MAIN']['current_dir']
config.read('./config.ini')
self.current_dir = config['MAIN']['work_dir']
def read_file(self, file_path: str) -> str:
"""