Skip to content

Commit 54c6f7a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit be636b2 of spec repo (#3423)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 1163687 commit 54c6f7a

32 files changed

Lines changed: 3685 additions & 9 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 530 additions & 6 deletions
Large diffs are not rendered by default.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be deleted are listed in
2+
# `errors`." response
3+
4+
require "datadog_api_client"
5+
DatadogAPIClient.configure do |config|
6+
config.unstable_operations["v2.delete_llm_obs_annotations".to_sym] = true
7+
end
8+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
9+
10+
body = DatadogAPIClient::V2::LLMObsDeleteAnnotationsRequest.new({
11+
data: DatadogAPIClient::V2::LLMObsDeleteAnnotationsDataRequest.new({
12+
attributes: DatadogAPIClient::V2::LLMObsDeleteAnnotationsDataAttributesRequest.new({
13+
annotation_ids: [
14+
"00000000-0000-0000-0000-000000000000",
15+
"00000000-0000-0000-0000-000000000001",
16+
],
17+
}),
18+
type: DatadogAPIClient::V2::LLMObsAnnotationsType::ANNOTATIONS,
19+
}),
20+
})
21+
p api_instance.delete_llm_obs_annotations("queue_id", body)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Create or update annotations returns "OK — annotations created or updated. Per-item errors are listed in `errors`."
2+
# response
3+
4+
require "datadog_api_client"
5+
DatadogAPIClient.configure do |config|
6+
config.unstable_operations["v2.upsert_llm_obs_annotations".to_sym] = true
7+
end
8+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
9+
10+
body = DatadogAPIClient::V2::LLMObsAnnotationsRequest.new({
11+
data: DatadogAPIClient::V2::LLMObsAnnotationsDataRequest.new({
12+
attributes: DatadogAPIClient::V2::LLMObsAnnotationsDataAttributesRequest.new({
13+
annotations: [
14+
DatadogAPIClient::V2::LLMObsUpsertAnnotationItem.new({
15+
interaction_id: "00000000-0000-0000-0000-000000000001",
16+
label_values: [
17+
DatadogAPIClient::V2::LLMObsAnnotationLabelValue.new({
18+
label_schema_id: "abc-123",
19+
value: "good",
20+
}),
21+
DatadogAPIClient::V2::LLMObsAnnotationLabelValue.new({
22+
label_schema_id: "ef56gh78",
23+
value: "positive",
24+
}),
25+
],
26+
}),
27+
],
28+
}),
29+
type: DatadogAPIClient::V2::LLMObsAnnotationsType::ANNOTATIONS,
30+
}),
31+
})
32+
p api_instance.upsert_llm_obs_annotations("queue_id", body)

features/scenarios_model_mapping.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,14 @@
944944
"v2.GetLLMObsAnnotatedInteractions" => {
945945
"queue_id" => "String",
946946
},
947+
"v2.UpsertLLMObsAnnotations" => {
948+
"queue_id" => "String",
949+
"body" => "LLMObsAnnotationsRequest",
950+
},
951+
"v2.DeleteLLMObsAnnotations" => {
952+
"queue_id" => "String",
953+
"body" => "LLMObsDeleteAnnotationsRequest",
954+
},
947955
"v2.CreateLLMObsAnnotationQueueInteractions" => {
948956
"queue_id" => "String",
949957
"body" => "LLMObsAnnotationQueueInteractionsRequest",

features/v2/llm_observability.feature

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,33 @@ Feature: LLM Observability
315315
When the request is sent
316316
Then the response status is 422 Unprocessable Entity
317317

318+
@generated @skip @team:DataDog/ml-observability
319+
Scenario: Create or update annotations returns "Bad Request" response
320+
Given operation "UpsertLLMObsAnnotations" enabled
321+
And new "UpsertLLMObsAnnotations" request
322+
And request contains "queue_id" parameter from "REPLACE.ME"
323+
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"}}
324+
When the request is sent
325+
Then the response status is 400 Bad Request
326+
327+
@generated @skip @team:DataDog/ml-observability
328+
Scenario: Create or update annotations returns "Not Found — the queue does not exist." response
329+
Given operation "UpsertLLMObsAnnotations" enabled
330+
And new "UpsertLLMObsAnnotations" request
331+
And request contains "queue_id" parameter from "REPLACE.ME"
332+
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"}}
333+
When the request is sent
334+
Then the response status is 404 Not Found — the queue does not exist.
335+
336+
@generated @skip @team:DataDog/ml-observability
337+
Scenario: Create or update annotations returns "OK — annotations created or updated. Per-item errors are listed in `errors`." response
338+
Given operation "UpsertLLMObsAnnotations" enabled
339+
And new "UpsertLLMObsAnnotations" request
340+
And request contains "queue_id" parameter from "REPLACE.ME"
341+
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"}}
342+
When the request is sent
343+
Then the response status is 200 OK — annotations created or updated. Per-item errors are listed in `errors`.
344+
318345
@generated @skip @team:DataDog/ml-observability
319346
Scenario: Delete LLM Observability data returns "Accepted" response
320347
Given operation "DeleteLLMObsData" enabled
@@ -487,6 +514,33 @@ Feature: LLM Observability
487514
When the request is sent
488515
Then the response status is 404 Not Found
489516

517+
@generated @skip @team:DataDog/ml-observability
518+
Scenario: Delete annotations returns "Bad Request" response
519+
Given operation "DeleteLLMObsAnnotations" enabled
520+
And new "DeleteLLMObsAnnotations" request
521+
And request contains "queue_id" parameter from "REPLACE.ME"
522+
And body with value {"data": {"attributes": {"annotation_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "annotations"}}
523+
When the request is sent
524+
Then the response status is 400 Bad Request
525+
526+
@generated @skip @team:DataDog/ml-observability
527+
Scenario: Delete annotations returns "Not Found — the queue does not exist." response
528+
Given operation "DeleteLLMObsAnnotations" enabled
529+
And new "DeleteLLMObsAnnotations" request
530+
And request contains "queue_id" parameter from "REPLACE.ME"
531+
And body with value {"data": {"attributes": {"annotation_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "annotations"}}
532+
When the request is sent
533+
Then the response status is 404 Not Found — the queue does not exist.
534+
535+
@generated @skip @team:DataDog/ml-observability
536+
Scenario: Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be deleted are listed in `errors`." response
537+
Given operation "DeleteLLMObsAnnotations" enabled
538+
And new "DeleteLLMObsAnnotations" request
539+
And request contains "queue_id" parameter from "REPLACE.ME"
540+
And body with value {"data": {"attributes": {"annotation_ids": ["00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000001"]}, "type": "annotations"}}
541+
When the request is sent
542+
Then the response status is 200 OK — annotations deleted. Errors for annotations that could not be deleted are listed in `errors`.
543+
490544
@generated @skip @team:DataDog/ml-observability
491545
Scenario: Export an LLM Observability dataset returns "Bad Request" response
492546
Given operation "ExportLLMObsDataset" enabled

features/v2/undo.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4005,6 +4005,29 @@
40054005
"type": "safe"
40064006
}
40074007
},
4008+
"UpsertLLMObsAnnotations": {
4009+
"tag": "LLM Observability",
4010+
"undo": {
4011+
"operationId": "DeleteLLMObsAnnotations",
4012+
"parameters": [
4013+
{
4014+
"name": "queue_id",
4015+
"source": "path.queue_id"
4016+
},
4017+
{
4018+
"name": "body",
4019+
"template": "{\"data\": {\"type\": \"annotations\", \"attributes\": {\"annotation_ids\": [\"{{ data.attributes.annotations[0].id }}\"]}}}"
4020+
}
4021+
],
4022+
"type": "unsafe"
4023+
}
4024+
},
4025+
"DeleteLLMObsAnnotations": {
4026+
"tag": "LLM Observability",
4027+
"undo": {
4028+
"type": "idempotent"
4029+
}
4030+
},
40084031
"CreateLLMObsAnnotationQueueInteractions": {
40094032
"tag": "LLM Observability",
40104033
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ def initialize
220220
"v2.create_llm_obs_project": false,
221221
"v2.delete_llm_obs_annotation_queue": false,
222222
"v2.delete_llm_obs_annotation_queue_interactions": false,
223+
"v2.delete_llm_obs_annotations": false,
223224
"v2.delete_llm_obs_custom_eval_config": false,
224225
"v2.delete_llm_obs_data": false,
225226
"v2.delete_llm_obs_dataset_records": false,
@@ -258,6 +259,7 @@ def initialize
258259
"v2.update_llm_obs_experiment": false,
259260
"v2.update_llm_obs_project": false,
260261
"v2.upload_llm_obs_dataset_records_file": false,
262+
"v2.upsert_llm_obs_annotations": false,
261263
"v2.create_annotation": false,
262264
"v2.delete_annotation": false,
263265
"v2.get_page_annotations": false,

lib/datadog_api_client/inflector.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3940,7 +3940,13 @@ def overrides
39403940
"v2.llm_obs_annotated_interactions_data_response" => "LLMObsAnnotatedInteractionsDataResponse",
39413941
"v2.llm_obs_annotated_interactions_response" => "LLMObsAnnotatedInteractionsResponse",
39423942
"v2.llm_obs_annotated_interactions_type" => "LLMObsAnnotatedInteractionsType",
3943+
"v2.llm_obs_annotation_assessment" => "LLMObsAnnotationAssessment",
3944+
"v2.llm_obs_annotation_error" => "LLMObsAnnotationError",
39433945
"v2.llm_obs_annotation_item" => "LLMObsAnnotationItem",
3946+
"v2.llm_obs_annotation_item_response" => "LLMObsAnnotationItemResponse",
3947+
"v2.llm_obs_annotation_label_value" => "LLMObsAnnotationLabelValue",
3948+
"v2.llm_obs_annotation_label_value_response" => "LLMObsAnnotationLabelValueResponse",
3949+
"v2.llm_obs_annotation_label_value_value" => "LLMObsAnnotationLabelValueValue",
39443950
"v2.llm_obs_annotation_queue_data_attributes_request" => "LLMObsAnnotationQueueDataAttributesRequest",
39453951
"v2.llm_obs_annotation_queue_data_attributes_response" => "LLMObsAnnotationQueueDataAttributesResponse",
39463952
"v2.llm_obs_annotation_queue_data_request" => "LLMObsAnnotationQueueDataRequest",
@@ -3968,6 +3974,13 @@ def overrides
39683974
"v2.llm_obs_annotation_queue_update_data_request" => "LLMObsAnnotationQueueUpdateDataRequest",
39693975
"v2.llm_obs_annotation_queue_update_request" => "LLMObsAnnotationQueueUpdateRequest",
39703976
"v2.llm_obs_annotation_schema" => "LLMObsAnnotationSchema",
3977+
"v2.llm_obs_annotations_data_attributes_request" => "LLMObsAnnotationsDataAttributesRequest",
3978+
"v2.llm_obs_annotations_data_attributes_response" => "LLMObsAnnotationsDataAttributesResponse",
3979+
"v2.llm_obs_annotations_data_request" => "LLMObsAnnotationsDataRequest",
3980+
"v2.llm_obs_annotations_data_response" => "LLMObsAnnotationsDataResponse",
3981+
"v2.llm_obs_annotations_request" => "LLMObsAnnotationsRequest",
3982+
"v2.llm_obs_annotations_response" => "LLMObsAnnotationsResponse",
3983+
"v2.llm_obs_annotations_type" => "LLMObsAnnotationsType",
39713984
"v2.llm_obs_anthropic_effort" => "LLMObsAnthropicEffort",
39723985
"v2.llm_obs_anthropic_metadata" => "LLMObsAnthropicMetadata",
39733986
"v2.llm_obs_anthropic_thinking_config" => "LLMObsAnthropicThinkingConfig",
@@ -4058,9 +4071,16 @@ def overrides
40584071
"v2.llm_obs_dataset_version_data_attributes" => "LLMObsDatasetVersionDataAttributes",
40594072
"v2.llm_obs_dataset_versions_response" => "LLMObsDatasetVersionsResponse",
40604073
"v2.llm_obs_dataset_version_type" => "LLMObsDatasetVersionType",
4074+
"v2.llm_obs_delete_annotation_error" => "LLMObsDeleteAnnotationError",
40614075
"v2.llm_obs_delete_annotation_queue_interactions_data_attributes_request" => "LLMObsDeleteAnnotationQueueInteractionsDataAttributesRequest",
40624076
"v2.llm_obs_delete_annotation_queue_interactions_data_request" => "LLMObsDeleteAnnotationQueueInteractionsDataRequest",
40634077
"v2.llm_obs_delete_annotation_queue_interactions_request" => "LLMObsDeleteAnnotationQueueInteractionsRequest",
4078+
"v2.llm_obs_delete_annotations_data_attributes_request" => "LLMObsDeleteAnnotationsDataAttributesRequest",
4079+
"v2.llm_obs_delete_annotations_data_attributes_response" => "LLMObsDeleteAnnotationsDataAttributesResponse",
4080+
"v2.llm_obs_delete_annotations_data_request" => "LLMObsDeleteAnnotationsDataRequest",
4081+
"v2.llm_obs_delete_annotations_data_response" => "LLMObsDeleteAnnotationsDataResponse",
4082+
"v2.llm_obs_delete_annotations_request" => "LLMObsDeleteAnnotationsRequest",
4083+
"v2.llm_obs_delete_annotations_response" => "LLMObsDeleteAnnotationsResponse",
40644084
"v2.llm_obs_delete_dataset_records_data_attributes_request" => "LLMObsDeleteDatasetRecordsDataAttributesRequest",
40654085
"v2.llm_obs_delete_dataset_records_data_request" => "LLMObsDeleteDatasetRecordsDataRequest",
40664086
"v2.llm_obs_delete_dataset_records_request" => "LLMObsDeleteDatasetRecordsRequest",
@@ -4203,6 +4223,7 @@ def overrides
42034223
"v2.llm_obs_trace_interaction_item" => "LLMObsTraceInteractionItem",
42044224
"v2.llm_obs_trace_interaction_response_item" => "LLMObsTraceInteractionResponseItem",
42054225
"v2.llm_obs_trace_interaction_type" => "LLMObsTraceInteractionType",
4226+
"v2.llm_obs_upsert_annotation_item" => "LLMObsUpsertAnnotationItem",
42064227
"v2.llm_obs_vertex_ai_metadata" => "LLMObsVertexAIMetadata",
42074228
"v2.log" => "Log",
42084229
"v2.log_attributes" => "LogAttributes",

0 commit comments

Comments
 (0)