Skip to content

Commit b7b45aa

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit af349bc of spec repo
1 parent 0c12597 commit b7b45aa

7 files changed

Lines changed: 90 additions & 10 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77999,6 +77999,13 @@ components:
7799977999
LLMObsAnnotationItem:
7800078000
description: A single annotation on an interaction.
7800178001
properties:
78002+
annotator:
78003+
description: |-
78004+
Caller-supplied name or identifier for the external person or automated system that produced the labels.
78005+
The value is stored and returned as provided. It is not a Datadog user ID or login, and it is not
78006+
resolved against Datadog users.
78007+
example: "Alex Contractor"
78008+
type: string
7800278009
created_at:
7800378010
description: Timestamp when the annotation was created.
7800478011
example: "2024-01-15T10:30:00Z"
@@ -78044,6 +78051,13 @@ components:
7804478051
LLMObsAnnotationItemResponse:
7804578052
description: A single annotation on an interaction, as returned by the API.
7804678053
properties:
78054+
annotator:
78055+
description: |-
78056+
Caller-supplied name or identifier for the external person or automated system that produced the labels.
78057+
The value is stored and returned as provided. It is not a Datadog user ID or login, and it is not
78058+
resolved against Datadog users.
78059+
example: "Alex Contractor"
78060+
type: string
7804778061
created_at:
7804878062
description: Timestamp when the annotation was created.
7804978063
example: "2024-01-15T10:30:00Z"
@@ -84929,6 +84943,18 @@ components:
8492984943
A single annotation to create or update. The annotation is matched by
8493084944
`interaction_id` and the requesting user's identity.
8493184945
properties:
84946+
annotator:
84947+
description: |-
84948+
Caller-supplied name or identifier for the external person or automated system that produced the labels.
84949+
The value is an opaque string with no required format. Use a stable, recognizable value for the same
84950+
producer across annotations.
84951+
The value is stored and returned as provided. It is not a Datadog user ID or login, and it is not
84952+
resolved against Datadog users.
84953+
Omit this field or set it to `null` to preserve existing attribution. Set it to an empty string to clear
84954+
attribution.
84955+
example: "Alex Contractor"
84956+
nullable: true
84957+
type: string
8493284958
interaction_id:
8493384959
description: ID of the interaction to annotate.
8493484960
example: "00000000-0000-0000-0000-000000000001"
@@ -208224,6 +208250,8 @@ paths:
208224208250
description: |-
208225208251
Create or update annotations on interactions in a queue. Each annotation is matched
208226208252
by `interaction_id` and the requesting user's identity.
208253+
Use the optional `annotator` field to name an external person or automated system that produced the labels
208254+
without changing the authenticated creator, modifier, permissions, or per-user matching behavior.
208227208255
Results and errors in the response are linked to request items by `interaction_id`.
208228208256
Errors for individual items are returned in the `errors` field without blocking the rest of the batch.
208229208257
Requests where every item is denied by queue access rules return `403`.
@@ -208239,7 +208267,8 @@ paths:
208239208267
data:
208240208268
attributes:
208241208269
annotations:
208242-
- interaction_id: 00000000-0000-0000-0000-000000000001
208270+
- annotator: "Alex Contractor"
208271+
interaction_id: 00000000-0000-0000-0000-000000000001
208243208272
label_values:
208244208273
- label_schema_id: abc-123
208245208274
value: good
@@ -208260,7 +208289,8 @@ paths:
208260208289
data:
208261208290
attributes:
208262208291
annotations:
208263-
- created_at: "2024-01-15T10:30:00Z"
208292+
- annotator: "Alex Contractor"
208293+
created_at: "2024-01-15T10:30:00Z"
208264208294
created_by: 00000000-0000-0000-0000-000000000002
208265208295
id: 00000000-0000-0000-0000-000000000000
208266208296
interaction_id: 00000000-0000-0000-0000-000000000001
@@ -208277,7 +208307,8 @@ paths:
208277208307
data:
208278208308
attributes:
208279208309
annotations:
208280-
- created_at: "2024-01-15T10:30:00Z"
208310+
- annotator: "Alex Contractor"
208311+
created_at: "2024-01-15T10:30:00Z"
208281208312
created_by: 00000000-0000-0000-0000-000000000002
208282208313
id: 00000000-0000-0000-0000-000000000000
208283208314
interaction_id: 00000000-0000-0000-0000-000000000001

