Skip to content

Commit ea08170

Browse files
committed
fix: change tos environment variable
1 parent 96efdbc commit ea08170

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

veadk/tools/builtin_tools/execute_skills.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,24 @@ def execute_skills(
9191
cmd.extend(["--skills"] + skills)
9292

9393
# TODO: remove after agentkit supports custom environment variables setting
94+
res = ve_request(
95+
request_body={},
96+
action="GetCallerIdentity",
97+
ak=ak,
98+
sk=sk,
99+
service="sts",
100+
version="2018-01-01",
101+
region=region,
102+
host="sts.volcengineapi.com",
103+
)
104+
try:
105+
account_id = res["Result"]["AccountId"]
106+
except KeyError as e:
107+
logger.error(f"Error occurred while getting account id: {e}, response is {res}")
108+
return res
109+
94110
env_vars = {
95-
"TOS_SKILLS_DIR": os.getenv("TOS_SKILLS_DIR"),
111+
"TOS_SKILLS_DIR": f"tos://agentkit-platform-{account_id}/skills/",
96112
"TOOL_USER_SESSION_ID": tool_user_session_id,
97113
}
98114

0 commit comments

Comments
 (0)