Skip to content

Commit cd43e22

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c429f9e of spec repo
1 parent 5f72606 commit cd43e22

21 files changed

Lines changed: 3542 additions & 593 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 350 additions & 68 deletions
Large diffs are not rendered by default.

examples/v2/llm-observability/CreateLLMObsAnnotationQueueInteractions.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsRequest;
1010
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsResponse;
1111
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsType;
12-
import com.datadog.api.client.v2.model.LLMObsInteractionType;
12+
import com.datadog.api.client.v2.model.LLMObsTraceInteractionItem;
13+
import com.datadog.api.client.v2.model.LLMObsTraceInteractionType;
1314
import java.util.Collections;
1415

1516
public class Example {
@@ -26,9 +27,10 @@ public static void main(String[] args) {
2627
new LLMObsAnnotationQueueInteractionsDataAttributesRequest()
2728
.interactions(
2829
Collections.singletonList(
29-
new LLMObsAnnotationQueueInteractionItem()
30-
.contentId("trace-abc-123")
31-
.type(LLMObsInteractionType.TRACE))))
30+
new LLMObsAnnotationQueueInteractionItem(
31+
new LLMObsTraceInteractionItem()
32+
.contentId("trace-abc-123")
33+
.type(LLMObsTraceInteractionType.TRACE)))))
3234
.type(LLMObsAnnotationQueueInteractionsType.INTERACTIONS));
3335

3436
try {
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// Add a display_block interaction returns "Created" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.LlmObservabilityApi;
6+
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionItem;
7+
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsDataAttributesRequest;
8+
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsDataRequest;
9+
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsRequest;
10+
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsResponse;
11+
import com.datadog.api.client.v2.model.LLMObsAnnotationQueueInteractionsType;
12+
import com.datadog.api.client.v2.model.LLMObsContentBlock;
13+
import com.datadog.api.client.v2.model.LLMObsContentBlockType;
14+
import com.datadog.api.client.v2.model.LLMObsDisplayBlockInteractionItem;
15+
import com.datadog.api.client.v2.model.LLMObsDisplayBlockInteractionType;
16+
import java.util.Collections;
17+
18+
public class Example {
19+
public static void main(String[] args) {
20+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
21+
defaultClient.setUnstableOperationEnabled("v2.createLLMObsAnnotationQueueInteractions", true);
22+
LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient);
23+
24+
LLMObsAnnotationQueueInteractionsRequest body =
25+
new LLMObsAnnotationQueueInteractionsRequest()
26+
.data(
27+
new LLMObsAnnotationQueueInteractionsDataRequest()
28+
.attributes(
29+
new LLMObsAnnotationQueueInteractionsDataAttributesRequest()
30+
.interactions(
31+
Collections.singletonList(
32+
new LLMObsAnnotationQueueInteractionItem(
33+
new LLMObsDisplayBlockInteractionItem()
34+
.type(LLMObsDisplayBlockInteractionType.DISPLAY_BLOCK)
35+
.displayBlock(
36+
Collections.singletonList(
37+
new LLMObsContentBlock()
38+
.type(LLMObsContentBlockType.MARKDOWN)
39+
.content("## Triage Instructions")))))))
40+
.type(LLMObsAnnotationQueueInteractionsType.INTERACTIONS));
41+
42+
try {
43+
LLMObsAnnotationQueueInteractionsResponse result =
44+
apiInstance.createLLMObsAnnotationQueueInteractions(
45+
"00000000-0000-0000-0000-000000000001", body);
46+
System.out.println(result);
47+
} catch (ApiException e) {
48+
System.err.println(
49+
"Exception when calling LlmObservabilityApi#createLLMObsAnnotationQueueInteractions");
50+
System.err.println("Status code: " + e.getCode());
51+
System.err.println("Reason: " + e.getResponseBody());
52+
System.err.println("Response headers: " + e.getResponseHeaders());
53+
e.printStackTrace();
54+
}
55+
}
56+
}

src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,18 @@ public LLMObsAnnotationQueueInteractionsResponse createLLMObsAnnotationQueueInte
269269
}
270270

271271
/**
272-
* Add one or more interactions (traces or sessions) to an annotation queue. At least one
273-
* interaction must be provided.
272+
* Add one or more interactions to an annotation queue. At least one interaction must be provided.
273+
* Each interaction has a <code>type</code>:
274+
*
275+
* <ul>
276+
* <li><code>trace</code>, <code>experiment_trace</code>, <code>session</code>: <code>content_id
277+
* </code> references the upstream entity; the server fetches the actual content.
278+
* <li><code>display_block</code>: omit <code>content_id</code> and provide the rendered content
279+
* in <code>display_block</code>. The server generates <code>content_id</code> as a
280+
* deterministic hash of the block list.
281+
* </ul>
282+
*
283+
* <p>Items of different types can be mixed in a single request.
274284
*
275285
* @param queueId The ID of the LLM Observability annotation queue. (required)
276286
* @param body Add interactions payload. (required)

0 commit comments

Comments
 (0)