-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathDeleteLLMObsExperiments.java
More file actions
38 lines (34 loc) · 1.68 KB
/
DeleteLLMObsExperiments.java
File metadata and controls
38 lines (34 loc) · 1.68 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
// Delete LLM Observability experiments returns "No Content" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.LlmObservabilityApi;
import com.datadog.api.client.v2.model.LLMObsDeleteExperimentsDataAttributesRequest;
import com.datadog.api.client.v2.model.LLMObsDeleteExperimentsDataRequest;
import com.datadog.api.client.v2.model.LLMObsDeleteExperimentsRequest;
import com.datadog.api.client.v2.model.LLMObsExperimentType;
import java.util.Collections;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteLLMObsExperiments", true);
LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient);
LLMObsDeleteExperimentsRequest body =
new LLMObsDeleteExperimentsRequest()
.data(
new LLMObsDeleteExperimentsDataRequest()
.attributes(
new LLMObsDeleteExperimentsDataAttributesRequest()
.experimentIds(
Collections.singletonList("3fd6b5e0-8910-4b1c-a7d0-5b84de329012")))
.type(LLMObsExperimentType.EXPERIMENTS));
try {
apiInstance.deleteLLMObsExperiments(body);
} catch (ApiException e) {
System.err.println("Exception when calling LlmObservabilityApi#deleteLLMObsExperiments");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}