Skip to content

Commit e34ffce

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3940aee of spec repo
1 parent e0291e2 commit e34ffce

19 files changed

Lines changed: 1097 additions & 18 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 328 additions & 3 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.model.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20703,6 +20703,13 @@ datadog\_api\_client.v2.model.llm\_obs\_experiment\_span module
2070320703
:members:
2070420704
:show-inheritance:
2070520705

20706+
datadog\_api\_client.v2.model.llm\_obs\_experiment\_span\_data\_response module
20707+
-------------------------------------------------------------------------------
20708+
20709+
.. automodule:: datadog_api_client.v2.model.llm_obs_experiment_span_data_response
20710+
:members:
20711+
:show-inheritance:
20712+
2070620713
datadog\_api\_client.v2.model.llm\_obs\_experiment\_span\_error module
2070720714
----------------------------------------------------------------------
2070820715

@@ -20724,13 +20731,34 @@ datadog\_api\_client.v2.model.llm\_obs\_experiment\_span\_status module
2072420731
:members:
2072520732
:show-inheritance:
2072620733

20734+
datadog\_api\_client.v2.model.llm\_obs\_experiment\_span\_type module
20735+
---------------------------------------------------------------------
20736+
20737+
.. automodule:: datadog_api_client.v2.model.llm_obs_experiment_span_type
20738+
:members:
20739+
:show-inheritance:
20740+
2072720741
datadog\_api\_client.v2.model.llm\_obs\_experiment\_span\_with\_evals module
2072820742
----------------------------------------------------------------------------
2072920743

2073020744
.. automodule:: datadog_api_client.v2.model.llm_obs_experiment_span_with_evals
2073120745
:members:
2073220746
:show-inheritance:
2073320747

20748+
datadog\_api\_client.v2.model.llm\_obs\_experiment\_spans\_response module
20749+
--------------------------------------------------------------------------
20750+
20751+
.. automodule:: datadog_api_client.v2.model.llm_obs_experiment_spans_response
20752+
:members:
20753+
:show-inheritance:
20754+
20755+
datadog\_api\_client.v2.model.llm\_obs\_experiment\_status module
20756+
-----------------------------------------------------------------
20757+
20758+
.. automodule:: datadog_api_client.v2.model.llm_obs_experiment_status
20759+
:members:
20760+
:show-inheritance:
20761+
2073420762
datadog\_api\_client.v2.model.llm\_obs\_experiment\_type module
2073520763
---------------------------------------------------------------
2073620764

@@ -20759,6 +20787,13 @@ datadog\_api\_client.v2.model.llm\_obs\_experiment\_update\_request module
2075920787
:members:
2076020788
:show-inheritance:
2076120789

20790+
datadog\_api\_client.v2.model.llm\_obs\_experiment\_user module
20791+
---------------------------------------------------------------
20792+
20793+
.. automodule:: datadog_api_client.v2.model.llm_obs_experiment_user
20794+
:members:
20795+
:show-inheritance:
20796+
2076220797
datadog\_api\_client.v2.model.llm\_obs\_experimentation\_analytics\_aggregate module
2076320798
------------------------------------------------------------------------------------
2076420799

