From 4f07228f572d129631d88b0ae5b79ceb897ebc86 Mon Sep 17 00:00:00 2001 From: Google Team Member Date: Fri, 12 Sep 2025 16:03:21 -0700 Subject: [PATCH] chore: Move framework filled params to the end in the BigQuery forecast tool This is for better readability of the tool, specially in relation to the examples in the docstring. PiperOrigin-RevId: 806460056 --- src/google/adk/tools/bigquery/query_tool.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/google/adk/tools/bigquery/query_tool.py b/src/google/adk/tools/bigquery/query_tool.py index f4a82871..e66ea3ac 100644 --- a/src/google/adk/tools/bigquery/query_tool.py +++ b/src/google/adk/tools/bigquery/query_tool.py @@ -604,11 +604,12 @@ def forecast( history_data: str, timestamp_col: str, data_col: str, + horizon: int = 10, + id_cols: Optional[list[str]] = None, + *, credentials: Credentials, settings: BigQueryToolConfig, tool_context: ToolContext, - horizon: int = 10, - id_cols: Optional[list[str]] = None, ) -> dict: """Run a BigQuery AI time series forecast using AI.FORECAST. @@ -622,14 +623,14 @@ def forecast( each data point. data_col (str): The name of the column containing the numerical values to be forecasted. - credentials (Credentials): The credentials to use for the request. - settings (BigQueryToolConfig): The settings for the tool. - tool_context (ToolContext): The context for the tool. horizon (int, optional): The number of time steps to forecast into the future. Defaults to 10. id_cols (list, optional): The column names of the id columns to indicate each time series when there are multiple time series in the table. All elements must be strings. Defaults to None. + credentials (Credentials): The credentials to use for the request. + settings (BigQueryToolConfig): The settings for the tool. + tool_context (ToolContext): The context for the tool. Returns: dict: Dictionary representing the result of the forecast. The result