File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
veadk/tools/builtin_tools Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments