Skip to content
Open
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
331 changes: 328 additions & 3 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions examples/v2/llm-observability/CreateLLMObsExperiment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
attributes: DatadogAPIClient::V2::LLMObsExperimentDataAttributesRequest.new({
dataset_id: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
name: "My Experiment v1",
parent_experiment_id: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012",
project_id: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
}),
type: DatadogAPIClient::V2::LLMObsExperimentType::EXPERIMENTS,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List LLM Observability experiment spans (v1) returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_llm_obs_experiment_events_v1".to_sym] = true
end
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
p api_instance.list_llm_obs_experiment_events_v1("experiment_id")
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List LLM Observability experiment events (v2) returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_llm_obs_experiment_events_v2".to_sym] = true
end
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
p api_instance.list_llm_obs_experiment_events_v2("experiment_id")
5 changes: 4 additions & 1 deletion examples/v2/llm-observability/UpdateLLMObsExperiment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@

body = DatadogAPIClient::V2::LLMObsExperimentUpdateRequest.new({
data: DatadogAPIClient::V2::LLMObsExperimentUpdateDataRequest.new({
attributes: DatadogAPIClient::V2::LLMObsExperimentUpdateDataAttributesRequest.new({}),
attributes: DatadogAPIClient::V2::LLMObsExperimentUpdateDataAttributesRequest.new({
dataset_id: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
status: DatadogAPIClient::V2::LLMObsExperimentStatus::COMPLETED,
}),
type: DatadogAPIClient::V2::LLMObsExperimentType::EXPERIMENTS,
}),
})
Expand Down
13 changes: 13 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,13 @@
"filter_project_id" => "String",
"filter_dataset_id" => "String",
"filter_id" => "String",
"filter_name" => "String",
"filter_experiment" => "String",
"filter_metadata" => "String",
"filter_parent_experiment_id" => "String",
"filter_is_deleted" => "Boolean",
"include_user_data" => "Boolean",
"include_dataset_names" => "Boolean",
"page_cursor" => "String",
"page_limit" => "Integer",
},
Expand All @@ -985,6 +992,9 @@
"experiment_id" => "String",
"body" => "LLMObsExperimentUpdateRequest",
},
"v2.ListLLMObsExperimentEventsV1" => {
"experiment_id" => "String",
},
"v2.CreateLLMObsExperimentEvents" => {
"experiment_id" => "String",
"body" => "LLMObsExperimentEventsRequest",
Expand Down Expand Up @@ -1113,6 +1123,9 @@
"project_id" => "String",
"dataset_id" => "String",
},
"v2.ListLLMObsExperimentEventsV2" => {
"experiment_id" => "String",
},
"v2.UploadLLMObsDatasetRecordsFile" => {
"project_id" => "String",
"dataset_id" => "String",
Expand Down
60 changes: 54 additions & 6 deletions features/v2/llm_observability.feature
Original file line number Diff line number Diff line change
Expand Up @@ -235,23 +235,23 @@ Feature: LLM Observability
Scenario: Create an LLM Observability experiment returns "Bad Request" response
Given operation "CreateLLMObsExperiment" enabled
And new "CreateLLMObsExperiment" request
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}}
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: Create an LLM Observability experiment returns "Created" response
Given operation "CreateLLMObsExperiment" enabled
And new "CreateLLMObsExperiment" request
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}}
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/ml-observability
Scenario: Create an LLM Observability experiment returns "OK" response
Given operation "CreateLLMObsExperiment" enabled
And new "CreateLLMObsExperiment" request
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}}
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "name": "My Experiment v1", "parent_experiment_id": "3fd6b5e0-8910-4b1c-a7d0-5b84de329012", "project_id": "a33671aa-24fd-4dcd-9b33-a8ec7dde7751"}, "type": "experiments"}}
When the request is sent
Then the response status is 200 OK

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

