Skip to content

Commit 29ac679

Browse files
authored
chore(tools): set default endpoints of sandbox tools (#280)
1 parent 05b7736 commit 29ac679

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

veadk/tools/builtin_tools/run_code.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ def run_code(code: str, language: str, tool_context: ToolContext) -> str:
3737
"""
3838

3939
tool_id = getenv("AGENTKIT_TOOL_ID")
40-
host = getenv("AGENTKIT_TOOL_HOST") # temporary host for code run tool
40+
4141
service = getenv(
42-
"AGENTKIT_TOOL_SERVICE_CODE"
42+
"AGENTKIT_TOOL_SERVICE_CODE", "agentkit"
4343
) # temporary service for code run tool
4444
region = getenv("AGENTKIT_TOOL_REGION", "cn-beijing")
45+
host = getenv(
46+
"AGENTKIT_TOOL_HOST", service + "." + region + ".volces.com "
47+
) # temporary host for code run tool
48+
logger.debug(f"tools endpoint: {host}")
4549

4650
session_id = tool_context._invocation_context.session.id
4751
agent_name = tool_context._invocation_context.agent.name

0 commit comments

Comments
 (0)