Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: remove loading from module (#2196)
Sarah Wooders281f2209561d
diff --git a/letta/agent.py b/letta/agent.pyindex 12368a939..a09fd04c4 100644--- a/letta/agent.py+++ b/letta/agent.py@@ -477,10 +477,10 @@ class Agent(BaseAgent):for tool in tools:try:# WARNING: name may not be consistent?- if tool.module: # execute the whole module- exec(tool.module, env)- else:- exec(tool.source_code, env)+ # if tool.module: # execute the whole module+ # exec(tool.module, env)+ # else:+ exec(tool.source_code, env)self.functions_python[tool.json_schema["name"]] = env[tool.json_schema["name"]]self.functions.append(tool.json_schema)except Exception: