You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/smolagents/agents.py
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -907,13 +907,6 @@ def __init__(
907
907
raiseAgentError(
908
908
"Tag '{{authorized_imports}}' should be provided in the prompt."
909
909
)
910
-
911
-
if"*"inself.additional_authorized_imports:
912
-
self.logger.log(
913
-
"Caution: you set an authorization for all imports, meaning your agent can decide to import any package it deems necessary. This might raise issues if the package is not installed in your environment.",
914
-
0,
915
-
)
916
-
917
910
super().__init__(
918
911
tools=tools,
919
912
model=model,
@@ -922,6 +915,12 @@ def __init__(
922
915
planning_interval=planning_interval,
923
916
**kwargs,
924
917
)
918
+
if"*"inself.additional_authorized_imports:
919
+
self.logger.log(
920
+
"Caution: you set an authorization for all imports, meaning your agent can decide to import any package it deems necessary. This might raise issues if the package is not installed in your environment.",
921
+
0,
922
+
)
923
+
925
924
ifuse_e2b_executorandlen(self.managed_agents) >0:
926
925
raiseException(
927
926
f"You passed both {use_e2b_executor=} and some managed agents. Managed agents is not yet supported with remote code execution."
0 commit comments