Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
183 changes: 183 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,14 @@ components:
required: true
schema:
type: string
LLMObsAnnotationQueueInteractionIDPathParameter:
description: The ID of the interaction in the annotation queue.
example: "interaction-456"
in: path
name: interaction_id
required: true
schema:
type: string
LLMObsDatasetIDPathParameter:
description: The ID of the Agent Observability dataset.
example: "9f64e5c7-dc5a-45c8-a17c-1b85f0bec97d"
Expand Down Expand Up @@ -56166,11 +56174,89 @@ components:
- can_annotate
- annotations
type: object
LLMObsAnnotatedInteractionDataAttributesResponse:
description: Attributes containing an annotated interaction and its related events.
properties:
annotated_interaction:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionItem"
events:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionEvents"
interaction_type:
$ref: "#/components/schemas/LLMObsAnyInteractionType"
next_cursor:
description: Cursor to retrieve the next page of events. Absent when there are no more events.
example: "eyJzdGFydCI6MTAwfQ=="
type: string
required:
- annotated_interaction
- interaction_type
- events
type: object
LLMObsAnnotatedInteractionDataResponse:
description: Data object for a single annotated interaction.
properties:
attributes:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionDataAttributesResponse"
id:
description: Unique identifier of the interaction.
example: "interaction-456"
type: string
type:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionsType"
required:
- id
- type
- attributes
type: object
LLMObsAnnotatedInteractionEvent:
description: An event associated with an annotated interaction.
properties:
attributes:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionEventAttributes"
id:
description: Unique identifier of the event.
example: "span-7a1b2c3d"
type: string
type:
description: Type of the event.
example: span
type: string
required:
- id
- type
- attributes
type: object
LLMObsAnnotatedInteractionEventAttributes:
additionalProperties: {}
description: Attributes of an event associated with an annotated interaction.
example:
duration: 1500000000
ml_app: my-llm-app
name: agent_workflow
span_id: span-7a1b2c3d
span_kind: agent
start_ns: 1705314600000000000
status: ok
trace_id: trace-abc-123
type: object
LLMObsAnnotatedInteractionEvents:
description: Page of events associated with the annotated interaction.
items:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionEvent"
type: array
LLMObsAnnotatedInteractionItem:
description: An interaction with its associated annotations.
oneOf:
- $ref: "#/components/schemas/LLMObsTraceAnnotatedInteractionItem"
- $ref: "#/components/schemas/LLMObsDisplayBlockAnnotatedInteractionItem"
LLMObsAnnotatedInteractionResponse:
description: Response containing a single annotated interaction and its related events.
properties:
data:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionDataResponse"
required:
- data
type: object
LLMObsAnnotatedInteractionsByTraceDataAttributesResponse:
description: Attributes of the cross-queue annotated interactions response.
properties:
Expand Down Expand Up @@ -166482,6 +166568,103 @@ paths:
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotated-interactions/{interaction_id}:
get:
description: Retrieve an interaction, its annotations, and a page of related events from an annotation queue.
operationId: GetLLMObsAnnotatedInteraction
parameters:
- $ref: "#/components/parameters/LLMObsAnnotationQueueIDPathParameter"
- $ref: "#/components/parameters/LLMObsAnnotationQueueInteractionIDPathParameter"
- description: Maximum number of events to return. Defaults to 10.
in: query
name: limit
schema:
default: 10
format: int32
maximum: 1000
minimum: 1
type: integer
- description: Cursor from the previous response to retrieve the next page of events.
in: query
name: cursor
schema:
type: string
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
annotated_interaction:
annotations: []
can_annotate: true
content_id: trace-abc-123
created_at: "2024-01-15T10:30:00Z"
id: interaction-456
modified_at: "2024-01-15T10:30:00Z"
type: trace
events:
- attributes:
duration: 1500000000
ml_app: my-llm-app
name: agent_workflow
span_id: span-7a1b2c3d
span_kind: agent
start_ns: 1705314600000000000
status: ok
trace_id: trace-abc-123
id: span-7a1b2c3d
type: span
interaction_type: session
next_cursor: eyJzdGFydCI6MTAwfQ==
id: interaction-456
type: annotated_interactions
schema:
$ref: "#/components/schemas/LLMObsAnnotatedInteractionResponse"
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"401":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Unauthorized
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Get an annotated queue interaction
tags:
- Agent Observability
x-pagination:
cursorParam: cursor
cursorPath: data.attributes.next_cursor
limitParam: limit
resultsPath: data.attributes.events
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/llm-obs/v1/annotation-queues/{queue_id}/annotations:
post:
description: |-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Get an annotated queue interaction returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.AgentObservabilityApi;
import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getLLMObsAnnotatedInteraction", true);
AgentObservabilityApi apiInstance = new AgentObservabilityApi(defaultClient);

try {
LLMObsAnnotatedInteractionResponse result =
apiInstance.getLLMObsAnnotatedInteraction(
"00000000-0000-0000-0000-000000000001", "interaction-456");
System.out.println(result);
} catch (ApiException e) {
System.err.println(
"Exception when calling AgentObservabilityApi#getLLMObsAnnotatedInteraction");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Get an annotated queue interaction returns "OK" response with pagination

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.PaginationIterable;
import com.datadog.api.client.v2.api.AgentObservabilityApi;
import com.datadog.api.client.v2.model.LLMObsAnnotatedInteractionEvent;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getLLMObsAnnotatedInteraction", true);
AgentObservabilityApi apiInstance = new AgentObservabilityApi(defaultClient);

try {
PaginationIterable<LLMObsAnnotatedInteractionEvent> iterable =
apiInstance.getLLMObsAnnotatedInteractionWithPagination(
"00000000-0000-0000-0000-000000000001", "interaction-456");

for (LLMObsAnnotatedInteractionEvent item : iterable) {
System.out.println(item);
}
} catch (RuntimeException e) {
System.err.println(
"Exception when calling"
+ " AgentObservabilityApi#getLLMObsAnnotatedInteractionWithPagination");
System.err.println("Reason: " + e.getMessage());
e.printStackTrace();
}
}
}
1 change: 1 addition & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -868,6 +868,7 @@ public class ApiClient {
put("v2.deleteLLMObsProjects", false);
put("v2.deleteLLMObsPrompt", false);
put("v2.exportLLMObsDataset", false);
put("v2.getLLMObsAnnotatedInteraction", false);
put("v2.getLLMObsAnnotatedInteractions", false);
put("v2.getLLMObsAnnotatedInteractionsByTraceIDs", false);
put("v2.getLLMObsAnnotationQueueLabelSchema", false);
Expand Down
Loading
Loading