Skip to content

Commit 53494cb

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update param spec for GET experiments in LLM Observability (#1692)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 886ef3e commit 53494cb

19 files changed

Lines changed: 1729 additions & 40 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 328 additions & 3 deletions
Large diffs are not rendered by default.

examples/v2_llm-observability_CreateLLMObsExperiment.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ use datadog_api_client::datadogV2::model::LLMObsExperimentType;
1010
async fn main() {
1111
let body = LLMObsExperimentRequest::new(LLMObsExperimentDataRequest::new(
1212
LLMObsExperimentDataAttributesRequest::new(
13-
"9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d".to_string(),
1413
"My Experiment v1".to_string(),
1514
"a33671aa-24fd-4dcd-9b33-a8ec7dde7751".to_string(),
16-
),
15+
)
16+
.dataset_id("9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d".to_string())
17+
.parent_experiment_id("3fd6b5e0-8910-4b1c-a7d0-5b84de329012".to_string()),
1718
LLMObsExperimentType::EXPERIMENTS,
1819
));
1920
let mut configuration = datadog::Configuration::new();
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// List LLM Observability experiment spans (v1) returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
let mut configuration = datadog::Configuration::new();
8+
configuration.set_unstable_operation_enabled("v2.ListLLMObsExperimentEventsV1", true);
9+
let api = LLMObservabilityAPI::with_config(configuration);
10+
let resp = api
11+
.list_llm_obs_experiment_events_v1("experiment_id".to_string())
12+
.await;
13+
if let Ok(value) = resp {
14+
println!("{:#?}", value);
15+
} else {
16+
println!("{:#?}", resp.unwrap_err());
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// List LLM Observability experiment events (v2) returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
let mut configuration = datadog::Configuration::new();
8+
configuration.set_unstable_operation_enabled("v2.ListLLMObsExperimentEventsV2", true);
9+
let api = LLMObservabilityAPI::with_config(configuration);
10+
let resp = api
11+
.list_llm_obs_experiment_events_v2("experiment_id".to_string())
12+
.await;
13+
if let Ok(value) = resp {
14+
println!("{:#?}", value);
15+
} else {
16+
println!("{:#?}", resp.unwrap_err());
17+
}
18+
}

examples/v2_llm-observability_UpdateLLMObsExperiment.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Update an LLM Observability experiment returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_llm_observability::LLMObservabilityAPI;
4+
use datadog_api_client::datadogV2::model::LLMObsExperimentStatus;
45
use datadog_api_client::datadogV2::model::LLMObsExperimentType;
56
use datadog_api_client::datadogV2::model::LLMObsExperimentUpdateDataAttributesRequest;
67
use datadog_api_client::datadogV2::model::LLMObsExperimentUpdateDataRequest;
@@ -9,7 +10,9 @@ use datadog_api_client::datadogV2::model::LLMObsExperimentUpdateRequest;
910
#[tokio::main]
1011
async fn main() {
1112
let body = LLMObsExperimentUpdateRequest::new(LLMObsExperimentUpdateDataRequest::new(
12-
LLMObsExperimentUpdateDataAttributesRequest::new(),
13+
LLMObsExperimentUpdateDataAttributesRequest::new()
14+
.dataset_id("9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d".to_string())
15+
.status(LLMObsExperimentStatus::COMPLETED),
1316
LLMObsExperimentType::EXPERIMENTS,
1417
));
1518
let mut configuration = datadog::Configuration::new();

src/datadog/configuration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ impl Default for Configuration {
182182
("v2.list_llm_obs_datasets".to_owned(), false),
183183
("v2.list_llm_obs_dataset_versions".to_owned(), false),
184184
("v2.list_llm_obs_experiment_events".to_owned(), false),
185+
("v2.list_llm_obs_experiment_events_v1".to_owned(), false),
186+
("v2.list_llm_obs_experiment_events_v2".to_owned(), false),
185187
("v2.list_llm_obs_experiments".to_owned(), false),
186188
("v2.list_llm_obs_integration_accounts".to_owned(), false),
187189
("v2.list_llm_obs_integration_models".to_owned(), false),

0 commit comments

Comments
 (0)