-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathUpdateLLMObsAnnotationQueueLabelSchema.rb
More file actions
38 lines (36 loc) · 1.37 KB
/
Copy pathUpdateLLMObsAnnotationQueueLabelSchema.rb
File metadata and controls
38 lines (36 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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)