You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-07-09 18:19:28 -07:00
chore: Add experimental decorator to BigQuery tools
PiperOrigin-RevId: 771359886
This commit is contained in:
committed by
Copybara-Service
parent
8ebf229c47
commit
a19d617ed8
@@ -31,12 +31,14 @@ from ...auth.auth_credential import AuthCredential
|
||||
from ...auth.auth_credential import AuthCredentialTypes
|
||||
from ...auth.auth_credential import OAuth2Auth
|
||||
from ...auth.auth_tool import AuthConfig
|
||||
from ...utils.feature_decorator import experimental
|
||||
from ..tool_context import ToolContext
|
||||
|
||||
BIGQUERY_TOKEN_CACHE_KEY = "bigquery_token_cache"
|
||||
BIGQUERY_DEFAULT_SCOPE = ["https://www.googleapis.com/auth/bigquery"]
|
||||
|
||||
|
||||
@experimental
|
||||
class BigQueryCredentialsConfig(BaseModel):
|
||||
"""Configuration for Google API tools. (Experimental)"""
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import inspect
|
||||
from typing import Any
|
||||
@@ -21,6 +22,7 @@ from typing import Optional
|
||||
from google.oauth2.credentials import Credentials
|
||||
from typing_extensions import override
|
||||
|
||||
from ...utils.feature_decorator import experimental
|
||||
from ..function_tool import FunctionTool
|
||||
from ..tool_context import ToolContext
|
||||
from .bigquery_credentials import BigQueryCredentialsConfig
|
||||
@@ -28,6 +30,7 @@ from .bigquery_credentials import BigQueryCredentialsManager
|
||||
from .config import BigQueryToolConfig
|
||||
|
||||
|
||||
@experimental
|
||||
class BigQueryTool(FunctionTool):
|
||||
"""GoogleApiTool class for tools that call Google APIs.
|
||||
|
||||
|
||||
@@ -26,11 +26,13 @@ from . import query_tool
|
||||
from ...tools.base_tool import BaseTool
|
||||
from ...tools.base_toolset import BaseToolset
|
||||
from ...tools.base_toolset import ToolPredicate
|
||||
from ...utils.feature_decorator import experimental
|
||||
from .bigquery_credentials import BigQueryCredentialsConfig
|
||||
from .bigquery_tool import BigQueryTool
|
||||
from .config import BigQueryToolConfig
|
||||
|
||||
|
||||
@experimental
|
||||
class BigQueryToolset(BaseToolset):
|
||||
"""BigQuery Toolset contains tools for interacting with BigQuery data and metadata."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user