google-cloud-agentplatform 2.8.0__tar.gz → 2.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {google_cloud_agentplatform-2.8.0/google_cloud_agentplatform.egg-info → google_cloud_agentplatform-2.10.0}/PKG-INFO +2 -2
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_metric_handlers.py +9 -3
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_runtimes_utils.py +5 -66
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/feedback_entries.py +2 -2
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/runtimes.py +590 -257
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/sandbox_snapshots.py +104 -1
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/sandbox_templates.py +108 -1
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/sandboxes.py +745 -147
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/types/__init__.py +50 -42
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/types/common.py +718 -632
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/frameworks/a2a.py +52 -10
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/frameworks/adk.py +7 -3
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/version.py +1 -1
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0/google_cloud_agentplatform.egg-info}/PKG-INFO +2 -2
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/google_cloud_agentplatform.egg-info/requires.txt +1 -1
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/pyproject.toml +3 -3
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/LICENSE +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/README.md +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/__init__.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/__init__.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_bigquery_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_datasets_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_builtin_tools.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_common.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_constant.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_data_converters.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_metric_loaders.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_evals_visualization.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_gcs_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_logging_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_memory_bank_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_observability_data_converter.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_operations_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_prompt_management_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_prompt_optimizer_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_skills_utils.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/_transformers.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/a2a_task_events.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/a2a_tasks.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/client.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/datasets.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/endpoints.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/evals.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/example_stores.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/feedback_contexts.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/live.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/live_runtimes.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/memories.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/memory_banks.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/memory_revisions.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/model_garden.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/prompt_optimizer.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/prompts.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/rag.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/runtime_revisions.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/serving_profiles.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/session_events.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/sessions.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/skill_revisions.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/skills.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/types/agent_engines.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/types/evals.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/types/prompt_optimizer.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/_genai/types/prompts.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/frameworks/__init__.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/frameworks/ag2.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/frameworks/langchain.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/frameworks/langgraph.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/agentplatform/frameworks/llama_index.py +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/google_cloud_agentplatform.egg-info/SOURCES.txt +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/google_cloud_agentplatform.egg-info/dependency_links.txt +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/google_cloud_agentplatform.egg-info/top_level.txt +0 -0
- {google_cloud_agentplatform-2.8.0 → google_cloud_agentplatform-2.10.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: google-cloud-agentplatform
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.10.0
|
|
4
4
|
Summary: Google Cloud Agent Platform Client Library
|
|
5
5
|
Author-email: Google LLC <googleapis-packages@google.com>
|
|
6
6
|
License: Apache-2.0
|
|
@@ -61,7 +61,7 @@ Provides-Extra: evaluation
|
|
|
61
61
|
Requires-Dist: pandas>=1.0.0; extra == "evaluation"
|
|
62
62
|
Requires-Dist: tqdm>=4.23.0; extra == "evaluation"
|
|
63
63
|
Requires-Dist: pyyaml; extra == "evaluation"
|
|
64
|
-
Requires-Dist: litellm
|
|
64
|
+
Requires-Dist: litellm!=1.107.0,<1.110.0,>=1.106.5; python_version < "3.15" and extra == "evaluation"
|
|
65
65
|
Requires-Dist: google-cloud-storage<4.0.0,>=1.32.0; extra == "evaluation"
|
|
66
66
|
Provides-Extra: bigquery
|
|
67
67
|
Requires-Dist: google-cloud-bigquery<4.0.0,>=1.15.0; extra == "bigquery"
|
|
@@ -687,9 +687,15 @@ def _build_evaluation_instance(
|
|
|
687
687
|
for full_path in template_vars:
|
|
688
688
|
# Extract the root variable (e.g. 'metadata' from 'metadata.user_id')
|
|
689
689
|
root_var = full_path.split(".")[0].split("[")[0]
|
|
690
|
-
|
|
691
|
-
if root_var
|
|
692
|
-
|
|
690
|
+
field = root_var
|
|
691
|
+
if root_var == "history" and not hasattr(eval_case, "history"):
|
|
692
|
+
field = "conversation_history"
|
|
693
|
+
|
|
694
|
+
if root_var not in standard_fields and hasattr(eval_case, field):
|
|
695
|
+
val = getattr(eval_case, field)
|
|
696
|
+
if field == "conversation_history" and not val:
|
|
697
|
+
other_data_map[root_var] = types.evals.InstanceData(text="")
|
|
698
|
+
continue
|
|
693
699
|
# Add the root object to other_data so the backend can traverse it
|
|
694
700
|
other_data_map[root_var] = types.evals.InstanceData(
|
|
695
701
|
contents=types.evals.InstanceDataContents(
|
|
@@ -1322,6 +1322,8 @@ def _upload_extra_packages(
|
|
|
1322
1322
|
tar_fileobj = io.BytesIO()
|
|
1323
1323
|
with tarfile.open(fileobj=tar_fileobj, mode="w|gz") as tar:
|
|
1324
1324
|
for file in extra_packages:
|
|
1325
|
+
# Note: tar.add(file) preserves each path relative to the current
|
|
1326
|
+
# working directory in the archive (extracted into /code).
|
|
1325
1327
|
tar.add(file)
|
|
1326
1328
|
tar_fileobj.seek(0)
|
|
1327
1329
|
blob = gcs_bucket.blob(f"{gcs_dir_name}/{_EXTRA_PACKAGES_FILE}")
|
|
@@ -1360,78 +1362,14 @@ def _validate_packages_or_raise(
|
|
|
1360
1362
|
build_options: Optional[Dict[str, Sequence[str]]] = None,
|
|
1361
1363
|
) -> Sequence[str]:
|
|
1362
1364
|
"""Tries to validates the packages."""
|
|
1365
|
+
del build_options
|
|
1363
1366
|
packages = packages or []
|
|
1364
|
-
if build_options and _INSTALLATION_SUBDIR in build_options:
|
|
1365
|
-
_validate_installation_scripts_or_raise(
|
|
1366
|
-
script_paths=build_options[_INSTALLATION_SUBDIR],
|
|
1367
|
-
packages=packages,
|
|
1368
|
-
)
|
|
1369
1367
|
for package in packages:
|
|
1370
1368
|
if not os.path.exists(package):
|
|
1371
1369
|
raise FileNotFoundError(f"Package specified but not found: {package=}")
|
|
1372
1370
|
return packages
|
|
1373
1371
|
|
|
1374
1372
|
|
|
1375
|
-
def _validate_installation_scripts_or_raise(
|
|
1376
|
-
*,
|
|
1377
|
-
script_paths: Sequence[str],
|
|
1378
|
-
packages: Sequence[str],
|
|
1379
|
-
) -> None:
|
|
1380
|
-
"""Validates the installation scripts' path explicitly provided by the user.
|
|
1381
|
-
|
|
1382
|
-
Args:
|
|
1383
|
-
script_paths (Sequence[str]):
|
|
1384
|
-
Required. The paths to the installation scripts.
|
|
1385
|
-
packages (Sequence[str]):
|
|
1386
|
-
Required. The user-provided packages.
|
|
1387
|
-
|
|
1388
|
-
Raises:
|
|
1389
|
-
ValueError: If a user-defined script is not under the expected
|
|
1390
|
-
subdirectory, or not in `packages`, or if a package is
|
|
1391
|
-
in the installation scripts subdirectory, but is not specified as an
|
|
1392
|
-
installation script.
|
|
1393
|
-
"""
|
|
1394
|
-
for script_path in script_paths:
|
|
1395
|
-
if not script_path.startswith(_INSTALLATION_SUBDIR):
|
|
1396
|
-
logger.warning(
|
|
1397
|
-
f"User-defined installation script '{script_path}' is not in "
|
|
1398
|
-
f"the expected '{_INSTALLATION_SUBDIR}' subdirectory. "
|
|
1399
|
-
f"Ensure it is placed in '{_INSTALLATION_SUBDIR}' within your "
|
|
1400
|
-
f"'extra_packages' or 'source_packages'."
|
|
1401
|
-
)
|
|
1402
|
-
raise ValueError(
|
|
1403
|
-
f"Required installation script '{script_path}' "
|
|
1404
|
-
f"is not under '{_INSTALLATION_SUBDIR}'"
|
|
1405
|
-
)
|
|
1406
|
-
|
|
1407
|
-
if script_path not in packages:
|
|
1408
|
-
logger.warning(
|
|
1409
|
-
f"User-defined installation script '{script_path}' is not in "
|
|
1410
|
-
f"'extra_packages' or 'source_packages'. Ensure it is added to "
|
|
1411
|
-
f"'extra_packages' or 'source_packages'."
|
|
1412
|
-
)
|
|
1413
|
-
raise ValueError(
|
|
1414
|
-
f"User-defined installation script '{script_path}' "
|
|
1415
|
-
f"does not exist in 'extra_packages' or 'source_packages'."
|
|
1416
|
-
)
|
|
1417
|
-
|
|
1418
|
-
for package in packages:
|
|
1419
|
-
if package.startswith(_INSTALLATION_SUBDIR) and package not in script_paths:
|
|
1420
|
-
logger.warning(
|
|
1421
|
-
f"Package '{package}' is in the installation "
|
|
1422
|
-
"scripts subdirectory, but is not specified as an installation "
|
|
1423
|
-
"script in `build_options`. "
|
|
1424
|
-
"Ensure it is added to installation_scripts for "
|
|
1425
|
-
"automatic execution."
|
|
1426
|
-
)
|
|
1427
|
-
raise ValueError(
|
|
1428
|
-
f"Package '{package}' is in the installation "
|
|
1429
|
-
"scripts subdirectory, but is not specified as an installation "
|
|
1430
|
-
"script in `build_options`."
|
|
1431
|
-
)
|
|
1432
|
-
return
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
1373
|
def _validate_staging_bucket_or_raise(*, staging_bucket: str) -> str:
|
|
1436
1374
|
"""Tries to validate the staging bucket."""
|
|
1437
1375
|
if not staging_bucket:
|
|
@@ -1875,7 +1813,8 @@ def _wrap_a2a_operation(method_name: str, agent_card: str) -> Callable[..., list
|
|
|
1875
1813
|
f"Bearer {self.api_client._api_client._credentials.token}"
|
|
1876
1814
|
)
|
|
1877
1815
|
},
|
|
1878
|
-
timeout=(
|
|
1816
|
+
timeout=kwargs.pop("timeout", None)
|
|
1817
|
+
or (
|
|
1879
1818
|
self.api_client._api_client._http_options.timeout / 1000.0
|
|
1880
1819
|
if self.api_client._api_client._http_options.timeout
|
|
1881
1820
|
else None
|
|
@@ -532,7 +532,7 @@ class FeedbackEntries(_api_module.BaseModule):
|
|
|
532
532
|
Args:
|
|
533
533
|
name (str): Required. Name of the Feedback Entry to update. Format:
|
|
534
534
|
`projects/{project}/locations/{location}/reasoningEngines/{resource_id}/feedbackEntries/{feedback_entry_id}`.
|
|
535
|
-
feedback_type (
|
|
535
|
+
feedback_type (FeedbackType): Optional. The type of feedback provided.
|
|
536
536
|
config (UpdateRuntimeFeedbackEntryConfig): Optional. The configuration for updating the Feedback Entry.
|
|
537
537
|
|
|
538
538
|
Returns:
|
|
@@ -1245,7 +1245,7 @@ class AsyncFeedbackEntries(_api_module.BaseModule):
|
|
|
1245
1245
|
Args:
|
|
1246
1246
|
name (str): Required. Name of the Feedback Entry to update. Format:
|
|
1247
1247
|
`projects/{project}/locations/{location}/reasoningEngines/{resource_id}/feedbackEntries/{feedback_entry_id}`.
|
|
1248
|
-
feedback_type (
|
|
1248
|
+
feedback_type (FeedbackType): Optional. The type of feedback provided.
|
|
1249
1249
|
config (UpdateRuntimeFeedbackEntryConfig): Optional. The configuration for updating the Feedback Entry.
|
|
1250
1250
|
|
|
1251
1251
|
Returns:
|