‎examples/v2/agent-observability/UpsertLLMObsAnnotations.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
attributes=LLMObsAnnotationsDataAttributesRequest(
2121
annotations=[
2222
LLMObsUpsertAnnotationItem(
23+
annotator="Alex Contractor",
2324
interaction_id="00000000-0000-0000-0000-000000000001",
2425
label_values=[
2526
LLMObsAnnotationLabelValue(

‎src/datadog_api_client/v2/api/agent_observability_api.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4090,6 +4090,8 @@ def upsert_llm_obs_annotations(
40904090
40914091
Create or update annotations on interactions in a queue. Each annotation is matched
40924092
by ``interaction_id`` and the requesting user's identity.
4093+
Use the optional ``annotator`` field to name an external person or automated system that produced the labels
4094+
without changing the authenticated creator, modifier, permissions, or per-user matching behavior.
40934095
Results and errors in the response are linked to request items by ``interaction_id``.
40944096
Errors for individual items are returned in the ``errors`` field without blocking the rest of the batch.
40954097
Requests where every item is denied by queue access rules return ``403``.

‎src/datadog_api_client/v2/model/llm_obs_annotation_item.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Any, Dict
6+
from typing import Any, Dict, Union
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
1111
date,
1212
datetime,
1313
none_type,
14+
unset,
15+
UnsetType,
1416
UUID,
1517
)
1618

@@ -19,6 +21,7 @@ class LLMObsAnnotationItem(ModelNormal):
1921
@cached_property
2022
def openapi_types(_):
2123
return {
24+
"annotator": (str,),
2225
"created_at": (datetime,),
2326
"created_by": (str,),
2427
"id": (str,),
@@ -44,6 +47,7 @@ def openapi_types(_):
4447
}
4548

4649
attribute_map = {
50+
"annotator": "annotator",
4751
"created_at": "created_at",
4852
"created_by": "created_by",
4953
"id": "id",
@@ -62,11 +66,17 @@ def __init__(
6266
label_values: Dict[str, Any],
6367
modified_at: datetime,
6468
modified_by: str,
69+
annotator: Union[str, UnsetType] = unset,
6570
**kwargs,
6671
):
6772
"""
6873
A single annotation on an interaction.
6974
75+
:param annotator: Caller-supplied name or identifier for the external person or automated system that produced the labels.
76+
The value is stored and returned as provided. It is not a Datadog user ID or login, and it is not
77+
resolved against Datadog users.
78+
:type annotator: str, optional
79+
7080
:param created_at: Timestamp when the annotation was created.
7181
:type created_at: datetime
7282
@@ -88,6 +98,8 @@ def __init__(
8898
:param modified_by: Identifier of the user who last modified the annotation.
8999
:type modified_by: str
90100
"""
101+
if annotator is not unset:
102+
kwargs["annotator"] = annotator
91103
super().__init__(kwargs)
92104

93105
self_.created_at = created_at

‎src/datadog_api_client/v2/model/llm_obs_annotation_item_response.py‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import List, TYPE_CHECKING
6+
from typing import List, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
1111
datetime,
12+
unset,
13+
UnsetType,
1214
)
1315

1416

@@ -24,6 +26,7 @@ def openapi_types(_):
2426
)
2527

2628
return {
29+
"annotator": (str,),
2730
"created_at": (datetime,),
2831
"created_by": (str,),
2932
"id": (str,),
@@ -34,6 +37,7 @@ def openapi_types(_):
3437
}
3538

3639
attribute_map = {
40+
"annotator": "annotator",
3741
"created_at": "created_at",
3842
"created_by": "created_by",
3943
"id": "id",
@@ -52,11 +56,17 @@ def __init__(
5256
label_values: List[LLMObsAnnotationLabelValueResponse],
5357
modified_at: datetime,
5458
modified_by: str,
59+
annotator: Union[str, UnsetType] = unset,
5560
**kwargs,
5661
):
5762
"""
5863
A single annotation on an interaction, as returned by the API.
5964
65+
:param annotator: Caller-supplied name or identifier for the external person or automated system that produced the labels.
66+
The value is stored and returned as provided. It is not a Datadog user ID or login, and it is not
67+
resolved against Datadog users.
68+
:type annotator: str, optional
69+
6070
:param created_at: Timestamp when the annotation was created.
6171
:type created_at: datetime
6272
@@ -79,6 +89,8 @@ def __init__(
7989
:param modified_by: Identifier of the user who last modified the annotation.
8090
:type modified_by: str
8191
"""
92+
if annotator is not unset:
93+
kwargs["annotator"] = annotator
8294
super().__init__(kwargs)
8395

8496
self_.created_at = created_at

‎src/datadog_api_client/v2/model/llm_obs_upsert_annotation_item.py‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import List, TYPE_CHECKING
6+
from typing import List, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
none_type,
12+
unset,
13+
UnsetType,
1114
)
1215

1316

@@ -27,27 +30,46 @@ def openapi_types(_):
2730
from datadog_api_client.v2.model.llm_obs_annotation_label_value import LLMObsAnnotationLabelValue
2831

2932
return {
33+
"annotator": (str, none_type),
3034
"interaction_id": (str,),
3135
"label_values": ([LLMObsAnnotationLabelValue],),
3236
}
3337

3438
attribute_map = {
39+
"annotator": "annotator",
3540
"interaction_id": "interaction_id",
3641
"label_values": "label_values",
3742
}
3843

39-
def __init__(self_, interaction_id: str, label_values: List[LLMObsAnnotationLabelValue], **kwargs):
44+
def __init__(
45+
self_,
46+
interaction_id: str,
47+
label_values: List[LLMObsAnnotationLabelValue],
48+
annotator: Union[str, none_type, UnsetType] = unset,
49+
**kwargs,
50+
):
4051
"""
4152
A single annotation to create or update. The annotation is matched by
4253
``interaction_id`` and the requesting user's identity.
4354
55+
:param annotator: Caller-supplied name or identifier for the external person or automated system that produced the labels.
56+
The value is an opaque string with no required format. Use a stable, recognizable value for the same
57+
producer across annotations.
58+
The value is stored and returned as provided. It is not a Datadog user ID or login, and it is not
59+
resolved against Datadog users.
60+
Omit this field or set it to ``null`` to preserve existing attribution. Set it to an empty string to clear
61+
attribution.
62+
:type annotator: str, none_type, optional
63+
4464
:param interaction_id: ID of the interaction to annotate.
4565
:type interaction_id: str
4666
4767
:param label_values: Label values for this annotation. Each entry references a label schema by ID
4868
and provides the corresponding value validated against the schema type constraints.
4969
:type label_values: [LLMObsAnnotationLabelValue]
5070
"""
71+
if annotator is not unset:
72+
kwargs["annotator"] = annotator
5173
super().__init__(kwargs)
5274

5375
self_.interaction_id = interaction_id

‎tests/v2/features/agent_observability.feature‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ Feature: Agent Observability
395395
Given operation "UpsertLLMObsAnnotations" enabled
396396
And new "UpsertLLMObsAnnotations" request
397397
And request contains "queue_id" parameter from "REPLACE.ME"
398-
And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}}
398+
And body with value {"data": {"attributes": {"annotations": [{"annotator": "Alex Contractor", "interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}}
399399
When the request is sent
400400
Then the response status is 400 Bad Request
401401

@@ -404,7 +404,7 @@ Feature: Agent Observability
404404
Given operation "UpsertLLMObsAnnotations" enabled
405405
And new "UpsertLLMObsAnnotations" request
406406
And request contains "queue_id" parameter from "REPLACE.ME"
407-
And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}}
407+
And body with value {"data": {"attributes": {"annotations": [{"annotator": "Alex Contractor", "interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}}
408408
When the request is sent
409409
Then the response status is 404 Not Found — the queue does not exist.
410410

@@ -413,7 +413,7 @@ Feature: Agent Observability
413413
Given operation "UpsertLLMObsAnnotations" enabled
414414
And new "UpsertLLMObsAnnotations" request
415415
And request contains "queue_id" parameter from "REPLACE.ME"
416-
And body with value {"data": {"attributes": {"annotations": [{"interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}}
416+
And body with value {"data": {"attributes": {"annotations": [{"annotator": "Alex Contractor", "interaction_id": "00000000-0000-0000-0000-000000000001", "label_values": [{"label_schema_id": "abc-123", "value": "good"}, {"label_schema_id": "ef56gh78", "value": "positive"}]}]}, "type": "annotations"}}
417417
When the request is sent
418418
Then the response status is 200 OK — annotations created or updated. For mixed batches, denied items and other per-item errors are listed in `errors`.
419419

0 commit comments

Comments
 (0)