Skip to content

Commit 87bfb7f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b58692b of spec repo
1 parent 6f21bdc commit 87bfb7f

96 files changed

Lines changed: 14343 additions & 700 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.generator/schemas/v2/openapi.yaml

Lines changed: 2666 additions & 691 deletions
Large diffs are not rendered by default.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Create an LLM Observability dataset returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_llm_obs_dataset".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsDatasetRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsDatasetDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsDatasetDataAttributesRequest.new({
12+
name: "My LLM Dataset",
13+
}),
14+
type: DatadogAPIClient::V2::LLMObsDatasetType::DATASETS,
15+
}),
16+
})
17+
p api_instance.create_llm_obs_dataset("project_id", body)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Append records to an LLM Observability dataset returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_llm_obs_dataset_records".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsDatasetRecordsRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsDatasetRecordsDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsDatasetRecordsDataAttributesRequest.new({
12+
records: [
13+
DatadogAPIClient::V2::LLMObsDatasetRecordItem.new({
14+
expected_output: nil,
15+
input: nil,
16+
}),
17+
],
18+
}),
19+
type: DatadogAPIClient::V2::LLMObsRecordType::RECORDS,
20+
}),
21+
})
22+
p api_instance.create_llm_obs_dataset_records("project_id", "dataset_id", body)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Create an LLM Observability experiment returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_llm_obs_experiment".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsExperimentRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsExperimentDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsExperimentDataAttributesRequest.new({
12+
dataset_id: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
13+
name: "My Experiment v1",
14+
project_id: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
15+
}),
16+
type: DatadogAPIClient::V2::LLMObsExperimentType::EXPERIMENTS,
17+
}),
18+
})
19+
p api_instance.create_llm_obs_experiment(body)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Push events for an LLM Observability experiment returns "Accepted" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_llm_obs_experiment_events".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsExperimentEventsRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsExperimentEventsDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsExperimentEventsDataAttributesRequest.new({
12+
metrics: [
13+
DatadogAPIClient::V2::LLMObsExperimentMetric.new({
14+
assessment: DatadogAPIClient::V2::LLMObsMetricAssessment::PASS,
15+
error: DatadogAPIClient::V2::LLMObsExperimentMetricError.new({}),
16+
label: "faithfulness",
17+
metric_type: DatadogAPIClient::V2::LLMObsMetricScoreType::SCORE,
18+
span_id: "span-7a1b2c3d",
19+
tags: [],
20+
timestamp_ms: 1705314600000,
21+
}),
22+
],
23+
spans: [
24+
DatadogAPIClient::V2::LLMObsExperimentSpan.new({
25+
dataset_id: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
26+
duration: 1500000000,
27+
meta: DatadogAPIClient::V2::LLMObsExperimentSpanMeta.new({
28+
error: DatadogAPIClient::V2::LLMObsExperimentSpanError.new({
29+
message: "Model response timed out",
30+
stack: 'Traceback (most recent call last):\n File "main.py", line 10, in <module>\n response = model.generate(input)\n File "model.py", line 45, in generate\n raise TimeoutError("Model response timed out")\nTimeoutError: Model response timed out',
31+
type: "TimeoutError",
32+
}),
33+
input: nil,
34+
output: nil,
35+
}),
36+
name: "llm_call",
37+
project_id: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
38+
span_id: "span-7a1b2c3d",
39+
start_ns: 1705314600000000000,
40+
status: DatadogAPIClient::V2::LLMObsExperimentSpanStatus::OK,
41+
tags: [],
42+
trace_id: "abc123def456",
43+
}),
44+
],
45+
}),
46+
type: DatadogAPIClient::V2::LLMObsEventType::EVENTS,
47+
}),
48+
})
49+
p api_instance.create_llm_obs_experiment_events("experiment_id", body)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Create an LLM Observability project returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.create_llm_obs_project".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsProjectRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsProjectDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsProjectDataAttributesRequest.new({
12+
name: "My LLM Project",
13+
}),
14+
type: DatadogAPIClient::V2::LLMObsProjectType::PROJECTS,
15+
}),
16+
})
17+
p api_instance.create_llm_obs_project(body)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Delete LLM Observability dataset records returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_llm_obs_dataset_records".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsDeleteDatasetRecordsRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsDeleteDatasetRecordsDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsDeleteDatasetRecordsDataAttributesRequest.new({
12+
record_ids: [
13+
"rec-7c3f5a1b-9e2d-4f8a-b1c6-3d7e9f0a2b4c",
14+
],
15+
}),
16+
type: DatadogAPIClient::V2::LLMObsRecordType::RECORDS,
17+
}),
18+
})
19+
api_instance.delete_llm_obs_dataset_records("project_id", "dataset_id", body)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Delete LLM Observability datasets returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_llm_obs_datasets".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsDeleteDatasetsRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsDeleteDatasetsDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsDeleteDatasetsDataAttributesRequest.new({
12+
dataset_ids: [
13+
"9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d",
14+
],
15+
}),
16+
type: DatadogAPIClient::V2::LLMObsDatasetType::DATASETS,
17+
}),
18+
})
19+
api_instance.delete_llm_obs_datasets("project_id", body)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Delete LLM Observability experiments returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_llm_obs_experiments".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsDeleteExperimentsRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsDeleteExperimentsDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsDeleteExperimentsDataAttributesRequest.new({
12+
experiment_ids: [
13+
"3fd6b5e0-8910-4b1c-a7d0-5b84de329012",
14+
],
15+
}),
16+
type: DatadogAPIClient::V2::LLMObsExperimentType::EXPERIMENTS,
17+
}),
18+
})
19+
api_instance.delete_llm_obs_experiments(body)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Delete LLM Observability projects returns "No Content" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.delete_llm_obs_projects".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::LLMObservabilityAPI.new
8+
9+
body = DatadogAPIClient::V2::LLMObsDeleteProjectsRequest.new({
10+
data: DatadogAPIClient::V2::LLMObsDeleteProjectsDataRequest.new({
11+
attributes: DatadogAPIClient::V2::LLMObsDeleteProjectsDataAttributesRequest.new({
12+
project_ids: [
13+
"a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
14+
],
15+
}),
16+
type: DatadogAPIClient::V2::LLMObsProjectType::PROJECTS,
17+
}),
18+
})
19+
api_instance.delete_llm_obs_projects(body)

0 commit comments

Comments
 (0)