@generated @skip @team:DataDog/ml-observability
Scenario: List LLM Observability experiment events (v2) returns "Bad Request" response
Given operation "ListLLMObsExperimentEventsV2" enabled
And new "ListLLMObsExperimentEventsV2" request
And request contains "experiment_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: List LLM Observability experiment events (v2) returns "Not Found" response
Given operation "ListLLMObsExperimentEventsV2" enabled
And new "ListLLMObsExperimentEventsV2" request
And request contains "experiment_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: List LLM Observability experiment events (v2) returns "OK" response
Given operation "ListLLMObsExperimentEventsV2" enabled
And new "ListLLMObsExperimentEventsV2" request
And request contains "experiment_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 experiment spans (v1) returns "Bad Request" response
Given operation "ListLLMObsExperimentEventsV1" enabled
And new "ListLLMObsExperimentEventsV1" request
And request contains "experiment_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/ml-observability
Scenario: List LLM Observability experiment spans (v1) returns "Not Found" response
Given operation "ListLLMObsExperimentEventsV1" enabled
And new "ListLLMObsExperimentEventsV1" request
And request contains "experiment_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: List LLM Observability experiment spans (v1) returns "OK" response
Given operation "ListLLMObsExperimentEventsV1" enabled
And new "ListLLMObsExperimentEventsV1" request
And request contains "experiment_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 experiments returns "Bad Request" response
Given operation "ListLLMObsExperiments" enabled
Expand Down Expand Up @@ -1092,7 +1140,7 @@ Feature: LLM Observability
Given operation "UpdateLLMObsExperiment" enabled
And new "UpdateLLMObsExperiment" request
And request contains "experiment_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {}, "type": "experiments"}}
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -1101,7 +1149,7 @@ Feature: LLM Observability
Given operation "UpdateLLMObsExperiment" enabled
And new "UpdateLLMObsExperiment" request
And request contains "experiment_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {}, "type": "experiments"}}
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}}
When the request is sent
Then the response status is 404 Not Found

Expand All @@ -1110,7 +1158,7 @@ Feature: LLM Observability
Given operation "UpdateLLMObsExperiment" enabled
And new "UpdateLLMObsExperiment" request
And request contains "experiment_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {}, "type": "experiments"}}
And body with value {"data": {"attributes": {"dataset_id": "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d", "status": "completed"}, "type": "experiments"}}
When the request is sent
Then the response status is 200 OK

Expand Down
12 changes: 12 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3923,6 +3923,12 @@
"type": "idempotent"
}
},
"ListLLMObsExperimentEventsV1": {
"tag": "LLM Observability",
"undo": {
"type": "safe"
}
},
"CreateLLMObsExperimentEvents": {
"tag": "LLM Observability",
"undo": {
Expand Down Expand Up @@ -4103,6 +4109,12 @@
"type": "safe"
}
},
"ListLLMObsExperimentEventsV2": {
"tag": "LLM Observability",
"undo": {
"type": "safe"
}
},
"UploadLLMObsDatasetRecordsFile": {
"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 @@ -237,6 +237,8 @@ def initialize
"v2.list_llm_obs_datasets": false,
"v2.list_llm_obs_dataset_versions": false,
"v2.list_llm_obs_experiment_events": false,
"v2.list_llm_obs_experiment_events_v1": false,
"v2.list_llm_obs_experiment_events_v2": false,
"v2.list_llm_obs_experiments": false,
"v2.list_llm_obs_integration_accounts": false,
"v2.list_llm_obs_integration_models": false,
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4042,15 +4042,20 @@ def overrides
"v2.llm_obs_experiment_response" => "LLMObsExperimentResponse",
"v2.llm_obs_experiment_run_data_response" => "LLMObsExperimentRunDataResponse",
"v2.llm_obs_experiment_span" => "LLMObsExperimentSpan",
"v2.llm_obs_experiment_span_data_response" => "LLMObsExperimentSpanDataResponse",
"v2.llm_obs_experiment_span_error" => "LLMObsExperimentSpanError",
"v2.llm_obs_experiment_span_meta" => "LLMObsExperimentSpanMeta",
"v2.llm_obs_experiment_spans_response" => "LLMObsExperimentSpansResponse",
"v2.llm_obs_experiment_span_status" => "LLMObsExperimentSpanStatus",
"v2.llm_obs_experiment_span_type" => "LLMObsExperimentSpanType",
"v2.llm_obs_experiment_span_with_evals" => "LLMObsExperimentSpanWithEvals",
"v2.llm_obs_experiments_response" => "LLMObsExperimentsResponse",
"v2.llm_obs_experiment_status" => "LLMObsExperimentStatus",
"v2.llm_obs_experiment_type" => "LLMObsExperimentType",
"v2.llm_obs_experiment_update_data_attributes_request" => "LLMObsExperimentUpdateDataAttributesRequest",
"v2.llm_obs_experiment_update_data_request" => "LLMObsExperimentUpdateDataRequest",
"v2.llm_obs_experiment_update_request" => "LLMObsExperimentUpdateRequest",
"v2.llm_obs_experiment_user" => "LLMObsExperimentUser",
"v2.llm_obs_inference_code" => "LLMObsInferenceCode",
"v2.llm_obs_inference_content" => "LLMObsInferenceContent",
"v2.llm_obs_inference_content_value" => "LLMObsInferenceContentValue",
Expand Down
Loading
Loading