Skip to content

Commit 7aa324d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit be636b2 of spec repo (#3928)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 17f4160 commit 7aa324d

30 files changed

Lines changed: 5136 additions & 8 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 530 additions & 6 deletions
Large diffs are not rendered by default.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// Delete annotations returns "OK — annotations deleted. Errors for annotations that could not be
2+
// deleted are listed in
3+
// `errors`." response
4+
5+
import com.datadog.api.client.ApiClient;
6+
import com.datadog.api.client.ApiException;
7+
import com.datadog.api.client.v2.api.LlmObservabilityApi;
8+
import com.datadog.api.client.v2.model.LLMObsAnnotationsType;
9+
import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsDataAttributesRequest;
10+
import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsDataRequest;
11+
import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsRequest;
12+
import com.datadog.api.client.v2.model.LLMObsDeleteAnnotationsResponse;
13+
import java.util.Arrays;
14+
15+
public class Example {
16+
public static void main(String[] args) {
17+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
18+
defaultClient.setUnstableOperationEnabled("v2.deleteLLMObsAnnotations", true);
19+
LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient);
20+
21+
LLMObsDeleteAnnotationsRequest body =
22+
new LLMObsDeleteAnnotationsRequest()
23+
.data(
24+
new LLMObsDeleteAnnotationsDataRequest()
25+
.attributes(
26+
new LLMObsDeleteAnnotationsDataAttributesRequest()
27+
.annotationIds(
28+
Arrays.asList(
29+
"00000000-0000-0000-0000-000000000000",
30+
"00000000-0000-0000-0000-000000000001")))
31+
.type(LLMObsAnnotationsType.ANNOTATIONS));
32+
33+
try {
34+
LLMObsDeleteAnnotationsResponse result =
35+
apiInstance.deleteLLMObsAnnotations("00000000-0000-0000-0000-000000000001", body);
36+
System.out.println(result);
37+
} catch (ApiException e) {
38+
System.err.println("Exception when calling LlmObservabilityApi#deleteLLMObsAnnotations");
39+
System.err.println("Status code: " + e.getCode());
40+
System.err.println("Reason: " + e.getResponseBody());
41+
System.err.println("Response headers: " + e.getResponseHeaders());
42+
e.printStackTrace();
43+
}
44+
}
45+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Create or update annotations returns "OK — annotations created or updated. Per-item errors are
2+
// listed in `errors`."
3+
// response
4+
5+
import com.datadog.api.client.ApiClient;
6+
import com.datadog.api.client.ApiException;
7+
import com.datadog.api.client.v2.api.LlmObservabilityApi;
8+
import com.datadog.api.client.v2.model.LLMObsAnnotationLabelValue;
9+
import com.datadog.api.client.v2.model.LLMObsAnnotationLabelValueValue;
10+
import com.datadog.api.client.v2.model.LLMObsAnnotationsDataAttributesRequest;
11+
import com.datadog.api.client.v2.model.LLMObsAnnotationsDataRequest;
12+
import com.datadog.api.client.v2.model.LLMObsAnnotationsRequest;
13+
import com.datadog.api.client.v2.model.LLMObsAnnotationsResponse;
14+
import com.datadog.api.client.v2.model.LLMObsAnnotationsType;
15+
import com.datadog.api.client.v2.model.LLMObsUpsertAnnotationItem;
16+
import java.util.Arrays;
17+
import java.util.Collections;
18+
19+
public class Example {
20+
public static void main(String[] args) {
21+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
22+
defaultClient.setUnstableOperationEnabled("v2.upsertLLMObsAnnotations", true);
23+
LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient);
24+
25+
LLMObsAnnotationsRequest body =
26+
new LLMObsAnnotationsRequest()
27+
.data(
28+
new LLMObsAnnotationsDataRequest()
29+
.attributes(
30+
new LLMObsAnnotationsDataAttributesRequest()
31+
.annotations(
32+
Collections.singletonList(
33+
new LLMObsUpsertAnnotationItem()
34+
.interactionId("00000000-0000-0000-0000-000000000001")
35+
.labelValues(
36+
Arrays.asList(
37+
new LLMObsAnnotationLabelValue()
38+
.labelSchemaId("abc-123")
39+
.value(
40+
new LLMObsAnnotationLabelValueValue(
41+
"good")),
42+
new LLMObsAnnotationLabelValue()
43+
.labelSchemaId("ef56gh78")
44+
.value(
45+
new LLMObsAnnotationLabelValueValue(
46+
"positive")))))))
47+
.type(LLMObsAnnotationsType.ANNOTATIONS));
48+
49+
try {
50+
LLMObsAnnotationsResponse result =
51+
apiInstance.upsertLLMObsAnnotations("00000000-0000-0000-0000-000000000001", body);
52+
System.out.println(result);
53+
} catch (ApiException e) {
54+
System.err.println("Exception when calling LlmObservabilityApi#upsertLLMObsAnnotations");
55+
System.err.println("Status code: " + e.getCode());
56+
System.err.println("Reason: " + e.getResponseBody());
57+
System.err.println("Response headers: " + e.getResponseHeaders());
58+
e.printStackTrace();
59+
}
60+
}
61+
}

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ public class ApiClient {
786786
put("v2.createLLMObsProject", false);
787787
put("v2.deleteLLMObsAnnotationQueue", false);
788788
put("v2.deleteLLMObsAnnotationQueueInteractions", false);
789+
put("v2.deleteLLMObsAnnotations", false);
789790
put("v2.deleteLLMObsCustomEvalConfig", false);
790791
put("v2.deleteLLMObsData", false);
791792
put("v2.deleteLLMObsDatasetRecords", false);
@@ -824,6 +825,7 @@ public class ApiClient {
824825
put("v2.updateLLMObsExperiment", false);
825826
put("v2.updateLLMObsProject", false);
826827
put("v2.uploadLLMObsDatasetRecordsFile", false);
828+
put("v2.upsertLLMObsAnnotations", false);
827829
put("v2.createAnnotation", false);
828830
put("v2.deleteAnnotation", false);
829831
put("v2.getPageAnnotations", false);

0 commit comments

Comments
 (0)