Skip to content

Commit bfdd11a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5ef48cd of spec repo
1 parent 63def9b commit bfdd11a

24 files changed

Lines changed: 1566 additions & 9 deletions

.generator/schemas/v2/openapi.yaml

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

examples/v2/llm-observability/CreateLLMObsAnnotationQueue.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ const params: v2.LLMObservabilityApiCreateLLMObsAnnotationQueueRequest = {
1212
body: {
1313
data: {
1414
attributes: {
15+
annotationSchema: {
16+
labelSchemas: [
17+
{
18+
description: "Rating of the response quality.",
19+
hasAssessment: false,
20+
hasReasoning: false,
21+
id: "ab12cd34",
22+
isAssessment: false,
23+
isInteger: false,
24+
isRequired: true,
25+
max: 5.0,
26+
min: 0.0,
27+
name: "quality",
28+
type: "score",
29+
values: ["good", "bad", "neutral"],
30+
},
31+
],
32+
},
1533
description: "Queue for annotating customer support traces",
1634
name: "My annotation queue",
1735
projectId: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Get annotation queue label schema returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getLLMObsAnnotationQueueLabelSchema"] =
9+
true;
10+
const apiInstance = new v2.LLMObservabilityApi(configuration);
11+
12+
const params: v2.LLMObservabilityApiGetLLMObsAnnotationQueueLabelSchemaRequest =
13+
{
14+
queueId: "queue_id",
15+
};
16+
17+
apiInstance
18+
.getLLMObsAnnotationQueueLabelSchema(params)
19+
.then((data: v2.LLMObsAnnotationQueueLabelSchemaResponse) => {
20+
console.log(
21+
"API called successfully. Returned data: " + JSON.stringify(data)
22+
);
23+
})
24+
.catch((error: any) => console.error(error));

examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@ const params: v2.LLMObservabilityApiUpdateLLMObsAnnotationQueueRequest = {
1212
body: {
1313
data: {
1414
attributes: {
15+
annotationSchema: {
16+
labelSchemas: [
17+
{
18+
description: "Rating of the response quality.",
19+
hasAssessment: false,
20+
hasReasoning: false,
21+
id: "ab12cd34",
22+
isAssessment: false,
23+
isInteger: false,
24+
isRequired: true,
25+
max: 5.0,
26+
min: 0.0,
27+
name: "quality",
28+
type: "score",
29+
values: ["good", "bad", "neutral"],
30+
},
31+
],
32+
},
1533
description: "Updated description",
1634
name: "Updated queue name",
1735
},
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* Update annotation queue label schema returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateLLMObsAnnotationQueueLabelSchema"] =
9+
true;
10+
const apiInstance = new v2.LLMObservabilityApi(configuration);
11+
12+
const params: v2.LLMObservabilityApiUpdateLLMObsAnnotationQueueLabelSchemaRequest =
13+
{
14+
body: {
15+
data: {
16+
attributes: {
17+
annotationSchema: {
18+
labelSchemas: [
19+
{
20+
description: "Rating of the response quality.",
21+
hasAssessment: false,
22+
hasReasoning: false,
23+
id: "ab12cd34",
24+
isAssessment: false,
25+
isInteger: false,
26+
isRequired: true,
27+
max: 5.0,
28+
min: 0.0,
29+
name: "quality",
30+
type: "score",
31+
values: ["good", "bad", "neutral"],
32+
},
33+
],
34+
},
35+
},
36+
type: "queues",
37+
},
38+
},
39+
queueId: "queue_id",
40+
};
41+
42+
apiInstance
43+
.updateLLMObsAnnotationQueueLabelSchema(params)
44+
.then((data: v2.LLMObsAnnotationQueueLabelSchemaResponse) => {
45+
console.log(
46+
"API called successfully. Returned data: " + JSON.stringify(data)
47+
);
48+
})
49+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2640,6 +2640,24 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
26402640
},
26412641
"operationResponseType": "{}",
26422642
},
2643+
"v2.GetLLMObsAnnotationQueueLabelSchema": {
2644+
"queueId": {
2645+
"type": "string",
2646+
"format": "",
2647+
},
2648+
"operationResponseType": "LLMObsAnnotationQueueLabelSchemaResponse",
2649+
},
2650+
"v2.UpdateLLMObsAnnotationQueueLabelSchema": {
2651+
"queueId": {
2652+
"type": "string",
2653+
"format": "",
2654+
},
2655+
"body": {
2656+
"type": "LLMObsAnnotationQueueLabelSchemaUpdateRequest",
2657+
"format": "",
2658+
},
2659+
"operationResponseType": "LLMObsAnnotationQueueLabelSchemaResponse",
2660+
},
26432661
"v2.ListLLMObsExperiments": {
26442662
"filterProjectId": {
26452663
"type": "string",

features/v2/llm_observability.feature

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ Feature: LLM Observability
7979
Scenario: Create an LLM Observability annotation queue returns "Bad Request" response
8080
Given operation "CreateLLMObsAnnotationQueue" enabled
8181
And new "CreateLLMObsAnnotationQueue" request
82-
And body with value {"data": {"attributes": {"description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}}
82+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}}
8383
When the request is sent
8484
Then the response status is 400 Bad Request
8585

8686
@generated @skip @team:DataDog/ml-observability
8787
Scenario: Create an LLM Observability annotation queue returns "Created" response
8888
Given operation "CreateLLMObsAnnotationQueue" enabled
8989
And new "CreateLLMObsAnnotationQueue" request
90-
And body with value {"data": {"attributes": {"description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}}
90+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Queue for annotating customer support traces", "name": "My annotation queue", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "queues"}}
9191
When the request is sent
9292
Then the response status is 201 Created
9393

@@ -415,6 +415,22 @@ Feature: LLM Observability
415415
When the request is sent
416416
Then the response status is 200 OK
417417

418+
@generated @skip @team:DataDog/ml-observability
419+
Scenario: Get annotation queue label schema returns "Not Found" response
420+
Given operation "GetLLMObsAnnotationQueueLabelSchema" enabled
421+
And new "GetLLMObsAnnotationQueueLabelSchema" request
422+
And request contains "queue_id" parameter from "REPLACE.ME"
423+
When the request is sent
424+
Then the response status is 404 Not Found
425+
426+
@generated @skip @team:DataDog/ml-observability
427+
Scenario: Get annotation queue label schema returns "OK" response
428+
Given operation "GetLLMObsAnnotationQueueLabelSchema" enabled
429+
And new "GetLLMObsAnnotationQueueLabelSchema" request
430+
And request contains "queue_id" parameter from "REPLACE.ME"
431+
When the request is sent
432+
Then the response status is 200 OK
433+
418434
@generated @skip @team:DataDog/ml-observability
419435
Scenario: List LLM Observability annotation queues returns "Bad Request" response
420436
Given operation "ListLLMObsAnnotationQueues" enabled
@@ -570,7 +586,7 @@ Feature: LLM Observability
570586
Given operation "UpdateLLMObsAnnotationQueue" enabled
571587
And new "UpdateLLMObsAnnotationQueue" request
572588
And request contains "queue_id" parameter from "REPLACE.ME"
573-
And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
589+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
574590
When the request is sent
575591
Then the response status is 400 Bad Request
576592

@@ -579,7 +595,7 @@ Feature: LLM Observability
579595
Given operation "UpdateLLMObsAnnotationQueue" enabled
580596
And new "UpdateLLMObsAnnotationQueue" request
581597
And request contains "queue_id" parameter from "REPLACE.ME"
582-
And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
598+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
583599
When the request is sent
584600
Then the response status is 404 Not Found
585601

@@ -588,7 +604,7 @@ Feature: LLM Observability
588604
Given operation "UpdateLLMObsAnnotationQueue" enabled
589605
And new "UpdateLLMObsAnnotationQueue" request
590606
And request contains "queue_id" parameter from "REPLACE.ME"
591-
And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
607+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}, "description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
592608
When the request is sent
593609
Then the response status is 200 OK
594610

@@ -675,3 +691,30 @@ Feature: LLM Observability
675691
And body with value {"data": {"attributes": {}, "type": "projects"}}
676692
When the request is sent
677693
Then the response status is 200 OK
694+
695+
@generated @skip @team:DataDog/ml-observability
696+
Scenario: Update annotation queue label schema returns "Bad Request" response
697+
Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled
698+
And new "UpdateLLMObsAnnotationQueueLabelSchema" request
699+
And request contains "queue_id" parameter from "REPLACE.ME"
700+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}}, "type": "queues"}}
701+
When the request is sent
702+
Then the response status is 400 Bad Request
703+
704+
@generated @skip @team:DataDog/ml-observability
705+
Scenario: Update annotation queue label schema returns "Not Found" response
706+
Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled
707+
And new "UpdateLLMObsAnnotationQueueLabelSchema" request
708+
And request contains "queue_id" parameter from "REPLACE.ME"
709+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}}, "type": "queues"}}
710+
When the request is sent
711+
Then the response status is 404 Not Found
712+
713+
@generated @skip @team:DataDog/ml-observability
714+
Scenario: Update annotation queue label schema returns "OK" response
715+
Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled
716+
And new "UpdateLLMObsAnnotationQueueLabelSchema" request
717+
And request contains "queue_id" parameter from "REPLACE.ME"
718+
And body with value {"data": {"attributes": {"annotation_schema": {"label_schemas": [{"description": "Rating of the response quality.", "has_assessment": false, "has_reasoning": false, "id": "ab12cd34", "is_assessment": false, "is_integer": false, "is_required": true, "max": 5.0, "min": 0.0, "name": "quality", "type": "score", "values": ["good", "bad", "neutral"]}]}}, "type": "queues"}}
719+
When the request is sent
720+
Then the response status is 200 OK

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3267,6 +3267,18 @@
32673267
"type": "idempotent"
32683268
}
32693269
},
3270+
"GetLLMObsAnnotationQueueLabelSchema": {
3271+
"tag": "LLM Observability",
3272+
"undo": {
3273+
"type": "safe"
3274+
}
3275+
},
3276+
"UpdateLLMObsAnnotationQueueLabelSchema": {
3277+
"tag": "LLM Observability",
3278+
"undo": {
3279+
"type": "idempotent"
3280+
}
3281+
},
32703282
"ListLLMObsExperiments": {
32713283
"tag": "LLM Observability",
32723284
"undo": {

packages/datadog-api-client-common/configuration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,15 @@ export function createConfiguration(
255255
"v2.deleteLLMObsExperiments": false,
256256
"v2.deleteLLMObsProjects": false,
257257
"v2.getLLMObsAnnotatedInteractions": false,
258+
"v2.getLLMObsAnnotationQueueLabelSchema": false,
258259
"v2.getLLMObsCustomEvalConfig": false,
259260
"v2.listLLMObsAnnotationQueues": false,
260261
"v2.listLLMObsDatasetRecords": false,
261262
"v2.listLLMObsDatasets": false,
262263
"v2.listLLMObsExperiments": false,
263264
"v2.listLLMObsProjects": false,
264265
"v2.updateLLMObsAnnotationQueue": false,
266+
"v2.updateLLMObsAnnotationQueueLabelSchema": false,
265267
"v2.updateLLMObsCustomEvalConfig": false,
266268
"v2.updateLLMObsDataset": false,
267269
"v2.updateLLMObsDatasetRecords": false,

0 commit comments

Comments
 (0)