refactor : pre-backend implementation

This commit is contained in:
martin legrand
2025-04-14 16:55:15 +02:00
parent ecbdcaa57e
commit 592c7e6915
5 changed files with 108 additions and 28 deletions
+1 -16
View File
@@ -7,25 +7,10 @@ import time
from sources.memory import Memory
from sources.utility import pretty_print
from sources.schemas import executorResult
random.seed(time.time())
class executorResult:
"""
A class to store the result of a tool execution.
"""
def __init__(self, block, feedback, success, tool_type):
self.block = block
self.feedback = feedback
self.success = success
self.tool_type = tool_type
def show(self):
pretty_print(''*64, color="status")
pretty_print(self.block, color="code" if self.success else "failure")
pretty_print(''*64, color="status")
pretty_print(self.feedback, color="success" if self.success else "failure")
class Agent():
"""
An abstract class for all agents.