Skip to content

Commit 468fcbc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5ef48cd of spec repo
1 parent 572f11c commit 468fcbc

23 files changed

Lines changed: 1313 additions & 13 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 375 additions & 2 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.model.rst

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16916,6 +16916,48 @@ datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_interactions\_type mo
1691616916
:members:
1691716917
:show-inheritance:
1691816918

16919+
datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_label\_schema\_attributes module
16920+
-------------------------------------------------------------------------------------------
16921+
16922+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_attributes
16923+
:members:
16924+
:show-inheritance:
16925+
16926+
datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_label\_schema\_data module
16927+
-------------------------------------------------------------------------------------
16928+
16929+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_data
16930+
:members:
16931+
:show-inheritance:
16932+
16933+
datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_label\_schema\_response module
16934+
-----------------------------------------------------------------------------------------
16935+
16936+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_response
16937+
:members:
16938+
:show-inheritance:
16939+
16940+
datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_label\_schema\_update\_attributes module
16941+
---------------------------------------------------------------------------------------------------
16942+
16943+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_update_attributes
16944+
:members:
16945+
:show-inheritance:
16946+
16947+
datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_label\_schema\_update\_data module
16948+
---------------------------------------------------------------------------------------------
16949+
16950+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_update_data
16951+
:members:
16952+
:show-inheritance:
16953+
16954+
datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_label\_schema\_update\_request module
16955+
------------------------------------------------------------------------------------------------
16956+
16957+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_update_request
16958+
:members:
16959+
:show-inheritance:
16960+
1691916961
datadog\_api\_client.v2.model.llm\_obs\_annotation\_queue\_request module
1692016962
-------------------------------------------------------------------------
1692116963

@@ -16965,6 +17007,13 @@ datadog\_api\_client.v2.model.llm\_obs\_annotation\_queues\_response module
1696517007
:members:
1696617008
:show-inheritance:
1696717009

17010+
datadog\_api\_client.v2.model.llm\_obs\_annotation\_schema module
17011+
-----------------------------------------------------------------
17012+
17013+
.. automodule:: datadog_api_client.v2.model.llm_obs_annotation_schema
17014+
:members:
17015+
:show-inheritance:
17016+
1696817017
datadog\_api\_client.v2.model.llm\_obs\_cursor\_meta module
1696917018
-----------------------------------------------------------
1697017019

@@ -17553,6 +17602,20 @@ datadog\_api\_client.v2.model.llm\_obs\_interaction\_type module
1755317602
:members:
1755417603
:show-inheritance:
1755517604

17605+
datadog\_api\_client.v2.model.llm\_obs\_label\_schema module
17606+
------------------------------------------------------------
17607+
17608+
.. automodule:: datadog_api_client.v2.model.llm_obs_label_schema
17609+
:members:
17610+
:show-inheritance:
17611+
17612+
datadog\_api\_client.v2.model.llm\_obs\_label\_schema\_type module
17613+
------------------------------------------------------------------
17614+
17615+
.. automodule:: datadog_api_client.v2.model.llm_obs_label_schema_type
17616+
:members:
17617+
:show-inheritance:
17618+
1755617619
datadog\_api\_client.v2.model.llm\_obs\_metric\_assessment module
1755717620
-----------------------------------------------------------------
1755817621

examples/v2/llm-observability/CreateLLMObsAnnotationQueue.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,35 @@
1010
from datadog_api_client.v2.model.llm_obs_annotation_queue_data_request import LLMObsAnnotationQueueDataRequest
1111
from datadog_api_client.v2.model.llm_obs_annotation_queue_request import LLMObsAnnotationQueueRequest
1212
from datadog_api_client.v2.model.llm_obs_annotation_queue_type import LLMObsAnnotationQueueType
13+
from datadog_api_client.v2.model.llm_obs_annotation_schema import LLMObsAnnotationSchema
14+
from datadog_api_client.v2.model.llm_obs_label_schema import LLMObsLabelSchema
15+
from datadog_api_client.v2.model.llm_obs_label_schema_type import LLMObsLabelSchemaType
1316

