Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
450 changes: 447 additions & 3 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions examples/v2/llm-observability/CreateLLMObsAnnotationQueue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@
body = DatadogAPIClient::V2::LLMObsAnnotationQueueRequest.new({
data: DatadogAPIClient::V2::LLMObsAnnotationQueueDataRequest.new({
attributes: DatadogAPIClient::V2::LLMObsAnnotationQueueDataAttributesRequest.new({
annotation_schema: DatadogAPIClient::V2::LLMObsAnnotationSchema.new({
label_schemas: [
DatadogAPIClient::V2::LLMObsLabelSchema.new({
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: DatadogAPIClient::V2::LLMObsLabelSchemaType::SCORE,
values: [
"good",
"bad",
"neutral",
],
}),
],
}),
description: "Queue for annotating customer support traces",
name: "My annotation queue",
project_id: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Get annotation queue label schema returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_llm_obs_annotation_queue_label_schema".to_sym] = true
end
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
p api_instance.get_llm_obs_annotation_queue_label_schema("queue_id")
22 changes: 22 additions & 0 deletions examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,28 @@
body = DatadogAPIClient::V2::LLMObsAnnotationQueueUpdateRequest.new({
data: DatadogAPIClient::V2::LLMObsAnnotationQueueUpdateDataRequest.new({
attributes: DatadogAPIClient::V2::LLMObsAnnotationQueueUpdateDataAttributesRequest.new({
annotation_schema: DatadogAPIClient::V2::LLMObsAnnotationSchema.new({
label_schemas: [
DatadogAPIClient::V2::LLMObsLabelSchema.new({
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: DatadogAPIClient::V2::LLMObsLabelSchemaType::SCORE,
values: [
"good",
"bad",
"neutral",
],
}),
],
}),
description: "Updated description",
name: "Updated queue name",
}),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Update annotation queue label schema returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_llm_obs_annotation_queue_label_schema".to_sym] = true
end
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new

body = DatadogAPIClient::V2::LLMObsAnnotationQueueLabelSchemaUpdateRequest.new({
data: DatadogAPIClient::V2::LLMObsAnnotationQueueLabelSchemaUpdateData.new({
attributes: DatadogAPIClient::V2::LLMObsAnnotationQueueLabelSchemaUpdateAttributes.new({
annotation_schema: DatadogAPIClient::V2::LLMObsAnnotationSchema.new({
label_schemas: [
DatadogAPIClient::V2::LLMObsLabelSchema.new({
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: DatadogAPIClient::V2::LLMObsLabelSchemaType::SCORE,
values: [
"good",
"bad",
"neutral",
],
}),
],
}),
}),
type: DatadogAPIClient::V2::LLMObsAnnotationQueueType::QUEUES,
}),
})
p api_instance.update_llm_obs_annotation_queue_label_schema("queue_id", body)
7 changes: 7 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,13 @@
"queue_id" => "String",
"body" => "LLMObsDeleteAnnotationQueueInteractionsRequest",
},
"v2.GetLLMObsAnnotationQueueLabelSchema" => {
"queue_id" => "String",
},
"v2.UpdateLLMObsAnnotationQueueLabelSchema" => {
"queue_id" => "String",
"body" => "LLMObsAnnotationQueueLabelSchemaUpdateRequest",
},
"v2.ListLLMObsExperiments" => {
"filter_project_id" => "String",
"filter_dataset_id" => "String",
Expand Down
53 changes: 48 additions & 5 deletions features/v2/llm_observability.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ Feature: LLM Observability
Scenario: Create an LLM Observability annotation queue returns "Bad Request" response
Given operation "CreateLLMObsAnnotationQueue" enabled
And new "CreateLLMObsAnnotationQueue" request
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"}}
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"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: Create an LLM Observability annotation queue returns "Created" response
Given operation "CreateLLMObsAnnotationQueue" enabled
And new "CreateLLMObsAnnotationQueue" request
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"}}
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"}}
When the request is sent
Then the response status is 201 Created

Expand Down Expand Up @@ -415,6 +415,22 @@ Feature: LLM Observability
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/ml-observability
Scenario: Get annotation queue label schema returns "Not Found" response
Given operation "GetLLMObsAnnotationQueueLabelSchema" enabled
And new "GetLLMObsAnnotationQueueLabelSchema" request
And request contains "queue_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ml-observability
Scenario: Get annotation queue label schema returns "OK" response
Given operation "GetLLMObsAnnotationQueueLabelSchema" enabled
And new "GetLLMObsAnnotationQueueLabelSchema" request
And request contains "queue_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/ml-observability
Scenario: List LLM Observability annotation queues returns "Bad Request" response
Given operation "ListLLMObsAnnotationQueues" enabled
Expand Down Expand Up @@ -570,7 +586,7 @@ Feature: LLM Observability
Given operation "UpdateLLMObsAnnotationQueue" enabled
And new "UpdateLLMObsAnnotationQueue" request
And request contains "queue_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
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"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -579,7 +595,7 @@ Feature: LLM Observability
Given operation "UpdateLLMObsAnnotationQueue" enabled
And new "UpdateLLMObsAnnotationQueue" request
And request contains "queue_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
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"}}
When the request is sent
Then the response status is 404 Not Found

Expand All @@ -588,7 +604,7 @@ Feature: LLM Observability
Given operation "UpdateLLMObsAnnotationQueue" enabled
And new "UpdateLLMObsAnnotationQueue" request
And request contains "queue_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"description": "Updated description", "name": "Updated queue name"}, "type": "queues"}}
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"}}
When the request is sent
Then the response status is 200 OK

Expand Down Expand Up @@ -675,3 +691,30 @@ Feature: LLM Observability
And body with value {"data": {"attributes": {}, "type": "projects"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/ml-observability
Scenario: Update annotation queue label schema returns "Bad Request" response
Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled
And new "UpdateLLMObsAnnotationQueueLabelSchema" request
And request contains "queue_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: Update annotation queue label schema returns "Not Found" response
Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled
And new "UpdateLLMObsAnnotationQueueLabelSchema" request
And request contains "queue_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/ml-observability
Scenario: Update annotation queue label schema returns "OK" response
Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled
And new "UpdateLLMObsAnnotationQueueLabelSchema" request
And request contains "queue_id" parameter from "REPLACE.ME"
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"}}
When the request is sent
Then the response status is 200 OK
12 changes: 12 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3267,6 +3267,18 @@
"type": "idempotent"
}
},
"GetLLMObsAnnotationQueueLabelSchema": {
"tag": "LLM Observability",
"undo": {
"type": "safe"
}
},
"UpdateLLMObsAnnotationQueueLabelSchema": {
"tag": "LLM Observability",
"undo": {
"type": "idempotent"
}
},
"ListLLMObsExperiments": {
"tag": "LLM Observability",
"undo": {
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,15 @@ def initialize
"v2.delete_llm_obs_experiments": false,
"v2.delete_llm_obs_projects": false,
"v2.get_llm_obs_annotated_interactions": false,
"v2.get_llm_obs_annotation_queue_label_schema": false,
"v2.get_llm_obs_custom_eval_config": false,
"v2.list_llm_obs_annotation_queues": false,
"v2.list_llm_obs_dataset_records": false,
"v2.list_llm_obs_datasets": false,
"v2.list_llm_obs_experiments": false,
"v2.list_llm_obs_projects": false,
"v2.update_llm_obs_annotation_queue": false,
"v2.update_llm_obs_annotation_queue_label_schema": false,
"v2.update_llm_obs_custom_eval_config": false,
"v2.update_llm_obs_dataset": false,
"v2.update_llm_obs_dataset_records": false,
Expand Down
12 changes: 12 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3496,13 +3496,20 @@ def overrides
"v2.llm_obs_annotation_queue_interactions_request" => "LLMObsAnnotationQueueInteractionsRequest",
"v2.llm_obs_annotation_queue_interactions_response" => "LLMObsAnnotationQueueInteractionsResponse",
"v2.llm_obs_annotation_queue_interactions_type" => "LLMObsAnnotationQueueInteractionsType",
"v2.llm_obs_annotation_queue_label_schema_attributes" => "LLMObsAnnotationQueueLabelSchemaAttributes",
"v2.llm_obs_annotation_queue_label_schema_data" => "LLMObsAnnotationQueueLabelSchemaData",
"v2.llm_obs_annotation_queue_label_schema_response" => "LLMObsAnnotationQueueLabelSchemaResponse",
"v2.llm_obs_annotation_queue_label_schema_update_attributes" => "LLMObsAnnotationQueueLabelSchemaUpdateAttributes",
"v2.llm_obs_annotation_queue_label_schema_update_data" => "LLMObsAnnotationQueueLabelSchemaUpdateData",
"v2.llm_obs_annotation_queue_label_schema_update_request" => "LLMObsAnnotationQueueLabelSchemaUpdateRequest",
"v2.llm_obs_annotation_queue_request" => "LLMObsAnnotationQueueRequest",
"v2.llm_obs_annotation_queue_response" => "LLMObsAnnotationQueueResponse",
"v2.llm_obs_annotation_queues_response" => "LLMObsAnnotationQueuesResponse",
"v2.llm_obs_annotation_queue_type" => "LLMObsAnnotationQueueType",
"v2.llm_obs_annotation_queue_update_data_attributes_request" => "LLMObsAnnotationQueueUpdateDataAttributesRequest",
"v2.llm_obs_annotation_queue_update_data_request" => "LLMObsAnnotationQueueUpdateDataRequest",
"v2.llm_obs_annotation_queue_update_request" => "LLMObsAnnotationQueueUpdateRequest",
"v2.llm_obs_annotation_schema" => "LLMObsAnnotationSchema",
"v2.llm_obs_cursor_meta" => "LLMObsCursorMeta",
"v2.llm_obs_custom_eval_config_assessment_criteria" => "LLMObsCustomEvalConfigAssessmentCriteria",
"v2.llm_obs_custom_eval_config_attributes" => "LLMObsCustomEvalConfigAttributes",
Expand Down Expand Up @@ -3587,6 +3594,8 @@ def overrides
"v2.llm_obs_experiment_update_data_request" => "LLMObsExperimentUpdateDataRequest",
"v2.llm_obs_experiment_update_request" => "LLMObsExperimentUpdateRequest",
"v2.llm_obs_interaction_type" => "LLMObsInteractionType",
"v2.llm_obs_label_schema" => "LLMObsLabelSchema",
"v2.llm_obs_label_schema_type" => "LLMObsLabelSchemaType",
"v2.llm_obs_metric_assessment" => "LLMObsMetricAssessment",
"v2.llm_obs_metric_score_type" => "LLMObsMetricScoreType",
"v2.llm_obs_project_data_attributes_request" => "LLMObsProjectDataAttributesRequest",
Expand Down Expand Up @@ -3992,6 +4001,9 @@ def overrides
"v2.observability_pipeline_custom_processor_type" => "ObservabilityPipelineCustomProcessorType",
"v2.observability_pipeline_data" => "ObservabilityPipelineData",
"v2.observability_pipeline_data_attributes" => "ObservabilityPipelineDataAttributes",
"v2.observability_pipeline_databricks_zerobus_destination" => "ObservabilityPipelineDatabricksZerobusDestination",
"v2.observability_pipeline_databricks_zerobus_destination_auth" => "ObservabilityPipelineDatabricksZerobusDestinationAuth",
"v2.observability_pipeline_databricks_zerobus_destination_type" => "ObservabilityPipelineDatabricksZerobusDestinationType",
"v2.observability_pipeline_datadog_agent_source" => "ObservabilityPipelineDatadogAgentSource",
"v2.observability_pipeline_datadog_agent_source_type" => "ObservabilityPipelineDatadogAgentSourceType",
"v2.observability_pipeline_datadog_logs_destination" => "ObservabilityPipelineDatadogLogsDestination",
Expand Down
Loading
Loading