add self.logger = logger for e2b_executor (#537)

This commit is contained in:
femto 2025-02-07 18:22:58 +08:00 committed by GitHub
parent 8965b6a573
commit da1d7b9094
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -38,6 +38,7 @@ except ModuleNotFoundError:
class E2BExecutor: class E2BExecutor:
def __init__(self, additional_imports: List[str], tools: List[Tool], logger): def __init__(self, additional_imports: List[str], tools: List[Tool], logger):
self.logger = logger
try: try:
from e2b_code_interpreter import Sandbox from e2b_code_interpreter import Sandbox
except ModuleNotFoundError: except ModuleNotFoundError:
@ -58,7 +59,6 @@ class E2BExecutor:
# timeout=300 # timeout=300
# ) # )
# print("Installation of agents package finished.") # print("Installation of agents package finished.")
self.logger = logger
additional_imports = additional_imports + ["smolagents"] additional_imports = additional_imports + ["smolagents"]
if len(additional_imports) > 0: if len(additional_imports) > 0:
execution = self.sbx.commands.run("pip install " + " ".join(additional_imports)) execution = self.sbx.commands.run("pip install " + " ".join(additional_imports))