You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
addressing comments - tidy ups
This commit is contained in:
@@ -47,7 +47,7 @@ class GoogleApiTool(BaseTool):
|
||||
is_long_running=rest_api_tool.is_long_running,
|
||||
)
|
||||
self._rest_api_tool = rest_api_tool
|
||||
self._rest_api_tool.set_default_headers(additional_headers or {})
|
||||
if additional_headers: self._rest_api_tool.set_default_headers(additional_headers)
|
||||
if service_account is not None:
|
||||
self.configure_sa_auth(service_account)
|
||||
elif client_id is not None and client_secret is not None:
|
||||
|
||||
@@ -67,7 +67,7 @@ class GoogleApiToolset(BaseToolset):
|
||||
self._client_id = client_id
|
||||
self._client_secret = client_secret
|
||||
self._service_account = service_account
|
||||
self._additional_headers = dict(additional_headers or {})
|
||||
self._additional_headers = additional_headers
|
||||
self._openapi_toolset = self._load_toolset_with_oidc_auth()
|
||||
|
||||
@override
|
||||
|
||||
@@ -128,13 +128,13 @@ class RestApiTool(BaseTool):
|
||||
else operation
|
||||
)
|
||||
self.auth_credential, self.auth_scheme = None, None
|
||||
self._default_headers: Dict[str, str] = {}
|
||||
|
||||
self.configure_auth_credential(auth_credential)
|
||||
self.configure_auth_scheme(auth_scheme)
|
||||
|
||||
# Private properties
|
||||
self.credential_exchanger = AutoAuthCredentialExchanger()
|
||||
self._default_headers: Dict[str, str] = {}
|
||||
if should_parse_operation:
|
||||
self._operation_parser = OperationParser(self.operation)
|
||||
|
||||
@@ -219,7 +219,7 @@ class RestApiTool(BaseTool):
|
||||
|
||||
def set_default_headers(self, headers: Dict[str, str]):
|
||||
"""Sets default headers that are merged into every request."""
|
||||
self._default_headers = dict(headers)
|
||||
self._default_headers = headers
|
||||
|
||||
def _prepare_auth_request_params(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user