Fix : displaying issue + various bug
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -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:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user