1417
body = LLMObsAnnotationQueueRequest(
1518
data=LLMObsAnnotationQueueDataRequest(
1619
attributes=LLMObsAnnotationQueueDataAttributesRequest(
20+
annotation_schema=LLMObsAnnotationSchema(
21+
label_schemas=[
22+
LLMObsLabelSchema(
23+
description="Rating of the response quality.",
24+
has_assessment=False,
25+
has_reasoning=False,
26+
id="ab12cd34",
27+
is_assessment=False,
28+
is_integer=False,
29+
is_required=True,
30+
max=5.0,
31+
min=0.0,
32+
name="quality",
33+
type=LLMObsLabelSchemaType.SCORE,
34+
values=[
35+
"good",
36+
"bad",
37+
"neutral",
38+
],
39+
),
40+
],
41+
),
1742
description="Queue for annotating customer support traces",
1843
name="My annotation queue",
1944
project_id="a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Get annotation queue label schema 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["get_llm_obs_annotation_queue_label_schema"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = LLMObservabilityApi(api_client)
12+
response = api_instance.get_llm_obs_annotation_queue_label_schema(
13+
queue_id="queue_id",
14+
)
15+
16+
print(response)

examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,35 @@
1212
LLMObsAnnotationQueueUpdateDataRequest,
1313
)
1414
from datadog_api_client.v2.model.llm_obs_annotation_queue_update_request import LLMObsAnnotationQueueUpdateRequest
15+
from datadog_api_client.v2.model.llm_obs_annotation_schema import LLMObsAnnotationSchema
16+
from datadog_api_client.v2.model.llm_obs_label_schema import LLMObsLabelSchema
17+
from datadog_api_client.v2.model.llm_obs_label_schema_type import LLMObsLabelSchemaType
1518

1619
body = LLMObsAnnotationQueueUpdateRequest(
1720
data=LLMObsAnnotationQueueUpdateDataRequest(
1821
attributes=LLMObsAnnotationQueueUpdateDataAttributesRequest(
22+
annotation_schema=LLMObsAnnotationSchema(
23+
label_schemas=[
24+
LLMObsLabelSchema(
25+
description="Rating of the response quality.",
26+
has_assessment=False,
27+
has_reasoning=False,
28+
id="ab12cd34",
29+
is_assessment=False,
30+
is_integer=False,
31+
is_required=True,
32+
max=5.0,
33+
min=0.0,
34+
name="quality",
35+
type=LLMObsLabelSchemaType.SCORE,
36+
values=[
37+
"good",
38+
"bad",
39+
"neutral",
40+
],
41+
),
42+
],
43+
),
1944
description="Updated description",
2045
name="Updated queue name",
2146
),
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
"""
2+
Update annotation queue label schema 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+
from datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_update_attributes import (
8+
LLMObsAnnotationQueueLabelSchemaUpdateAttributes,
9+
)
10+
from datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_update_data import (
11+
LLMObsAnnotationQueueLabelSchemaUpdateData,
12+
)
13+
from datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_update_request import (
14+
LLMObsAnnotationQueueLabelSchemaUpdateRequest,
15+
)
16+
from datadog_api_client.v2.model.llm_obs_annotation_queue_type import LLMObsAnnotationQueueType
17+
from datadog_api_client.v2.model.llm_obs_annotation_schema import LLMObsAnnotationSchema
18+
from datadog_api_client.v2.model.llm_obs_label_schema import LLMObsLabelSchema
19+
from datadog_api_client.v2.model.llm_obs_label_schema_type import LLMObsLabelSchemaType
20+
21+
body = LLMObsAnnotationQueueLabelSchemaUpdateRequest(
22+
data=LLMObsAnnotationQueueLabelSchemaUpdateData(
23+
attributes=LLMObsAnnotationQueueLabelSchemaUpdateAttributes(
24+
annotation_schema=LLMObsAnnotationSchema(
25+
label_schemas=[
26+
LLMObsLabelSchema(
27+
description="Rating of the response quality.",
28+
has_assessment=False,
29+
has_reasoning=False,
30+
id="ab12cd34",
31+
is_assessment=False,
32+
is_integer=False,
33+
is_required=True,
34+
max=5.0,
35+
min=0.0,
36+
name="quality",
37+
type=LLMObsLabelSchemaType.SCORE,
38+
values=[
39+
"good",
40+
"bad",
41+
"neutral",
42+
],
43+
),
44+
],
45+
),
46+
),
47+
type=LLMObsAnnotationQueueType.QUEUES,
48+
),
49+
)
50+
51+
configuration = Configuration()
52+
configuration.unstable_operations["update_llm_obs_annotation_queue_label_schema"] = True
53+
with ApiClient(configuration) as api_client:
54+
api_instance = LLMObservabilityApi(api_client)
55+
response = api_instance.update_llm_obs_annotation_queue_label_schema(queue_id="queue_id", body=body)
56+
57+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,15 @@ def __init__(
280280
"v2.delete_llm_obs_experiments": False,
281281
"v2.delete_llm_obs_projects": False,
282282
"v2.get_llm_obs_annotated_interactions": False,
283+
"v2.get_llm_obs_annotation_queue_label_schema": False,
283284
"v2.get_llm_obs_custom_eval_config": False,
284285
"v2.list_llm_obs_annotation_queues": False,
285286
"v2.list_llm_obs_dataset_records": False,
286287
"v2.list_llm_obs_datasets": False,
287288
"v2.list_llm_obs_experiments": False,
288289
"v2.list_llm_obs_projects": False,
289290
"v2.update_llm_obs_annotation_queue": False,
291+
"v2.update_llm_obs_annotation_queue_label_schema": False,
290292
"v2.update_llm_obs_custom_eval_config": False,
291293
"v2.update_llm_obs_dataset": False,
292294
"v2.update_llm_obs_dataset_records": False,

src/datadog_api_client/v2/api/llm_observability_api.py

Lines changed: 99 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
from datadog_api_client.v2.model.llm_obs_delete_annotation_queue_interactions_request import (
2828
LLMObsDeleteAnnotationQueueInteractionsRequest,
2929
)
30+
from datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_response import (
31+
LLMObsAnnotationQueueLabelSchemaResponse,
32+
)
33+
from datadog_api_client.v2.model.llm_obs_annotation_queue_label_schema_update_request import (
34+
LLMObsAnnotationQueueLabelSchemaUpdateRequest,
35+
)
3036
from datadog_api_client.v2.model.llm_obs_experiments_response import LLMObsExperimentsResponse
3137
from datadog_api_client.v2.model.llm_obs_experiment_response import LLMObsExperimentResponse
3238
from datadog_api_client.v2.model.llm_obs_experiment_request import LLMObsExperimentRequest
@@ -423,6 +429,29 @@ def __init__(self, api_client=None):
423429
api_client=api_client,
424430
)
425431

432+
self._get_llm_obs_annotation_queue_label_schema_endpoint = _Endpoint(
433+
settings={
434+
"response_type": (LLMObsAnnotationQueueLabelSchemaResponse,),
435+
"auth": ["apiKeyAuth", "appKeyAuth"],
436+
"endpoint_path": "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema",
437+
"operation_id": "get_llm_obs_annotation_queue_label_schema",
438+
"http_method": "GET",
439+
"version": "v2",
440+
},
441+
params_map={
442+
"queue_id": {
443+
"required": True,
444+
"openapi_types": (str,),
445+
"attribute": "queue_id",
446+
"location": "path",
447+
},
448+
},
449+
headers_map={
450+
"accept": ["application/json"],
451+
},
452+
api_client=api_client,
453+
)
454+
426455
self._get_llm_obs_custom_eval_config_endpoint = _Endpoint(
427456
settings={
428457
"response_type": (LLMObsCustomEvalConfigResponse,),
@@ -666,6 +695,32 @@ def __init__(self, api_client=None):
666695
api_client=api_client,
667696
)
668697

698+
self._update_llm_obs_annotation_queue_label_schema_endpoint = _Endpoint(
699+
settings={
700+
"response_type": (LLMObsAnnotationQueueLabelSchemaResponse,),
701+
"auth": ["apiKeyAuth", "appKeyAuth"],
702+
"endpoint_path": "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema",
703+
"operation_id": "update_llm_obs_annotation_queue_label_schema",
704+
"http_method": "PUT",
705+
"version": "v2",
706+
},
707+
params_map={
708+
"queue_id": {
709+
"required": True,
710+
"openapi_types": (str,),
711+
"attribute": "queue_id",
712+
"location": "path",
713+
},
714+
"body": {
715+
"required": True,
716+
"openapi_types": (LLMObsAnnotationQueueLabelSchemaUpdateRequest,),
717+
"location": "body",
718+
},
719+
},
720+
headers_map={"accept": ["application/json"], "content_type": ["application/json"]},
721+
api_client=api_client,
722+
)
723+
669724
self._update_llm_obs_custom_eval_config_endpoint = _Endpoint(
670725
settings={
671726
"response_type": None,
@@ -814,7 +869,8 @@ def create_llm_obs_annotation_queue(
814869
) -> LLMObsAnnotationQueueResponse:
815870
"""Create an LLM Observability annotation queue.
816871
817-
Create a new annotation queue. Only ``name`` , ``project_id`` , and ``description`` are accepted.
872+
Create a new annotation queue. The ``name`` and ``project_id`` fields are required.
873+
An optional ``annotation_schema`` can be provided to define the labels for the queue.
818874
Fields such as ``created_by`` , ``owned_by`` , ``created_at`` , ``modified_by`` , and ``modified_at`` are inferred by the backend.
819875
820876
:param body: Create annotation queue payload.
@@ -1110,6 +1166,23 @@ def get_llm_obs_annotated_interactions(
11101166

11111167
return self._get_llm_obs_annotated_interactions_endpoint.call_with_http_info(**kwargs)
11121168

1169+
def get_llm_obs_annotation_queue_label_schema(
1170+
self,
1171+
queue_id: str,
1172+
) -> LLMObsAnnotationQueueLabelSchemaResponse:
1173+
"""Get annotation queue label schema.
1174+
1175+
Retrieve the label schema for a given annotation queue.
1176+
1177+
:param queue_id: The ID of the LLM Observability annotation queue.
1178+
:type queue_id: str
1179+
:rtype: LLMObsAnnotationQueueLabelSchemaResponse
1180+
"""
1181+
kwargs: Dict[str, Any] = {}
1182+
kwargs["queue_id"] = queue_id
1183+
1184+
return self._get_llm_obs_annotation_queue_label_schema_endpoint.call_with_http_info(**kwargs)
1185+
11131186
def get_llm_obs_custom_eval_config(
11141187
self,
11151188
eval_name: str,
@@ -1323,7 +1396,7 @@ def update_llm_obs_annotation_queue(
13231396
) -> LLMObsAnnotationQueueResponse:
13241397
"""Update an LLM Observability annotation queue.
13251398
1326-
Partially update an annotation queue. Only ``name`` and ``description`` can be updated.
1399+
Partially update an annotation queue. The ``name`` , ``description`` , and ``annotation_schema`` fields can be updated.
13271400
13281401
:param queue_id: The ID of the LLM Observability annotation queue.
13291402
:type queue_id: str
@@ -1338,6 +1411,30 @@ def update_llm_obs_annotation_queue(
13381411

13391412
return self._update_llm_obs_annotation_queue_endpoint.call_with_http_info(**kwargs)
13401413

1414+
def update_llm_obs_annotation_queue_label_schema(
1415+
self,
1416+
queue_id: str,
1417+
body: LLMObsAnnotationQueueLabelSchemaUpdateRequest,
1418+
) -> LLMObsAnnotationQueueLabelSchemaResponse:
1419+
"""Update annotation queue label schema.
1420+
1421+
Create or replace the label schema for a given annotation queue.
1422+
The label schema defines the labels annotators can apply to interactions in the queue.
1423+
Label names must be unique within the queue, match the pattern ``^[a-zA-Z0-9_-]+$`` , and each label must have a valid type (score, categorical, boolean, or text).
1424+
1425+
:param queue_id: The ID of the LLM Observability annotation queue.
1426+
:type queue_id: str
1427+
:param body: Update label schema payload.
1428+
:type body: LLMObsAnnotationQueueLabelSchemaUpdateRequest
1429+
:rtype: LLMObsAnnotationQueueLabelSchemaResponse
1430+
"""
1431+
kwargs: Dict[str, Any] = {}
1432+
kwargs["queue_id"] = queue_id
1433+
1434+
kwargs["body"] = body
1435+
1436+
return self._update_llm_obs_annotation_queue_label_schema_endpoint.call_with_http_info(**kwargs)
1437+
13411438
def update_llm_obs_custom_eval_config(
13421439
self,
13431440
eval_name: str,

0 commit comments

Comments
 (0)