Skip to content
Merged
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
787 changes: 786 additions & 1 deletion .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions examples/v2/llm-observability/CreateLLMObsAnnotationQueue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Create an LLM Observability annotation queue returns "Created" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.createLLMObsAnnotationQueue"] = true;
const apiInstance = new v2.LLMObservabilityApi(configuration);

const params: v2.LLMObservabilityApiCreateLLMObsAnnotationQueueRequest = {
body: {
data: {
attributes: {
description: "Queue for annotating customer support traces",
name: "My annotation queue",
projectId: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751",
},
type: "queues",
},
},
};

apiInstance
.createLLMObsAnnotationQueue(params)
.then((data: v2.LLMObsAnnotationQueueResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* Add annotation queue interactions returns "Created" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.createLLMObsAnnotationQueueInteractions"] =
true;
const apiInstance = new v2.LLMObservabilityApi(configuration);

const params: v2.LLMObservabilityApiCreateLLMObsAnnotationQueueInteractionsRequest =
{
body: {
data: {
attributes: {
interactions: [
{
contentId: "trace-abc-123",
type: "trace",
},
],
},
type: "interactions",
},
},
queueId: "queue_id",
};

apiInstance
.createLLMObsAnnotationQueueInteractions(params)
.then((data: v2.LLMObsAnnotationQueueInteractionsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
22 changes: 22 additions & 0 deletions examples/v2/llm-observability/DeleteLLMObsAnnotationQueue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Delete an LLM Observability annotation queue returns "No Content" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.deleteLLMObsAnnotationQueue"] = true;
const apiInstance = new v2.LLMObservabilityApi(configuration);

const params: v2.LLMObservabilityApiDeleteLLMObsAnnotationQueueRequest = {
queueId: "queue_id",
};

apiInstance
.deleteLLMObsAnnotationQueue(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* Delete annotation queue interactions returns "No Content" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.deleteLLMObsAnnotationQueueInteractions"] =
true;
const apiInstance = new v2.LLMObservabilityApi(configuration);

const params: v2.LLMObservabilityApiDeleteLLMObsAnnotationQueueInteractionsRequest =
{
body: {
data: {
attributes: {
interactionIds: [
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000001",
],
},
type: "interactions",
},
},
queueId: "queue_id",
};

apiInstance
.deleteLLMObsAnnotationQueueInteractions(params)
.then((data: any) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
22 changes: 22 additions & 0 deletions examples/v2/llm-observability/GetLLMObsAnnotatedInteractions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Get annotated queue interactions returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.getLLMObsAnnotatedInteractions"] = true;
const apiInstance = new v2.LLMObservabilityApi(configuration);

const params: v2.LLMObservabilityApiGetLLMObsAnnotatedInteractionsRequest = {
queueId: "queue_id",
};

apiInstance
.getLLMObsAnnotatedInteractions(params)
.then((data: v2.LLMObsAnnotatedInteractionsResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
18 changes: 18 additions & 0 deletions examples/v2/llm-observability/ListLLMObsAnnotationQueues.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* List LLM Observability annotation queues returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.listLLMObsAnnotationQueues"] = true;
const apiInstance = new v2.LLMObservabilityApi(configuration);

apiInstance
.listLLMObsAnnotationQueues()
.then((data: v2.LLMObsAnnotationQueuesResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
31 changes: 31 additions & 0 deletions examples/v2/llm-observability/UpdateLLMObsAnnotationQueue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Update an LLM Observability annotation queue returns "OK" response
*/

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.updateLLMObsAnnotationQueue"] = true;
const apiInstance = new v2.LLMObservabilityApi(configuration);

const params: v2.LLMObservabilityApiUpdateLLMObsAnnotationQueueRequest = {
body: {
data: {
attributes: {
description: "Updated description",
name: "Updated queue name",
},
type: "queues",
},
},
queueId: "queue_id",
};

apiInstance
.updateLLMObsAnnotationQueue(params)
.then((data: v2.LLMObsAnnotationQueueResponse) => {
console.log(
"API called successfully. Returned data: " + JSON.stringify(data)
);
})
.catch((error: any) => console.error(error));
65 changes: 65 additions & 0 deletions features/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7759,6 +7759,71 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
},
"operationResponseType": "IPAllowlistResponse",
},
"v2.ListLLMObsAnnotationQueues": {
"projectId": {
"type": "string",
"format": "",
},
"queueIds": {
"type": "Array<string>",
"format": "",
},
"operationResponseType": "LLMObsAnnotationQueuesResponse",
},
"v2.CreateLLMObsAnnotationQueue": {
"body": {
"type": "LLMObsAnnotationQueueRequest",
"format": "",
},
"operationResponseType": "LLMObsAnnotationQueueResponse",
},
"v2.DeleteLLMObsAnnotationQueue": {
"queueId": {
"type": "string",
"format": "",
},
"operationResponseType": "{}",
},
"v2.UpdateLLMObsAnnotationQueue": {
"queueId": {
"type": "string",
"format": "",
},
"body": {
"type": "LLMObsAnnotationQueueUpdateRequest",
"format": "",
},
"operationResponseType": "LLMObsAnnotationQueueResponse",
},
"v2.GetLLMObsAnnotatedInteractions": {
"queueId": {
"type": "string",
"format": "",
},
"operationResponseType": "LLMObsAnnotatedInteractionsResponse",
},
"v2.CreateLLMObsAnnotationQueueInteractions": {
"queueId": {
"type": "string",
"format": "",
},
"body": {
"type": "LLMObsAnnotationQueueInteractionsRequest",
"format": "",
},
"operationResponseType": "LLMObsAnnotationQueueInteractionsResponse",
},
"v2.DeleteLLMObsAnnotationQueueInteractions": {
"queueId": {
"type": "string",
"format": "",
},
"body": {
"type": "LLMObsDeleteAnnotationQueueInteractionsRequest",
"format": "",
},
"operationResponseType": "{}",
},
"v2.ListLLMObsExperiments": {
"filterProjectId": {
"type": "string",
Expand Down
Loading
Loading