2727class BaseAgentkitClient (BaseServiceClient ):
2828 """
2929 Base client for all AgentKit services.
30-
30+
3131 This class provides:
3232 1. Common credential initialization
3333 2. Unified API invocation logic with error handling
3434 3. Automatic ApiInfo generation with flexible configuration
35-
35+
3636 Subclasses should override API_ACTIONS with either:
3737 - Simple dict mapping: {"ActionName": "ActionName"}
3838 - Detailed ApiConfig: {"ActionName": ApiConfig(action="ActionName", method="GET", path="/custom")}
3939 """
40-
40+
4141 # Subclasses should override this with their API action configurations
4242 API_ACTIONS : Dict [str , Union [str , ApiConfig ]] = {}
43-
43+
4444 def __init__ (
4545 self ,
4646 access_key : str = "" ,
@@ -52,7 +52,7 @@ def __init__(
5252 ) -> None :
5353 """
5454 Initialize the AgentKit client.
55-
55+
5656 Args:
5757 access_key: Volcengine access key
5858 secret_key: Volcengine secret key
@@ -66,27 +66,27 @@ def __init__(
6666 region = region ,
6767 session_token = session_token ,
6868 service_name = service_name ,
69- credential_env_prefix = ' AGENTKIT' ,
69+ credential_env_prefix = " AGENTKIT" ,
7070 header = header ,
7171 )
72-
72+
7373 def _get_service_config (self ) -> Dict [str , str ]:
7474 """
7575 Get AgentKit service configuration.
76-
76+
7777 Returns:
7878 Dictionary with host, api_version, and service
7979 """
8080 host , api_version , service = get_volc_agentkit_host_info ()
8181 gc = get_global_config ()
82- scheme = gc .agentkit_schema or ' https'
82+ scheme = gc .agentkit_schema or " https"
8383 return {
84- ' host' : gc .agentkit_host or host ,
85- ' api_version' : api_version ,
86- ' service' : service ,
87- ' scheme' : scheme ,
84+ " host" : gc .agentkit_host or host ,
85+ " api_version" : api_version ,
86+ " service" : service ,
87+ " scheme" : scheme ,
8888 }
89-
89+
9090 def _get (self , api_action : str , params : Dict [str , Any ] = None ) -> str :
9191 """Legacy method for GET requests."""
9292 try :
0 commit comments