Skip to content

Commit 0616314

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 24d86a0 of spec repo (#4267)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent bb8e5d0 commit 0616314

11 files changed

Lines changed: 1488 additions & 0 deletions

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,14 @@ components:
988988
required: true
989989
schema:
990990
type: string
991+
LLMObsAnnotationQueueInteractionIDPathParameter:
992+
description: The ID of the interaction in the annotation queue.
993+
example: "interaction-456"
994+
in: path
995+
name: interaction_id
996+
required: true
997+
schema:
998+
type: string
991999
LLMObsDatasetIDPathParameter:
9921000
description: The ID of the Agent Observability dataset.
9931001
example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d"
@@ -56166,11 +56174,89 @@ components:
5616656174
- can_annotate
5616756175
- annotations
5616856176
type: object
56177+
LLMObsAnnotatedInteractionDataAttributesResponse:
56178+
description: Attributes containing an annotated interaction and its related events.
56179+
properties:
56180+
annotated_interaction:
56181+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionItem"
56182+
events:
56183+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionEvents"
56184+
interaction_type:
56185+
$ref: "#/components/schemas/LLMObsAnyInteractionType"
56186+
next_cursor:
56187+
description: Cursor to retrieve the next page of events. Absent when there are no more events.
56188+
example: "eyJzdGFydCI6MTAwfQ=="
56189+
type: string
56190+
required:
56191+
- annotated_interaction
56192+
- interaction_type
56193+
- events
56194+
type: object
56195+
LLMObsAnnotatedInteractionDataResponse:
56196+
description: Data object for a single annotated interaction.
56197+
properties:
56198+
attributes:
56199+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionDataAttributesResponse"
56200+
id:
56201+
description: Unique identifier of the interaction.
56202+
example: "interaction-456"
56203+
type: string
56204+
type:
56205+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionsType"
56206+
required:
56207+
- id
56208+
- type
56209+
- attributes
56210+
type: object
56211+
LLMObsAnnotatedInteractionEvent:
56212+
description: An event associated with an annotated interaction.
56213+
properties:
56214+
attributes:
56215+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionEventAttributes"
56216+
id:
56217+
description: Unique identifier of the event.
56218+
example: "span-7a1b2c3d"
56219+
type: string
56220+
type:
56221+
description: Type of the event.
56222+
example: span
56223+
type: string
56224+
required:
56225+
- id
56226+
- type
56227+
- attributes
56228+
type: object
56229+
LLMObsAnnotatedInteractionEventAttributes:
56230+
additionalProperties: {}
56231+
description: Attributes of an event associated with an annotated interaction.
56232+
example:
56233+
duration: 1500000000
56234+
ml_app: my-llm-app
56235+
name: agent_workflow
56236+
span_id: span-7a1b2c3d
56237+
span_kind: agent
56238+
start_ns: 1705314600000000000
56239+
status: ok
56240+
trace_id: trace-abc-123
56241+
type: object
56242+
LLMObsAnnotatedInteractionEvents:
56243+
description: Page of events associated with the annotated interaction.
56244+
items:
56245+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionEvent"
56246+
type: array
5616956247
LLMObsAnnotatedInteractionItem:
5617056248
description: An interaction with its associated annotations.
5617156249
oneOf:
5617256250
- $ref: "#/components/schemas/LLMObsTraceAnnotatedInteractionItem"
5617356251
- $ref: "#/components/schemas/LLMObsDisplayBlockAnnotatedInteractionItem"
56252+
LLMObsAnnotatedInteractionResponse:
56253+
description: Response containing a single annotated interaction and its related events.
56254+
properties:
56255+
data:
56256+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionDataResponse"
56257+
required:
56258+
- data
56259+
type: object
5617456260
LLMObsAnnotatedInteractionsByTraceDataAttributesResponse:
5617556261
description: Attributes of the cross-queue annotated interactions response.
5617656262
properties:
@@ -166482,6 +166568,103 @@ paths:
166482166568
x-unstable: |-
166483166569
**Note**: This endpoint is in preview and is subject to change.
166484166570
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
166571+
/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}:
166572+
get:
166573+
description: Retrieve an interaction, its annotations, and a page of related events from an annotation queue.
166574+
operationId: GetLLMObsAnnotatedInteraction
166575+
parameters:
166576+
- $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter"
166577+
- $ref: "#/components/parameters/LLMObsAnnotationQueueInteractionIDPathParameter"
166578+
- description: Maximum number of events to return. Defaults to 10.
166579+
in: query
166580+
name: limit
166581+
schema:
166582+
default: 10
166583+
format: int32
166584+
maximum: 1000
166585+
minimum: 1
166586+
type: integer
166587+
- description: Cursor from the previous response to retrieve the next page of events.
166588+
in: query
166589+
name: cursor
166590+
schema:
166591+
type: string
166592+
responses:
166593+
"200":
166594+
content:
166595+
application/json:
166596+
examples:
166597+
default:
166598+
value:
166599+
data:
166600+
attributes:
166601+
annotated_interaction:
166602+
annotations: []
166603+
can_annotate: true
166604+
content_id: trace-abc-123
166605+
created_at: "2024-01-15T10:30:00Z"
166606+
id: interaction-456
166607+
modified_at: "2024-01-15T10:30:00Z"
166608+
type: trace
166609+
events:
166610+
- attributes:
166611+
duration: 1500000000
166612+
ml_app: my-llm-app
166613+
name: agent_workflow
166614+
span_id: span-7a1b2c3d
166615+
span_kind: agent
166616+
start_ns: 1705314600000000000
166617+
status: ok
166618+
trace_id: trace-abc-123
166619+
id: span-7a1b2c3d
166620+
type: span
166621+
interaction_type: session
166622+
next_cursor: eyJzdGFydCI6MTAwfQ==
166623+
id: interaction-456
166624+
type: annotated_interactions
166625+
schema:
166626+
$ref: "#/components/schemas/LLMObsAnnotatedInteractionResponse"
166627+
description: OK
166628+
"400":
166629+
content:
166630+
application/json:
166631+
schema:
166632+
$ref: "#/components/schemas/JSONAPIErrorResponse"
166633+
description: Bad Request
166634+
"401":
166635+
content:
166636+
application/json:
166637+
schema:
166638+
$ref: "#/components/schemas/JSONAPIErrorResponse"
166639+
description: Unauthorized
166640+
"403":
166641+
content:
166642+
application/json:
166643+
schema:
166644+
$ref: "#/components/schemas/JSONAPIErrorResponse"
166645+
description: Forbidden
166646+
"404":
166647+
content:
166648+
application/json:
166649+
schema:
166650+
$ref: "#/components/schemas/JSONAPIErrorResponse"
166651+
description: Not Found
166652+
"429":
166653+
$ref: "#/components/responses/TooManyRequestsResponse"
166654+
security:
166655+
- apiKeyAuth: []
166656+
appKeyAuth: []
166657+
summary: Get an annotated queue interaction
166658+
tags:
166659+
- Agent Observability
166660+
x-pagination:
166661+
cursorParam: cursor
166662+
cursorPath: data.attributes.next_cursor
166663+
limitParam: limit
166664+
resultsPath: data.attributes.events
166665+
x-unstable: |-
166666+
**Note**: This endpoint is in preview and is subject to change.
166667+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
166485166668
/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations:
166486166669
post:
166487166670
description: |-
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Get an annotated queue interaction returns "OK" response
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.ApiException;
5+
import com.datadog.api.client.v2.api.AgentObservabilityApi;
6+
import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionResponse;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getLLMObsAnnotatedInteraction", true);
12+
AgentObservabilityApi apiInstance = new AgentObservabilityApi(defaultClient);
13+
14+
try {
15+
LLMObsAnnotatedInteractionResponse result =
16+
apiInstance.getLLMObsAnnotatedInteraction(
17+
"00000000-0000-0000-0000-000000000001", "interaction-456");
18+
System.out.println(result);
19+
} catch (ApiException e) {
20+
System.err.println(
21+
"Exception when calling AgentObservabilityApi#getLLMObsAnnotatedInteraction");
22+
System.err.println("Status code: " + e.getCode());
23+
System.err.println("Reason: " + e.getResponseBody());
24+
System.err.println("Response headers: " + e.getResponseHeaders());
25+
e.printStackTrace();
26+
}
27+
}
28+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Get an annotated queue interaction returns "OK" response with pagination
2+
3+
import com.datadog.api.client.ApiClient;
4+
import com.datadog.api.client.PaginationIterable;
5+
import com.datadog.api.client.v2.api.AgentObservabilityApi;
6+
import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionEvent;
7+
8+
public class Example {
9+
public static void main(String[] args) {
10+
ApiClient defaultClient = ApiClient.getDefaultApiClient();
11+
defaultClient.setUnstableOperationEnabled("v2.getLLMObsAnnotatedInteraction", true);
12+
AgentObservabilityApi apiInstance = new AgentObservabilityApi(defaultClient);
13+
14+
try {
15+
PaginationIterable<LLMObsAnnotatedInteractionEvent> iterable =
16+
apiInstance.getLLMObsAnnotatedInteractionWithPagination(
17+
"00000000-0000-0000-0000-000000000001", "interaction-456");
18+
19+
for (LLMObsAnnotatedInteractionEvent item : iterable) {
20+
System.out.println(item);
21+
}
22+
} catch (RuntimeException e) {
23+
System.err.println(
24+
"Exception when calling"
25+
+ " AgentObservabilityApi#getLLMObsAnnotatedInteractionWithPagination");
26+
System.err.println("Reason: " + e.getMessage());
27+
e.printStackTrace();
28+
}
29+
}
30+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,7 @@ public class ApiClient {
868868
put("v2.deleteLLMObsProjects", false);
869869
put("v2.deleteLLMObsPrompt", false);
870870
put("v2.exportLLMObsDataset", false);
871+
put("v2.getLLMObsAnnotatedInteraction", false);
871872
put("v2.getLLMObsAnnotatedInteractions", false);
872873
put("v2.getLLMObsAnnotatedInteractionsByTraceIDs", false);
873874
put("v2.getLLMObsAnnotationQueueLabelSchema", false);

0 commit comments

Comments
 (0)