examples/v2/llm-observability/CreateLLMObsExperiment.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
attributes=LLMObsExperimentDataAttributesRequest(
1515
dataset_id="9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
1616
name="My Experiment v1",
17+
parent_experiment_id="3fd6b5e0-8910-4b1c-a7d0-5b84de329012",
1718
project_id="a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
1819
),
1920
type=LLMObsExperimentType.EXPERIMENTS,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List LLM Observability experiment spans (v1) returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_llm_obs_experiment_events_v1"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = LLMObservabilityApi(api_client)
12+
response = api_instance.list_llm_obs_experiment_events_v1(
13+
experiment_id="experiment_id",
14+
)
15+
16+
print(response)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
List LLM Observability experiment events (v2) returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["list_llm_obs_experiment_events_v2"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = LLMObservabilityApi(api_client)
12+
response = api_instance.list_llm_obs_experiment_events_v2(
13+
experiment_id="experiment_id",
14+
)
15+
16+
print(response)

examples/v2/llm-observability/UpdateLLMObsExperiment.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from datadog_api_client import ApiClient, Configuration
66
from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi
7+
from datadog_api_client.v2.model.llm_obs_experiment_status import LLMObsExperimentStatus
78
from datadog_api_client.v2.model.llm_obs_experiment_type import LLMObsExperimentType
89
from datadog_api_client.v2.model.llm_obs_experiment_update_data_attributes_request import (
910
LLMObsExperimentUpdateDataAttributesRequest,
@@ -13,7 +14,10 @@
1314

1415
body = LLMObsExperimentUpdateRequest(
1516
data=LLMObsExperimentUpdateDataRequest(
16-
attributes=LLMObsExperimentUpdateDataAttributesRequest(),
17+
attributes=LLMObsExperimentUpdateDataAttributesRequest(
18+
dataset_id="9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
19+
status=LLMObsExperimentStatus.COMPLETED,
20+
),
1721
type=LLMObsExperimentType.EXPERIMENTS,
1822
),
1923
)

src/datadog_api_client/configuration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ def __init__(
295295
"v2.list_llm_obs_datasets": False,
296296
"v2.list_llm_obs_dataset_versions": False,
297297
"v2.list_llm_obs_experiment_events": False,
298+
"v2.list_llm_obs_experiment_events_v1": False,
299+
"v2.list_llm_obs_experiment_events_v2": False,
298300
"v2.list_llm_obs_experiments": False,
299301
"v2.list_llm_obs_integration_accounts": False,
300302
"v2.list_llm_obs_integration_models": False,

src/datadog_api_client/v2/api/llm_observability_api.py

Lines changed: 169 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from __future__ import annotations
55

66
from typing import Any, Dict, List, Union
7+
import warnings
78

89
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
910
from datadog_api_client.configuration import Configuration
@@ -56,6 +57,7 @@
5657
from datadog_api_client.v2.model.llm_obs_experiment_request import LLMObsExperimentRequest
5758
from datadog_api_client.v2.model.llm_obs_delete_experiments_request import LLMObsDeleteExperimentsRequest
5859
from datadog_api_client.v2.model.llm_obs_experiment_update_request import LLMObsExperimentUpdateRequest
60+
from datadog_api_client.v2.model.llm_obs_experiment_spans_response import LLMObsExperimentSpansResponse
5961
from datadog_api_client.v2.model.llm_obs_experiment_events_request import LLMObsExperimentEventsRequest
6062
from datadog_api_client.v2.model.llm_obs_integration_account import LLMObsIntegrationAccount
6163
from datadog_api_client.v2.model.llm_obs_integration_name import LLMObsIntegrationName
@@ -933,6 +935,52 @@ def __init__(self, api_client=None):
933935
api_client=api_client,
934936
)
935937

938+
self._list_llm_obs_experiment_events_v1_endpoint = _Endpoint(
939+
settings={
940+
"response_type": (LLMObsExperimentSpansResponse,),
941+
"auth": ["apiKeyAuth", "appKeyAuth"],
942+
"endpoint_path": "/api/v2/llm-obs/v1/experiments/{experiment_id}/events",
943+
"operation_id": "list_llm_obs_experiment_events_v1",
944+
"http_method": "GET",
945+
"version": "v2",
946+
},
947+
params_map={
948+
"experiment_id": {
949+
"required": True,
950+
"openapi_types": (str,),
951+
"attribute": "experiment_id",
952+
"location": "path",
953+
},
954+
},
955+
headers_map={
956+
"accept": ["application/json"],
957+
},
958+
api_client=api_client,
959+
)
960+
961+
self._list_llm_obs_experiment_events_v2_endpoint = _Endpoint(
962+
settings={
963+
"response_type": (LLMObsExperimentEventsV2Response,),
964+
"auth": ["apiKeyAuth", "appKeyAuth"],
965+
"endpoint_path": "/api/v2/llm-obs/v2/experiments/{experiment_id}/events",
966+
"operation_id": "list_llm_obs_experiment_events_v2",
967+
"http_method": "GET",
968+
"version": "v2",
969+
},
970+
params_map={
971+
"experiment_id": {
972+
"required": True,
973+
"openapi_types": (str,),
974+
"attribute": "experiment_id",
975+
"location": "path",
976+
},
977+
},
978+
headers_map={
979+
"accept": ["application/json"],
980+
},
981+
api_client=api_client,
982+
)
983+
936984
self._list_llm_obs_experiments_endpoint = _Endpoint(
937985
settings={
938986
"response_type": (LLMObsExperimentsResponse,),
@@ -958,12 +1006,50 @@ def __init__(self, api_client=None):
9581006
"attribute": "filter[id]",
9591007
"location": "query",
9601008
},
1009+
"filter_name": {
1010+
"openapi_types": (str,),
1011+
"attribute": "filter[name]",
1012+
"location": "query",
1013+
},
1014+
"filter_experiment": {
1015+
"openapi_types": (str,),
1016+
"attribute": "filter[experiment]",
1017+
"location": "query",
1018+
},
1019+
"filter_metadata": {
1020+
"openapi_types": (str,),
1021+
"attribute": "filter[metadata]",
1022+
"location": "query",
1023+
},
1024+
"filter_parent_experiment_id": {
1025+
"openapi_types": (str,),
1026+
"attribute": "filter[parent_experiment_id]",
1027+
"location": "query",
1028+
},
1029+
"filter_is_deleted": {
1030+
"openapi_types": (bool,),
1031+
"attribute": "filter[is_deleted]",
1032+
"location": "query",
1033+
},
1034+
"include_user_data": {
1035+
"openapi_types": (bool,),
1036+
"attribute": "include[user_data]",
1037+
"location": "query",
1038+
},
1039+
"include_dataset_names": {
1040+
"openapi_types": (bool,),
1041+
"attribute": "include[dataset_names]",
1042+
"location": "query",
1043+
},
9611044
"page_cursor": {
9621045
"openapi_types": (str,),
9631046
"attribute": "page[cursor]",
9641047
"location": "query",
9651048
},
9661049
"page_limit": {
1050+
"validation": {
1051+
"inclusive_maximum": 5000,
1052+
},
9671053
"openapi_types": (int,),
9681054
"attribute": "page[limit]",
9691055
"location": "query",
@@ -2250,12 +2336,55 @@ def list_llm_obs_experiment_events(
22502336

22512337
return self._list_llm_obs_experiment_events_endpoint.call_with_http_info(**kwargs)
22522338

2339+
def list_llm_obs_experiment_events_v1(
2340+
self,
2341+
experiment_id: str,
2342+
) -> LLMObsExperimentSpansResponse:
2343+
"""List LLM Observability experiment spans (v1). **Deprecated**.
2344+
2345+
Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with no summary metrics and no pagination. Deprecated in favor of ``ListLLMObsExperimentEventsV3``.
2346+
2347+
:param experiment_id: The ID of the LLM Observability experiment.
2348+
:type experiment_id: str
2349+
:rtype: LLMObsExperimentSpansResponse
2350+
"""
2351+
kwargs: Dict[str, Any] = {}
2352+
kwargs["experiment_id"] = experiment_id
2353+
2354+
warnings.warn("list_llm_obs_experiment_events_v1 is deprecated", DeprecationWarning, stacklevel=2)
2355+
return self._list_llm_obs_experiment_events_v1_endpoint.call_with_http_info(**kwargs)
2356+
2357+
def list_llm_obs_experiment_events_v2(
2358+
self,
2359+
experiment_id: str,
2360+
) -> LLMObsExperimentEventsV2Response:
2361+
"""List LLM Observability experiment events (v2). **Deprecated**.
2362+
2363+
Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full events payload without pagination. Deprecated: use ``ListLLMObsExperimentEventsV3`` instead.
2364+
2365+
:param experiment_id: The ID of the LLM Observability experiment.
2366+
:type experiment_id: str
2367+
:rtype: LLMObsExperimentEventsV2Response
2368+
"""
2369+
kwargs: Dict[str, Any] = {}
2370+
kwargs["experiment_id"] = experiment_id
2371+
2372+
warnings.warn("list_llm_obs_experiment_events_v2 is deprecated", DeprecationWarning, stacklevel=2)
2373+
return self._list_llm_obs_experiment_events_v2_endpoint.call_with_http_info(**kwargs)
2374+
22532375
def list_llm_obs_experiments(
22542376
self,
22552377
*,
22562378
filter_project_id: Union[str, UnsetType] = unset,
22572379
filter_dataset_id: Union[str, UnsetType] = unset,
22582380
filter_id: Union[str, UnsetType] = unset,
2381+
filter_name: Union[str, UnsetType] = unset,
2382+
filter_experiment: Union[str, UnsetType] = unset,
2383+
filter_metadata: Union[str, UnsetType] = unset,
2384+
filter_parent_experiment_id: Union[str, UnsetType] = unset,
2385+
filter_is_deleted: Union[bool, UnsetType] = unset,
2386+
include_user_data: Union[bool, UnsetType] = unset,
2387+
include_dataset_names: Union[bool, UnsetType] = unset,
22592388
page_cursor: Union[str, UnsetType] = unset,
22602389
page_limit: Union[int, UnsetType] = unset,
22612390
) -> LLMObsExperimentsResponse:
@@ -2269,9 +2398,26 @@ def list_llm_obs_experiments(
22692398
:type filter_dataset_id: str, optional
22702399
:param filter_id: Filter experiments by experiment ID. Can be specified multiple times.
22712400
:type filter_id: str, optional
2272-
:param page_cursor: Use the Pagination cursor to retrieve the next page of results.
2401+
:param filter_name: Filter experiments by their exact run name.
2402+
:type filter_name: str, optional
2403+
:param filter_experiment: Filter by logical experiment name. This is the ``name`` field set when creating an experiment through ``POST /experiments``. Returns all experiment runs that share the same name, enabling cross-commit and cross-branch comparisons.
2404+
:type filter_experiment: str, optional
2405+
:param filter_metadata: Filter by JSONB metadata containment. Provide a JSON object string where
2406+
experiments whose metadata contains all specified key-value pairs are returned.
2407+
For example: ``{"commit":"abc123","branch":"main"}``.
2408+
:type filter_metadata: str, optional
2409+
:param filter_parent_experiment_id: Filter experiments by the ID of their parent (baseline) experiment. Returns all experiments that were run against the given baseline. Can be specified multiple times.
2410+
:type filter_parent_experiment_id: str, optional
2411+
:param filter_is_deleted: When ``true`` , return only soft-deleted experiments. Defaults to ``false``.
2412+
:type filter_is_deleted: bool, optional
2413+
:param include_user_data: When ``true`` , enrich each experiment with its author's user data in the ``author`` field.
2414+
:type include_user_data: bool, optional
2415+
:param include_dataset_names: When ``true`` , enrich each experiment with its dataset name in the ``dataset_name`` field.
2416+
:type include_dataset_names: bool, optional
2417+
:param page_cursor: Use the pagination cursor returned in ``meta.after`` to retrieve the next page of results.
22732418
:type page_cursor: str, optional
2274-
:param page_limit: Maximum number of results to return per page.
2419+
:param page_limit: Maximum number of results to return per page. Values above 5000 are clamped
2420+
to 5000. Defaults to 5000.
22752421
:type page_limit: int, optional
22762422
:rtype: LLMObsExperimentsResponse
22772423
"""
@@ -2285,6 +2431,27 @@ def list_llm_obs_experiments(
22852431
if filter_id is not unset:
22862432
kwargs["filter_id"] = filter_id
22872433

2434+
if filter_name is not unset:
2435+
kwargs["filter_name"] = filter_name
2436+
2437+
if filter_experiment is not unset:
2438+
kwargs["filter_experiment"] = filter_experiment
2439+
2440+
if filter_metadata is not unset:
2441+
kwargs["filter_metadata"] = filter_metadata
2442+
2443+
if filter_parent_experiment_id is not unset:
2444+
kwargs["filter_parent_experiment_id"] = filter_parent_experiment_id
2445+
2446+
if filter_is_deleted is not unset:
2447+
kwargs["filter_is_deleted"] = filter_is_deleted
2448+
2449+
if include_user_data is not unset:
2450+
kwargs["include_user_data"] = include_user_data
2451+
2452+
if include_dataset_names is not unset:
2453+
kwargs["include_dataset_names"] = include_dataset_names
2454+
22882455
if page_cursor is not unset:
22892456
kwargs["page_cursor"] = page_cursor
22902457

0 commit comments

Comments
 (0)