Skip to content

Commit 08825ef

Browse files
authored
fix: only import modal if there is a key (#3668)
1 parent 5b580e6 commit 08825ef

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

letta/services/tool_executor/sandbox_tool_executor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from letta.services.agent_manager import AgentManager
1414
from letta.services.tool_executor.tool_executor_base import ToolExecutor
1515
from letta.services.tool_sandbox.local_sandbox import AsyncToolSandboxLocal
16-
from letta.services.tool_sandbox.modal_sandbox import AsyncToolSandboxModal
1716
from letta.settings import tool_settings
1817
from letta.types import JsonDict
1918
from letta.utils import get_friendly_error_msg
@@ -22,6 +21,8 @@
2221

2322
if tool_settings.e2b_api_key:
2423
from letta.services.tool_sandbox.e2b_sandbox import AsyncToolSandboxE2B
24+
if tool_settings.modal_api_key:
25+
from letta.services.tool_sandbox.modal_sandbox import AsyncToolSandboxModal
2526

2627

2728
class SandboxToolExecutor(ToolExecutor):

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pinecone = ["pinecone"]
115115
dev = ["pytest", "pytest-asyncio", "pexpect", "black", "pre-commit", "pyright", "pytest-order", "autoflake", "isort", "locust"]
116116
experimental = ["uvloop", "granian", "google-cloud-profiler"]
117117
server = ["websockets", "fastapi", "uvicorn"]
118-
cloud-tool-sandbox = ["e2b-code-interpreter", "modal"]
118+
cloud-tool-sandbox = ["e2b-code-interpreter", "modal"] # TODO: split this up
119119
external-tools = ["docker", "langchain", "wikipedia", "langchain-community", "firecrawl-py"]
120120
tests = ["wikipedia"]
121121
bedrock = ["boto3", "aioboto3"]

0 commit comments

Comments
 (0)