From 8252bff523d1b63dbcfdbfd7c09ed1ec5611a559 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 21 Jul 2026 14:01:45 +0000 Subject: [PATCH] Regenerate client from commit 8113261 of spec repo --- .generator/schemas/v2/openapi.yaml | 1885 +++++++++++++++-- .../frozen.json | 1 + .../recording.har | 163 ++ .../frozen.json | 1 + .../recording.har | 67 + .../frozen.json | 1 + .../recording.har | 206 ++ .../frozen.json | 1 + .../recording.har | 67 + .../frozen.json | 1 + .../recording.har | 163 ++ .../frozen.json | 1 + .../recording.har | 110 + .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 153 ++ .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 249 +++ .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 153 ++ .../frozen.json | 1 + .../recording.har | 160 ++ .../frozen.json | 1 + .../recording.har | 153 ++ .../frozen.json | 1 + .../recording.har | 67 + .../frozen.json | 1 + .../recording.har | 259 +++ .../frozen.json | 1 + .../recording.har | 163 ++ .../frozen.json | 1 + .../recording.har | 67 + .../frozen.json | 1 + .../recording.har | 163 ++ features/v2/given.json | 28 + features/v2/llm_observability.feature | 200 +- features/v2/undo.json | 68 + .../src/support/scenarios_model_mapping.ts | 87 + services/llm_observability/README.md | 2 +- .../src/v2/LLMObservabilityApi.ts | 1797 +++++++++++++++- services/llm_observability/src/v2/index.ts | 44 + .../src/v2/models/LLMObsCreatePromptData.ts | 57 + .../LLMObsCreatePromptDataAttributes.ts | 97 + .../v2/models/LLMObsCreatePromptRequest.ts | 47 + .../models/LLMObsCreatePromptVersionData.ts | 57 + ...LLMObsCreatePromptVersionDataAttributes.ts | 80 + .../LLMObsCreatePromptVersionRequest.ts | 47 + .../src/v2/models/LLMObsDeletedPromptData.ts | 66 + .../LLMObsDeletedPromptDataAttributes.ts | 55 + .../v2/models/LLMObsDeletedPromptResponse.ts | 47 + .../src/v2/models/LLMObsPromptChatMessage.ts | 54 + .../src/v2/models/LLMObsPromptData.ts | 66 + .../v2/models/LLMObsPromptDataAttributes.ts | 176 ++ .../src/v2/models/LLMObsPromptDataset.ts | 53 + .../src/v2/models/LLMObsPromptResponse.ts | 47 + .../v2/models/LLMObsPromptResponseSource.ts | 11 + .../src/v2/models/LLMObsPromptSDKData.ts | 66 + .../models/LLMObsPromptSDKDataAttributes.ts | 86 + .../src/v2/models/LLMObsPromptSDKResponse.ts | 47 + .../src/v2/models/LLMObsPromptTemplate.ts | 11 + .../src/v2/models/LLMObsPromptType.ts | 7 + .../src/v2/models/LLMObsPromptVersionData.ts | 66 + .../LLMObsPromptVersionDataAttributes.ts | 167 ++ .../src/v2/models/LLMObsPromptVersionLabel.ts | 11 + .../v2/models/LLMObsPromptVersionListData.ts | 66 + .../LLMObsPromptVersionListDataAttributes.ts | 157 ++ .../v2/models/LLMObsPromptVersionResponse.ts | 47 + .../src/v2/models/LLMObsPromptVersionType.ts | 9 + .../v2/models/LLMObsPromptVersionsResponse.ts | 47 + .../src/v2/models/LLMObsPromptsResponse.ts | 47 + .../src/v2/models/LLMObsUpdatePromptData.ts | 57 + .../LLMObsUpdatePromptDataAttributes.ts | 42 + .../v2/models/LLMObsUpdatePromptRequest.ts | 47 + .../models/LLMObsUpdatePromptVersionData.ts | 57 + ...LLMObsUpdatePromptVersionDataAttributes.ts | 52 + .../LLMObsUpdatePromptVersionRequest.ts | 47 + .../src/v2/models/TypingInfo.ts | 68 + 82 files changed, 8501 insertions(+), 327 deletions(-) create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/recording.har create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/frozen.json create mode 100644 cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/recording.har create mode 100644 services/llm_observability/src/v2/models/LLMObsCreatePromptData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsCreatePromptDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsCreatePromptRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsCreatePromptVersionData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsCreatePromptVersionDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsCreatePromptVersionRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsDeletedPromptData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsDeletedPromptDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsDeletedPromptResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptChatMessage.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptDataset.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptResponseSource.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptSDKData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptSDKDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptSDKResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptTemplate.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptType.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionLabel.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionListData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionListDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionType.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptVersionsResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsPromptsResponse.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsUpdatePromptData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsUpdatePromptDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsUpdatePromptRequest.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionData.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionDataAttributes.ts create mode 100644 services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionRequest.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 6c01d9a66b42..bed8d5118405 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1009,6 +1009,32 @@ components: required: true schema: type: string + LLMObsPromptIDPathParameter: + description: The customer-provided identifier of the LLM Observability prompt. + example: "customer-support-assistant" + in: path + name: prompt_id + required: true + schema: + type: string + LLMObsPromptLabelQueryParameter: + description: >- + **Deprecated.** Optional label of the prompt version to return. Do not use this parameter for new integrations. If omitted, the latest version is returned. If the prompt has no labels, the latest version is returned even when a label is requested. If the prompt has labels but none match the requested label, a 404 response is returned. + in: query + name: label + required: false + schema: + type: string + LLMObsPromptVersionPathParameter: + description: The version number of the LLM Observability prompt. + example: 1 + in: path + name: version + required: true + schema: + format: int64 + minimum: 1 + type: integer LinkIDPathParameter: description: "The UUID of the case link." in: path @@ -52073,6 +52099,108 @@ components: $ref: "#/components/schemas/LLMObsContentBlock" minItems: 1 type: array + LLMObsCreatePromptData: + description: Data object for creating an LLM Observability prompt. + properties: + attributes: + $ref: "#/components/schemas/LLMObsCreatePromptDataAttributes" + type: + $ref: "#/components/schemas/LLMObsPromptType" + required: + - type + - attributes + type: object + LLMObsCreatePromptDataAttributes: + description: >- + Attributes for creating an LLM Observability prompt and its first version. `prompt_id` and `template` are required; all other attributes are optional. + properties: + description: + description: Optional description of the prompt. + type: string + env_ids: + description: >- + Optional feature-flag environment UUIDs the service attempts to enable and configure to use the first version as their default after creation. + items: + type: string + type: array + labels: + deprecated: true + description: >- + Optional labels to attach to the first version. Do not use this attribute for new integrations. + items: + $ref: "#/components/schemas/LLMObsPromptVersionLabel" + type: array + prompt_id: + description: Customer-provided identifier for the new prompt. + example: "customer-support-assistant" + minLength: 1 + type: string + template: + $ref: "#/components/schemas/LLMObsPromptTemplate" + title: + description: Optional title of the prompt. + type: string + user_version: + description: Optional user-supplied version identifier for the first version. + type: string + required: + - prompt_id + - template + type: object + LLMObsCreatePromptRequest: + description: Request to create an LLM Observability prompt. + properties: + data: + $ref: "#/components/schemas/LLMObsCreatePromptData" + required: + - data + type: object + LLMObsCreatePromptVersionData: + description: Data object for creating an LLM Observability prompt version. + properties: + attributes: + $ref: "#/components/schemas/LLMObsCreatePromptVersionDataAttributes" + type: + $ref: "#/components/schemas/LLMObsPromptVersionType" + required: + - type + - attributes + type: object + LLMObsCreatePromptVersionDataAttributes: + description: >- + Attributes for creating a new version of an LLM Observability prompt. `template` is required; all other attributes are optional. + properties: + description: + description: Optional description of this version. + type: string + env_ids: + description: >- + Optional feature-flag environment UUIDs the service attempts to enable and configure to use this version as their default after creation. + items: + type: string + type: array + labels: + deprecated: true + description: Optional labels to attach to this version. Do not use this attribute for new integrations. + items: + $ref: "#/components/schemas/LLMObsPromptVersionLabel" + type: array + template: + $ref: "#/components/schemas/LLMObsPromptTemplate" + user_version: + description: Optional user-supplied version identifier for this version. + type: string + required: + - template + type: object + LLMObsCreatePromptVersionRequest: + description: Request to create a new version of an LLM Observability prompt. + properties: + data: + $ref: "#/components/schemas/LLMObsCreatePromptVersionData" + required: + - data + type: object LLMObsCursorMeta: description: Pagination cursor metadata. properties: @@ -53548,6 +53676,53 @@ components: required: - data type: object + LLMObsDeletedPromptData: + description: Data object confirming that an LLM Observability prompt was deleted. + properties: + attributes: + $ref: "#/components/schemas/LLMObsDeletedPromptDataAttributes" + id: + description: Unique identifier of the deleted prompt. + example: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: string + type: + $ref: "#/components/schemas/LLMObsPromptType" + required: + - id + - type + - attributes + type: object + LLMObsDeletedPromptDataAttributes: + description: Attributes confirming that an LLM Observability prompt was deleted. + properties: + deleted_at: + description: Timestamp when the prompt was deleted. + example: "2025-02-10T09:15:00Z" + format: date-time + type: string + prompt_id: + description: Customer-provided identifier of the deleted prompt. + example: "customer-support-assistant" + type: string + required: + - prompt_id + - deleted_at + type: object + LLMObsDeletedPromptResponse: + description: Response confirming that an LLM Observability prompt was deleted. + example: + data: + attributes: + deleted_at: "2025-02-10T09:15:00Z" + prompt_id: "customer-support-assistant" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates + properties: + data: + $ref: "#/components/schemas/LLMObsDeletedPromptData" + required: + - data + type: object LLMObsDisplayBlockAnnotatedInteractionItem: description: A display_block interaction with its associated annotations. properties: @@ -56642,6 +56817,521 @@ components: required: - data type: object + LLMObsPromptChatMessage: + description: A single chat message in a prompt template. + properties: + content: + description: Content of the message. + example: "You are a helpful customer support assistant for {{company_name}}." + type: string + role: + description: Role of the message (for example `system`, `user`, or `assistant`). + example: "system" + type: string + required: + - role + - content + type: object + LLMObsPromptChatTemplate: + description: A chat prompt template. + items: + $ref: "#/components/schemas/LLMObsPromptChatMessage" + minItems: 1 + type: array + x-generate-alias-as-model: true + LLMObsPromptData: + description: Data object for an LLM Observability prompt. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPromptDataAttributes" + id: + description: Unique identifier of the prompt. + example: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: string + type: + $ref: "#/components/schemas/LLMObsPromptType" + required: + - id + - type + - attributes + type: object + LLMObsPromptDataAttributes: + description: Attributes of an LLM Observability prompt registry entry. + properties: + author: + description: UUID of the user who authored the prompt. + type: string + created_at: + description: Timestamp when the prompt was created. + format: date-time + type: string + created_from: + description: >- + Source that created the prompt, such as `ui-registry`, `sdk-registry`, or `sdk-instrumentation`. + example: "sdk-registry" + type: string + datasets: + description: Datasets observed in runs associated with this prompt. + items: + $ref: "#/components/schemas/LLMObsPromptDataset" + type: array + description: + description: Description of the prompt. + type: string + extracted_from: + description: Source prompt from which this prompt was extracted, when applicable. + type: string + in_registry: + description: Whether the prompt is a registry entry (as opposed to a code-discovered prompt). + example: true + type: boolean + last_seen_at: + description: Timestamp of the most recent observed run of this prompt. + format: date-time + type: string + last_version_created_at: + description: Timestamp when the most recent version of the prompt was created. + format: date-time + type: string + ml_app: + description: The ML application this prompt is associated with. + type: string + ml_apps: + description: ML applications observed running this prompt. + items: + type: string + type: array + num_versions: + description: Number of versions of the prompt. + example: 2 + format: int64 + type: integer + prompt_id: + description: Customer-provided identifier of the prompt. + example: "customer-support-assistant" + type: string + source: + $ref: "#/components/schemas/LLMObsPromptResponseSource" + tags: + description: Tags observed on runs of this prompt. + items: + type: string + type: array + title: + description: Title of the prompt. + type: string + required: + - prompt_id + - source + - num_versions + - in_registry + - created_from + type: object + LLMObsPromptDataset: + description: A dataset observed in runs associated with a prompt or prompt version. + properties: + id: + description: Unique identifier of the dataset. + example: "" + type: string + name: + description: Name of the dataset. + type: string + required: + - id + type: object + LLMObsPromptResponse: + description: Response containing a single LLM Observability prompt. + example: + data: + attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-01-15T10:00:00Z" + created_from: "sdk-registry" + description: "Answers customer questions using the company knowledge base." + in_registry: true + last_version_created_at: "2025-01-15T10:00:00Z" + num_versions: 1 + prompt_id: "customer-support-assistant" + source: registry + title: "Customer Support Assistant" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates + properties: + data: + $ref: "#/components/schemas/LLMObsPromptData" + required: + - data + type: object + LLMObsPromptResponseSource: + description: Whether the prompt was created from the registry or discovered from observed LLM calls. + enum: + - registry + - code + example: registry + type: string + x-enum-varnames: + - REGISTRY + - CODE + LLMObsPromptSDKData: + description: Data object for a flattened LLM Observability prompt version returned for SDK consumption. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPromptSDKDataAttributes" + id: + description: Unique identifier of the prompt. + example: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: string + type: + $ref: "#/components/schemas/LLMObsPromptType" + required: + - id + - type + - attributes + type: object + LLMObsPromptSDKDataAttributes: + description: >- + Attributes of a flattened prompt version returned for SDK consumption. Exactly one of `template` and `chat_template` is returned. + properties: + chat_template: + description: >- + Chat template for this prompt version, as a list of role and content messages. Omitted for text templates. + items: + $ref: "#/components/schemas/LLMObsPromptChatMessage" + type: array + labels: + deprecated: true + description: Labels attached to the selected version. + items: + type: string + type: array + prompt_id: + description: Customer-provided identifier of the prompt. + example: "customer-support-assistant" + type: string + prompt_version_uuid: + description: Unique identifier of this prompt version. + example: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: string + template: + description: Text template for this prompt version. Omitted for chat templates. + type: string + version: + description: >- + Version identifier for this prompt version. This is the sequential version number unless a user-supplied version identifier was set, in which case that identifier is used instead. + example: "2" + type: string + type: object + LLMObsPromptSDKResponse: + description: Response containing a flattened LLM Observability prompt version for SDK consumption. + example: + data: + attributes: + chat_template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + prompt_id: "customer-support-assistant" + prompt_version_uuid: "d83ab666-61cc-5545-a83b-2424bb85467b" + version: "2" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates + properties: + data: + $ref: "#/components/schemas/LLMObsPromptSDKData" + required: + - data + type: object + LLMObsPromptTemplate: + description: A text template or a list of chat messages. + example: "You are a helpful assistant for {{audience}}." + oneOf: + - $ref: "#/components/schemas/LLMObsPromptTextTemplate" + - $ref: "#/components/schemas/LLMObsPromptChatTemplate" + LLMObsPromptTextTemplate: + description: A text prompt template. + minLength: 1 + pattern: ".*\\S.*" + type: string + LLMObsPromptType: + description: Resource type of an LLM Observability prompt. + enum: + - prompt-templates + example: prompt-templates + type: string + x-enum-varnames: + - PROMPT_TEMPLATES + LLMObsPromptVersionData: + description: Data object for a specific version of an LLM Observability prompt. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPromptVersionDataAttributes" + id: + description: Unique identifier of the prompt version. + example: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: string + type: + $ref: "#/components/schemas/LLMObsPromptVersionType" + required: + - id + - type + - attributes + type: object + LLMObsPromptVersionDataAttributes: + description: Attributes of a specific version of an LLM Observability prompt. + properties: + author: + description: UUID of the user who authored this version. + type: string + created_at: + description: Timestamp stored on this prompt version. + format: date-time + type: string + datasets: + description: Datasets observed in runs associated with this prompt version. + items: + $ref: "#/components/schemas/LLMObsPromptDataset" + type: array + description: + description: Description of this version. + type: string + labels: + deprecated: true + description: Labels attached to this version (for example `development`, `staging`, `production`). + items: + type: string + type: array + last_seen_at: + description: Timestamp of the most recent observed run of this prompt version. + format: date-time + type: string + ml_app: + description: The ML application this prompt is associated with. + type: string + ml_apps: + description: ML applications observed running this prompt version. + items: + type: string + type: array + prompt_id: + description: Customer-provided identifier of the parent prompt. + example: "customer-support-assistant" + type: string + prompt_uuid: + description: Unique identifier of the parent prompt. + example: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: string + tags: + description: Tags observed on runs of this prompt version. + items: + type: string + type: array + template: + $ref: "#/components/schemas/LLMObsPromptTemplate" + user_version: + description: User-supplied identifier for this version. + type: string + version: + description: Sequential version number. + example: 1 + format: int64 + minimum: 1 + type: integer + version_created_at: + description: Timestamp when this version was created. + format: date-time + type: string + required: + - prompt_uuid + - prompt_id + - template + - version + type: object + LLMObsPromptVersionLabel: + description: A label attached to an LLM Observability prompt version. + enum: + - production + - development + type: string + x-enum-varnames: + - PRODUCTION + - DEVELOPMENT + LLMObsPromptVersionListData: + description: Data object for a prompt version returned in a list. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPromptVersionListDataAttributes" + id: + description: Unique identifier of the prompt version. + example: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: string + type: + $ref: "#/components/schemas/LLMObsPromptVersionType" + required: + - id + - type + - attributes + type: object + LLMObsPromptVersionListDataAttributes: + description: Attributes of a prompt version returned in a list, excluding its template. + properties: + author: + description: UUID of the user who authored this version. + type: string + created_at: + description: Timestamp stored on this prompt version. + format: date-time + type: string + datasets: + description: Datasets observed in runs associated with this prompt version. + items: + $ref: "#/components/schemas/LLMObsPromptDataset" + type: array + description: + description: Description of this version. + type: string + labels: + deprecated: true + description: Labels attached to this version (for example `development`, `staging`, `production`). + items: + type: string + type: array + last_seen_at: + description: Timestamp of the most recent observed run of this prompt version. + format: date-time + type: string + ml_app: + description: The ML application this prompt is associated with. + type: string + ml_apps: + description: ML applications observed running this prompt version. + items: + type: string + type: array + prompt_id: + description: Customer-provided identifier of the parent prompt. + example: "customer-support-assistant" + type: string + prompt_uuid: + description: Unique identifier of the parent prompt. + example: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: string + tags: + description: Tags observed on runs of this prompt version. + items: + type: string + type: array + user_version: + description: User-supplied identifier for this version. + type: string + version: + description: Sequential version number. + example: 1 + format: int64 + minimum: 1 + type: integer + version_created_at: + description: Timestamp when this version was created. + format: date-time + type: string + required: + - prompt_uuid + - prompt_id + - version + type: object + LLMObsPromptVersionResponse: + description: Response containing a specific version of an LLM Observability prompt. + example: + data: + attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-02-01T14:30:00Z" + description: "Give concise answers and cite relevant help-center articles." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + version: 2 + version_created_at: "2025-02-01T14:30:00Z" + id: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: prompt-template-versions + properties: + data: + $ref: "#/components/schemas/LLMObsPromptVersionData" + required: + - data + type: object + LLMObsPromptVersionType: + description: Resource type of an LLM Observability prompt version. + enum: + - prompt-template-versions + example: prompt-template-versions + type: string + x-enum-varnames: + - PROMPT_TEMPLATE_VERSIONS + LLMObsPromptVersionsResponse: + description: Response containing the versions of an LLM Observability prompt. + example: + data: + - attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-02-01T14:30:00Z" + description: "Give concise answers and cite relevant help-center articles." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + version: 2 + version_created_at: "2025-02-01T14:30:00Z" + id: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: prompt-template-versions + - attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-01-15T10:00:00Z" + description: "Initial customer support prompt." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + version: 1 + version_created_at: "2025-01-15T10:00:00Z" + id: "20e5280b-c75d-5699-8a70-a2773a751428" + type: prompt-template-versions + properties: + data: + description: Prompt versions ordered from newest to oldest. + items: + $ref: "#/components/schemas/LLMObsPromptVersionListData" + type: array + required: + - data + type: object + LLMObsPromptsResponse: + description: Response containing a list of LLM Observability prompts. + example: + data: + - attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-01-15T10:00:00Z" + created_from: "sdk-registry" + description: "Answers customer questions using the company knowledge base." + in_registry: true + last_version_created_at: "2025-02-01T14:30:00Z" + num_versions: 2 + prompt_id: "customer-support-assistant" + source: registry + title: "Customer Support Assistant" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates + properties: + data: + description: List of LLM Observability prompts. + items: + $ref: "#/components/schemas/LLMObsPromptData" + type: array + required: + - data + type: object LLMObsRecordType: description: Resource type of LLM Observability dataset records. enum: @@ -57135,6 +57825,79 @@ components: - TRACE - EXPERIMENT_TRACE - SESSION + LLMObsUpdatePromptData: + description: Data object for updating an LLM Observability prompt. + properties: + attributes: + $ref: "#/components/schemas/LLMObsUpdatePromptDataAttributes" + type: + $ref: "#/components/schemas/LLMObsPromptType" + required: + - type + - attributes + type: object + LLMObsUpdatePromptDataAttributes: + additionalProperties: false + description: >- + Attributes for updating an LLM Observability prompt. At least one of `title` or `description` must be provided; both attributes are optional individually. + minProperties: 1 + properties: + description: + description: Optional new description for the prompt. + type: string + title: + description: Optional new title for the prompt. + type: string + type: object + LLMObsUpdatePromptRequest: + description: Request to update an LLM Observability prompt's metadata. + properties: + data: + $ref: "#/components/schemas/LLMObsUpdatePromptData" + required: + - data + type: object + LLMObsUpdatePromptVersionData: + description: Data object for updating an LLM Observability prompt version. + properties: + attributes: + $ref: "#/components/schemas/LLMObsUpdatePromptVersionDataAttributes" + type: + $ref: "#/components/schemas/LLMObsPromptVersionType" + required: + - type + - attributes + type: object + LLMObsUpdatePromptVersionDataAttributes: + additionalProperties: false + description: >- + Attributes for updating an LLM Observability prompt version. At least one of `description`, `labels`, or `env_ids` must be provided; all three attributes are optional individually. + minProperties: 1 + properties: + description: + description: Optional new description for this version. + type: string + env_ids: + description: >- + Optional feature-flag environment UUIDs the service attempts to enable and configure to use this version as their default. + items: + type: string + type: array + labels: + deprecated: true + description: Optional new labels for this version. Do not use this attribute for new integrations. + items: + $ref: "#/components/schemas/LLMObsPromptVersionLabel" + type: array + type: object + LLMObsUpdatePromptVersionRequest: + description: Request to update an LLM Observability prompt version's metadata or feature-flag environments. + properties: + data: + $ref: "#/components/schemas/LLMObsUpdatePromptVersionData" + required: + - data + type: object LLMObsUpsertAnnotationItem: description: |- A single annotation to create or update. The annotation is matched by @@ -151608,18 +152371,700 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Push events for an LLM Observability experiment + summary: Push events for an LLM Observability experiment + tags: + - LLM Observability + 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/integrations/{integration}/accounts: + get: + description: Retrieve the list of configured accounts for the specified LLM provider integration. + operationId: ListLLMObsIntegrationAccounts + parameters: + - $ref: "#/components/parameters/LLMObsIntegrationPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + - account_id: "org-XYZ123" + account_name: "Production OpenAI" + account_region: "" + id: "account-abc123" + integration: "openai" + schema: + items: + $ref: "#/components/schemas/LLMObsIntegrationAccount" + type: array + 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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM integration accounts + tags: + - LLM Observability + 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/integrations/{integration}/{account_id}/inference: + post: + description: Run an LLM inference request through the specified integration and account, returning the model response and token usage. + operationId: CreateLLMObsIntegrationInference + parameters: + - $ref: "#/components/parameters/LLMObsIntegrationPathParameter" + - $ref: "#/components/parameters/LLMObsAccountIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + max_tokens: 256 + messages: + - content: "What is the capital of France?" + role: "user" + model_id: "gpt-4o" + temperature: 0.7 + schema: + $ref: "#/components/schemas/LLMObsIntegrationInferenceRequest" + description: Inference request parameters. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + max_tokens: 256 + messages: + - content: "What is the capital of France?" + role: "user" + model_id: "gpt-4o" + response: + assessment: "pass" + content: "The capital of France is Paris." + finish_reason: "stop" + inference_codes: [] + input_tokens: 15 + latency: 843 + output_tokens: 9 + tools: [] + total_tokens: 24 + temperature: 0.7 + schema: + $ref: "#/components/schemas/LLMObsIntegrationInferenceResponse" + 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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Run an LLM inference + tags: + - LLM Observability + 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/integrations/{integration}/{account_id}/models: + get: + description: Retrieve the list of models available for the specified LLM provider integration and account. + operationId: ListLLMObsIntegrationModels + parameters: + - $ref: "#/components/parameters/LLMObsIntegrationPathParameter" + - $ref: "#/components/parameters/LLMObsAccountIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + - has_access: true + id: "gpt-4o" + integration: "openai" + integration_display_name: "OpenAI" + json_schema: true + model_display_name: "GPT-4o" + model_id: "gpt-4o" + provider: "openai" + provider_display_name: "OpenAI" + schema: + items: + $ref: "#/components/schemas/LLMObsIntegrationModel" + type: array + 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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM integration models + tags: + - LLM Observability + 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/projects: + get: + description: List all LLM Observability projects sorted by creation date, newest first. + operationId: ListLLMObsProjects + parameters: + - description: Filter projects by project ID. + in: query + name: filter[id] + schema: + type: string + - description: Filter projects by name. + in: query + name: filter[name] + schema: + type: string + - description: Use the Pagination cursor to retrieve the next page of results. + in: query + name: page[cursor] + schema: + type: string + - description: Maximum number of results to return per page. + in: query + name: page[limit] + schema: + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: "" + name: My LLM Project + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000001 + type: projects + schema: + $ref: "#/components/schemas/LLMObsProjectsResponse" + 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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM Observability projects + tags: + - LLM Observability + 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/). + post: + description: Create a new LLM Observability project. Returns the existing project if a name conflict occurs. + operationId: CreateLLMObsProject + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + name: My LLM Project + type: projects + schema: + $ref: "#/components/schemas/LLMObsProjectRequest" + description: Create project payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: "" + name: My LLM Project + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000002 + type: projects + schema: + $ref: "#/components/schemas/LLMObsProjectResponse" + description: OK + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: "" + name: My LLM Project + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000003 + type: projects + schema: + $ref: "#/components/schemas/LLMObsProjectResponse" + description: Created + "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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create an LLM Observability project + tags: + - LLM Observability + 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/projects/delete: + post: + description: Delete one or more LLM Observability projects. + operationId: DeleteLLMObsProjects + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + project_ids: + - a33671aa-24fd-4dcd-9b33-a8ec7dde7751 + type: projects + schema: + $ref: "#/components/schemas/LLMObsDeleteProjectsRequest" + description: Delete projects payload. + required: true + responses: + "204": + description: No Content + "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 + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete LLM Observability projects + tags: + - LLM Observability + 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/projects/{project_id}: + patch: + description: Partially update an existing LLM Observability project. + operationId: UpdateLLMObsProject + parameters: + - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + type: projects + schema: + $ref: "#/components/schemas/LLMObsProjectUpdateRequest" + description: Update project payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00+00:00" + description: "" + name: My LLM Project + updated_at: "2024-01-01T00:00:00+00:00" + id: 00000000-0000-0000-0000-000000000004 + type: projects + schema: + $ref: "#/components/schemas/LLMObsProjectResponse" + 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: Update an LLM Observability project + tags: + - LLM Observability + 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/prompts: + get: + description: List all LLM Observability prompts in the prompt registry for the organization. + operationId: ListLLMObsPrompts + parameters: + - description: Optional filter for prompts by prompt ID. + example: "customer-support-assistant" + in: query + name: filter[prompt_id] + schema: + type: string + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + - attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-01-15T10:00:00Z" + created_from: "sdk-registry" + description: "Answers customer questions using the company knowledge base." + in_registry: true + last_version_created_at: "2025-02-01T14:30:00Z" + num_versions: 2 + prompt_id: "customer-support-assistant" + source: registry + title: "Customer Support Assistant" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates + schema: + $ref: "#/components/schemas/LLMObsPromptsResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List LLM Observability prompts + tags: + - LLM Observability + x-permission: + operator: OR + permissions: + - llm_observability_read + 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/). + post: + description: Create a new prompt (and its first version) in the LLM Observability prompt registry. + operationId: CreateLLMObsPrompt + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + description: "Answers customer questions using the company knowledge base." + prompt_id: "customer-support-assistant" + template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + title: "Customer Support Assistant" + type: prompt-templates + schema: + $ref: "#/components/schemas/LLMObsCreatePromptRequest" + description: Create prompt payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-01-15T10:00:00Z" + created_from: "sdk-registry" + description: "Answers customer questions using the company knowledge base." + in_registry: true + last_version_created_at: "2025-01-15T10:00:00Z" + num_versions: 1 + prompt_id: "customer-support-assistant" + source: registry + title: "Customer Support Assistant" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates + schema: + $ref: "#/components/schemas/LLMObsPromptResponse" + 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 + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create an LLM Observability prompt + tags: + - LLM Observability + x-permission: + operator: AND + permissions: + - llm_observability_read + - llm_observability_write + - feature_flag_config_read + - feature_flag_config_write + - feature_flag_environment_config_read + 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/prompts/{prompt_id}: + delete: + description: >- + Soft-delete an LLM Observability prompt. The prompt's version rows are retained, but they are no longer accessible through the public prompt registry endpoints. + operationId: DeleteLLMObsPrompt + parameters: + - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + deleted_at: "2025-02-10T09:15:00Z" + prompt_id: "customer-support-assistant" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates + schema: + $ref: "#/components/schemas/LLMObsDeletedPromptResponse" + description: OK + "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: Delete an LLM Observability prompt tags: - LLM Observability + x-permission: + operator: AND + permissions: + - llm_observability_read + - llm_observability_write + - feature_flag_config_read + - feature_flag_config_write + - feature_flag_environment_config_read 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/integrations/{integration}/accounts: get: - description: Retrieve the list of configured accounts for the specified LLM provider integration. - operationId: ListLLMObsIntegrationAccounts + description: Get the latest version of an LLM Observability prompt by prompt ID. + operationId: GetLLMObsPrompt parameters: - - $ref: "#/components/parameters/LLMObsIntegrationPathParameter" + - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" + - $ref: "#/components/parameters/LLMObsPromptLabelQueryParameter" responses: "200": content: @@ -151627,22 +153072,21 @@ paths: examples: default: value: - - account_id: "org-XYZ123" - account_name: "Production OpenAI" - account_region: "" - id: "account-abc123" - integration: "openai" + data: + attributes: + chat_template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + prompt_id: "customer-support-assistant" + prompt_version_uuid: "d83ab666-61cc-5545-a83b-2424bb85467b" + version: "2" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates schema: - items: - $ref: "#/components/schemas/LLMObsIntegrationAccount" - type: array + $ref: "#/components/schemas/LLMObsPromptSDKResponse" description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request "401": content: application/json: @@ -151655,39 +153099,46 @@ paths: 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: List LLM integration accounts + summary: Get an LLM Observability prompt tags: - LLM Observability + x-permission: + operator: OR + permissions: + - llm_observability_read x-unstable: |- - **Note**: This endpoint is in Preview and is subject to change. + **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/integrations/{integration}/{account_id}/inference: - post: - description: Run an LLM inference request through the specified integration and account, returning the model response and token usage. - operationId: CreateLLMObsIntegrationInference + patch: + description: Update the title, the description, or both, for an LLM Observability prompt. + operationId: UpdateLLMObsPrompt parameters: - - $ref: "#/components/parameters/LLMObsIntegrationPathParameter" - - $ref: "#/components/parameters/LLMObsAccountIDPathParameter" + - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" requestBody: content: application/json: examples: default: value: - max_tokens: 256 - messages: - - content: "What is the capital of France?" - role: "user" - model_id: "gpt-4o" - temperature: 0.7 + data: + attributes: + description: "Answers customer questions using the company knowledge base." + title: "Customer Support Assistant" + type: prompt-templates schema: - $ref: "#/components/schemas/LLMObsIntegrationInferenceRequest" - description: Inference request parameters. + $ref: "#/components/schemas/LLMObsUpdatePromptRequest" + description: Update prompt payload. required: true responses: "200": @@ -151696,24 +153147,22 @@ paths: examples: default: value: - max_tokens: 256 - messages: - - content: "What is the capital of France?" - role: "user" - model_id: "gpt-4o" - response: - assessment: "pass" - content: "The capital of France is Paris." - finish_reason: "stop" - inference_codes: [] - input_tokens: 15 - latency: 843 - output_tokens: 9 - tools: [] - total_tokens: 24 - temperature: 0.7 + data: + attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-01-15T10:00:00Z" + created_from: "sdk-registry" + description: "Answers customer questions using the company knowledge base." + in_registry: true + last_version_created_at: "2025-01-15T10:00:00Z" + num_versions: 1 + prompt_id: "customer-support-assistant" + source: registry + title: "Customer Support Assistant" + id: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + type: prompt-templates schema: - $ref: "#/components/schemas/LLMObsIntegrationInferenceResponse" + $ref: "#/components/schemas/LLMObsPromptResponse" description: OK "400": content: @@ -151733,106 +153182,38 @@ paths: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - "500": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Internal Server Error - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Run an LLM inference - tags: - - LLM Observability - 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/integrations/{integration}/{account_id}/models: - get: - description: Retrieve the list of models available for the specified LLM provider integration and account. - operationId: ListLLMObsIntegrationModels - parameters: - - $ref: "#/components/parameters/LLMObsIntegrationPathParameter" - - $ref: "#/components/parameters/LLMObsAccountIDPathParameter" - responses: - "200": - content: - application/json: - examples: - default: - value: - - has_access: true - id: "gpt-4o" - integration: "openai" - integration_display_name: "OpenAI" - json_schema: true - model_display_name: "GPT-4o" - model_id: "gpt-4o" - provider: "openai" - provider_display_name: "OpenAI" - schema: - items: - $ref: "#/components/schemas/LLMObsIntegrationModel" - type: array - 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": + "404": content: application/json: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden + description: Not Found "429": $ref: "#/components/responses/TooManyRequestsResponse" security: - apiKeyAuth: [] appKeyAuth: [] - summary: List LLM integration models + summary: Update an LLM Observability prompt tags: - LLM Observability + x-permission: + operator: AND + permissions: + - llm_observability_read + - llm_observability_write + - feature_flag_config_read + - feature_flag_config_write + - feature_flag_environment_config_read x-unstable: |- - **Note**: This endpoint is in Preview and is subject to change. + **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/projects: + /api/v2/llm-obs/v1/prompts/{prompt_id}/versions: get: - description: List all LLM Observability projects sorted by creation date, newest first. - operationId: ListLLMObsProjects + description: >- + List all versions of an LLM Observability prompt, ordered newest to oldest. If the prompt does not exist, is not registered, or is archived, the response contains an empty list. + operationId: ListLLMObsPromptVersions parameters: - - description: Filter projects by project ID. - in: query - name: filter[id] - schema: - type: string - - description: Filter projects by name. - in: query - name: filter[name] - schema: - type: string - - description: Use the Pagination cursor to retrieve the next page of results. - in: query - name: page[cursor] - schema: - type: string - - description: Maximum number of results to return per page. - in: query - name: page[limit] - schema: - format: int64 - type: integer + - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" responses: "200": content: @@ -151842,21 +153223,28 @@ paths: value: data: - attributes: - created_at: "2024-01-01T00:00:00+00:00" - description: "" - name: My LLM Project - updated_at: "2024-01-01T00:00:00+00:00" - id: 00000000-0000-0000-0000-000000000001 - type: projects + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-02-01T14:30:00Z" + description: "Give concise answers and cite relevant help-center articles." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + version: 2 + version_created_at: "2025-02-01T14:30:00Z" + id: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: prompt-template-versions + - attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-01-15T10:00:00Z" + description: "Initial customer support prompt." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + version: 1 + version_created_at: "2025-01-15T10:00:00Z" + id: "20e5280b-c75d-5699-8a70-a2773a751428" + type: prompt-template-versions schema: - $ref: "#/components/schemas/LLMObsProjectsResponse" + $ref: "#/components/schemas/LLMObsPromptVersionsResponse" description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Bad Request "401": content: application/json: @@ -151874,15 +153262,21 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: List LLM Observability projects + summary: List versions of an LLM Observability prompt tags: - LLM Observability + x-permission: + operator: OR + permissions: + - llm_observability_read 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/). post: - description: Create a new LLM Observability project. Returns the existing project if a name conflict occurs. - operationId: CreateLLMObsProject + description: Create a new version of an existing LLM Observability prompt. + operationId: CreateLLMObsPromptVersion + parameters: + - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" requestBody: content: application/json: @@ -151891,11 +153285,16 @@ paths: value: data: attributes: - name: My LLM Project - type: projects + description: "Give concise answers and cite relevant help-center articles." + template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + type: prompt-template-versions schema: - $ref: "#/components/schemas/LLMObsProjectRequest" - description: Create project payload. + $ref: "#/components/schemas/LLMObsCreatePromptVersionRequest" + description: Create prompt version payload. required: true responses: "200": @@ -151906,32 +153305,23 @@ paths: value: data: attributes: - created_at: "2024-01-01T00:00:00+00:00" - description: "" - name: My LLM Project - updated_at: "2024-01-01T00:00:00+00:00" - id: 00000000-0000-0000-0000-000000000002 - type: projects + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-02-01T14:30:00Z" + description: "Give concise answers and cite relevant help-center articles." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + version: 2 + version_created_at: "2025-02-01T14:30:00Z" + id: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: prompt-template-versions schema: - $ref: "#/components/schemas/LLMObsProjectResponse" + $ref: "#/components/schemas/LLMObsPromptVersionResponse" description: OK - "201": - content: - application/json: - examples: - default: - value: - data: - attributes: - created_at: "2024-01-01T00:00:00+00:00" - description: "" - name: My LLM Project - updated_at: "2024-01-01T00:00:00+00:00" - id: 00000000-0000-0000-0000-000000000003 - type: projects - schema: - $ref: "#/components/schemas/LLMObsProjectResponse" - description: Created "400": content: application/json: @@ -151950,39 +153340,64 @@ paths: 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: Create an LLM Observability project + summary: Create a new LLM Observability prompt version tags: - LLM Observability + x-permission: + operator: AND + permissions: + - llm_observability_read + - llm_observability_write + - feature_flag_config_read + - feature_flag_config_write + - feature_flag_environment_config_read 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/projects/delete: - post: - description: Delete one or more LLM Observability projects. - operationId: DeleteLLMObsProjects - requestBody: - content: - application/json: - examples: - default: - value: - data: - attributes: - project_ids: - - a33671aa-24fd-4dcd-9b33-a8ec7dde7751 - type: projects - schema: - $ref: "#/components/schemas/LLMObsDeleteProjectsRequest" - description: Delete projects payload. - required: true + /api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}: + get: + description: Get the full template of a single, specific version of an LLM Observability prompt. + operationId: GetLLMObsPromptVersion + parameters: + - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" + - $ref: "#/components/parameters/LLMObsPromptVersionPathParameter" responses: - "204": - description: No Content + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-02-01T14:30:00Z" + description: "Give concise answers and cite relevant help-center articles." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + version: 2 + version_created_at: "2025-02-01T14:30:00Z" + id: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: prompt-template-versions + schema: + $ref: "#/components/schemas/LLMObsPromptVersionResponse" + description: OK "400": content: application/json: @@ -152001,23 +153416,34 @@ paths: 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: Delete LLM Observability projects + summary: Get a specific LLM Observability prompt version tags: - LLM Observability + x-permission: + operator: OR + permissions: + - llm_observability_read 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/projects/{project_id}: patch: - description: Partially update an existing LLM Observability project. - operationId: UpdateLLMObsProject + description: >- + Update the description, the feature-flag environments, or both, for a specific version of an LLM Observability prompt. + operationId: UpdateLLMObsPromptVersion parameters: - - $ref: "#/components/parameters/LLMObsProjectIDPathParameter" + - $ref: "#/components/parameters/LLMObsPromptIDPathParameter" + - $ref: "#/components/parameters/LLMObsPromptVersionPathParameter" requestBody: content: application/json: @@ -152025,10 +153451,12 @@ paths: default: value: data: - type: projects + attributes: + description: "Give concise answers and cite relevant help-center articles." + type: prompt-template-versions schema: - $ref: "#/components/schemas/LLMObsProjectUpdateRequest" - description: Update project payload. + $ref: "#/components/schemas/LLMObsUpdatePromptVersionRequest" + description: Update prompt version payload. required: true responses: "200": @@ -152039,14 +153467,22 @@ paths: value: data: attributes: - created_at: "2024-01-01T00:00:00+00:00" - description: "" - name: My LLM Project - updated_at: "2024-01-01T00:00:00+00:00" - id: 00000000-0000-0000-0000-000000000004 - type: projects + author: "3b12f1df-14fd-4e12-bd6f-4a2f5c8b3d1e" + created_at: "2025-02-01T14:30:00Z" + description: "Give concise answers and cite relevant help-center articles." + prompt_id: "customer-support-assistant" + prompt_uuid: "4a1a28ff-8a25-5f0f-946f-f48264d772eb" + template: + - content: "You are a helpful customer support assistant for {{company_name}}." + role: "system" + - content: "Help {{customer_name}} with this question: {{question}}" + role: "user" + version: 2 + version_created_at: "2025-02-01T14:30:00Z" + id: "d83ab666-61cc-5545-a83b-2424bb85467b" + type: prompt-template-versions schema: - $ref: "#/components/schemas/LLMObsProjectResponse" + $ref: "#/components/schemas/LLMObsPromptVersionResponse" description: OK "400": content: @@ -152077,9 +153513,17 @@ paths: security: - apiKeyAuth: [] appKeyAuth: [] - summary: Update an LLM Observability project + summary: Update a specific LLM Observability prompt version tags: - LLM Observability + x-permission: + operator: AND + permissions: + - llm_observability_read + - llm_observability_write + - feature_flag_config_read + - feature_flag_config_write + - feature_flag_environment_config_read 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/). @@ -202449,7 +203893,8 @@ tags: description: Find out more at url: "https://docs.datadoghq.com/account_management/api-app-keys/" name: Key Management - - description: Manage LLM Observability spans, data, projects, datasets, dataset records, experiments, and annotations. + - description: >- + Manage LLM Observability spans, data, projects, datasets, dataset records, experiments, prompts, and annotations. name: LLM Observability - description: |- Search your logs and send them to your Datadog platform over HTTP. See the [Log Management page](https://docs.datadoghq.com/logs/) for more information. diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/frozen.json new file mode 100644 index 000000000000..5c2ef7f37b16 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/frozen.json @@ -0,0 +1 @@ +"2026-07-20T10:28:03.829Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/recording.har b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/recording.har new file mode 100644 index 000000000000..717009d5a417 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Bad-Request-response_906187244/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "LLM Observability/Create a new LLM Observability prompt version returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "90f27a31290053448bcc0e54a8c53bc4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 203, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response-1784543283\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 439, + "content": { + "mimeType": "application/vnd.api+json", + "size": 439, + "text": "{\"data\":{\"id\":\"9c67c0e2-0806-589b-8e8c-83ab2e6f76e3\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T10:28:04.139526235Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T10:28:04.139526235Z\",\"num_versions\":1,\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response-1784543283\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T10:28:03.835Z", + "time": 890 + }, + { + "_id": "a29b15a20dfadcd15224d0a44aa89a9d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 74, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 696, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"template\":\" \"},\"type\":\"prompt-template-versions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response-1784543283/versions" + }, + "response": { + "bodySize": 73, + "content": { + "mimeType": "application/vnd.api+json", + "size": 73, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid prompt template\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2026-07-20T10:28:04.734Z", + "time": 300 + }, + { + "_id": "79ed63f731f4a945ee25f3674b36e849", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 630, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response-1784543283" + }, + "response": { + "bodySize": 243, + "content": { + "mimeType": "application/vnd.api+json", + "size": 243, + "text": "{\"data\":{\"id\":\"9c67c0e2-0806-589b-8e8c-83ab2e6f76e3\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T10:28:05.328346Z\",\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response-1784543283\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T10:28:05.041Z", + "time": 314 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/frozen.json new file mode 100644 index 000000000000..d60f67adaf00 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:19:57.708Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/recording.har b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/recording.har new file mode 100644 index 000000000000..b20e8c7164b3 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-Not-Found-response_489608523/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "LLM Observability/Create a new LLM Observability prompt version returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "266e03cb541af896d7f3729307c6eb4f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 134, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 625, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"env_ids\":[],\"labels\":[],\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}]},\"type\":\"prompt-template-versions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/nonexistent-prompt/versions" + }, + "response": { + "bodySize": 75, + "content": { + "mimeType": "application/vnd.api+json", + "size": 75, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-07-20T09:19:57.709Z", + "time": 357 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/frozen.json new file mode 100644 index 000000000000..cb306453bd31 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/frozen.json @@ -0,0 +1 @@ +"2026-07-21T12:32:24.134Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/recording.har b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/recording.har new file mode 100644 index 000000000000..36fe252174b1 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-a-new-LLM-Observability-prompt-version-returns-OK-response_3704664978/recording.har @@ -0,0 +1,206 @@ +{ + "log": { + "_recordingName": "LLM Observability/Create a new LLM Observability prompt version returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "a0a5be85036d3ee0c8ec170c6b58ef23", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 194, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 430, + "content": { + "mimeType": "application/vnd.api+json", + "size": 430, + "text": "{\"data\":{\"id\":\"c0077820-d57d-54d6-be0c-b62e4e827e67\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-21T12:32:24.497241896Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-21T12:32:24.497241896Z\",\"num_versions\":1,\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-21T12:32:24.141Z", + "time": 805 + }, + { + "_id": "bb55711adf4f29c5853c73a10461137f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 247, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 688, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"template\":[{\"content\":\"You are a concise customer support assistant for {{company_name}}.\",\"role\":\"system\"},{\"content\":\"Answer {{customer_name}}'s question: {{question}}\",\"role\":\"user\"}]},\"type\":\"prompt-template-versions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144/versions" + }, + "response": { + "bodySize": 600, + "content": { + "mimeType": "application/vnd.api+json", + "size": 600, + "text": "{\"data\":{\"id\":\"a002055b-7e0f-501d-ba5b-45df41fbca73\",\"type\":\"prompt-template-versions\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-21T12:32:25.272760959Z\",\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144\",\"prompt_uuid\":\"c0077820-d57d-54d6-be0c-b62e4e827e67\",\"template\":[{\"content\":\"You are a concise customer support assistant for {{company_name}}.\",\"role\":\"system\"},{\"content\":\"Answer {{customer_name}}'s question: {{question}}\",\"role\":\"user\"}],\"version\":2,\"version_created_at\":\"2026-07-21T12:32:25.272760959Z\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-21T12:32:24.955Z", + "time": 520 + }, + { + "_id": "76197a3d10e27eec0654703da8857585", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144" + }, + "response": { + "bodySize": 234, + "content": { + "mimeType": "application/vnd.api+json", + "size": 234, + "text": "{\"data\":{\"id\":\"c0077820-d57d-54d6-be0c-b62e4e827e67\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-21T12:32:25.768356Z\",\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-21T12:32:25.480Z", + "time": 299 + }, + { + "_id": "76197a3d10e27eec0654703da8857585", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 621, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144" + }, + "response": { + "bodySize": 234, + "content": { + "mimeType": "application/vnd.api+json", + "size": 234, + "text": "{\"data\":{\"id\":\"c0077820-d57d-54d6-be0c-b62e4e827e67\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-21T12:32:26.168974Z\",\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784637144\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-21T12:32:25.783Z", + "time": 399 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/frozen.json new file mode 100644 index 000000000000..7f18a93bb5af --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/frozen.json @@ -0,0 +1 @@ +"2026-07-20T10:28:19.611Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/recording.har b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/recording.har new file mode 100644 index 000000000000..affde8c93a4c --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Bad-Request-response_3711195748/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "LLM Observability/Create an LLM Observability prompt returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "b9aa0cdd01ec92ea001e2eed81de780e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 160, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_Bad_Request_response-1784543299\",\"template\":\" \"},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 73, + "content": { + "mimeType": "application/vnd.api+json", + "size": 73, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid prompt template\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2026-07-20T10:28:19.616Z", + "time": 375 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/frozen.json new file mode 100644 index 000000000000..54aeb1ec580c --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:19:59.888Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/recording.har b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/recording.har new file mode 100644 index 000000000000..988d98a7afc9 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-Conflict-response_3813120858/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "LLM Observability/Create an LLM Observability prompt returns \"Conflict\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c3ac68bbac5c4ff2d5ab63ec454ea97e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 189, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_Conflict_response-1784539199\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 425, + "content": { + "mimeType": "application/vnd.api+json", + "size": 425, + "text": "{\"data\":{\"id\":\"2fedf714-8445-571b-bad9-f7d4bb131524\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:20:00.140121332Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T09:20:00.140121332Z\",\"num_versions\":1,\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_Conflict_response-1784539199\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:19:59.890Z", + "time": 628 + }, + { + "_id": "d88bb4e03daa45edfaf4e3207164e178", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 214, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"env_ids\":[],\"labels\":[],\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_Conflict_response-1784539199\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 80, + "content": { + "mimeType": "application/vnd.api+json", + "size": 80, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template already exists\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 409, + "statusText": "Conflict" + }, + "startedDateTime": "2026-07-20T09:20:00.523Z", + "time": 274 + }, + { + "_id": "fd872fba39817c530151d241258d0718", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 616, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Create_an_LLM_Observability_prompt_returns_Conflict_response-1784539199" + }, + "response": { + "bodySize": 229, + "content": { + "mimeType": "application/vnd.api+json", + "size": 229, + "text": "{\"data\":{\"id\":\"2fedf714-8445-571b-bad9-f7d4bb131524\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T09:20:01.051306Z\",\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_Conflict_response-1784539199\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:00.802Z", + "time": 290 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/frozen.json new file mode 100644 index 000000000000..b7417db8225b --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/frozen.json @@ -0,0 +1 @@ +"2026-07-21T12:31:53.516Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/recording.har b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/recording.har new file mode 100644 index 000000000000..599fa18b444c --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Create-an-LLM-Observability-prompt-returns-OK-response_2172133082/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "LLM Observability/Create an LLM Observability prompt returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "f3d970141e23eaa063501d9d107ecc6d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 367, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784637113\",\"template\":[{\"content\":\"You are a helpful customer support assistant for {{company_name}}.\",\"role\":\"system\"},{\"content\":\"Help {{customer_name}} with this question: {{question}}\",\"role\":\"user\"}],\"title\":\"Customer Support Assistant\"},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 456, + "content": { + "mimeType": "application/vnd.api+json", + "size": 456, + "text": "{\"data\":{\"id\":\"7d3137ab-7d6a-5358-b791-26ead4540e09\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-21T12:31:53.812929348Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-21T12:31:53.812929348Z\",\"num_versions\":1,\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784637113\",\"source\":\"registry\",\"title\":\"Customer Support Assistant\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-21T12:31:53.522Z", + "time": 753 + }, + { + "_id": "cf3fd46db31d8c8127b2518c914411af", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 610, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784637113" + }, + "response": { + "bodySize": 223, + "content": { + "mimeType": "application/vnd.api+json", + "size": 223, + "text": "{\"data\":{\"id\":\"7d3137ab-7d6a-5358-b791-26ead4540e09\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-21T12:31:55.799078Z\",\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784637113\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-21T12:31:54.284Z", + "time": 1532 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/frozen.json new file mode 100644 index 000000000000..e422d31364d3 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:20:02.116Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/recording.har b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/recording.har new file mode 100644 index 000000000000..becad45d1c3d --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-Not-Found-response_560451850/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "LLM Observability/Delete an LLM Observability prompt returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "5d103955379aae573930d19bcb586215", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 558, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/nonexistent-prompt" + }, + "response": { + "bodySize": 75, + "content": { + "mimeType": "application/vnd.api+json", + "size": 75, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-07-20T09:20:02.117Z", + "time": 286 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/frozen.json new file mode 100644 index 000000000000..fd44bcd6b469 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:20:02.406Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/recording.har b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/recording.har new file mode 100644 index 000000000000..e45a8e8c44ed --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Delete-an-LLM-Observability-prompt-returns-OK-response_836410061/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "LLM Observability/Delete an LLM Observability prompt returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "eda0090bde31e95b0566c68280b79d19", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 183, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 419, + "content": { + "mimeType": "application/vnd.api+json", + "size": 419, + "text": "{\"data\":{\"id\":\"d5df9e4e-acd0-5d9f-b0d5-c09a643c33e2\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:20:02.660067768Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T09:20:02.660067768Z\",\"num_versions\":1,\"prompt_id\":\"Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:02.408Z", + "time": 631 + }, + { + "_id": "c793b7897a609ac13116975bc1544766", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 610, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202" + }, + "response": { + "bodySize": 223, + "content": { + "mimeType": "application/vnd.api+json", + "size": 223, + "text": "{\"data\":{\"id\":\"d5df9e4e-acd0-5d9f-b0d5-c09a643c33e2\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T09:20:03.299559Z\",\"prompt_id\":\"Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:03.042Z", + "time": 335 + }, + { + "_id": "c793b7897a609ac13116975bc1544766", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 610, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202" + }, + "response": { + "bodySize": 223, + "content": { + "mimeType": "application/vnd.api+json", + "size": 223, + "text": "{\"data\":{\"id\":\"d5df9e4e-acd0-5d9f-b0d5-c09a643c33e2\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T09:20:03.637257Z\",\"prompt_id\":\"Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:03.382Z", + "time": 303 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/frozen.json new file mode 100644 index 000000000000..d342ab7ff36c --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/frozen.json @@ -0,0 +1 @@ +"2026-07-20T10:29:01.052Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/recording.har b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/recording.har new file mode 100644 index 000000000000..40d02734a7aa --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3630584927/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "LLM Observability/Get a specific LLM Observability prompt version returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "d4047aacd83b7fe816b236fd78a9197e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 570, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/nonexistent-prompt/versions/1" + }, + "response": { + "bodySize": 49, + "content": { + "mimeType": "application/vnd.api+json", + "size": 49, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-07-20T10:29:01.058Z", + "time": 379 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/frozen.json new file mode 100644 index 000000000000..0a2e12ed351c --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/frozen.json @@ -0,0 +1 @@ +"2026-07-20T12:24:45.688Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/recording.har b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/recording.har new file mode 100644 index 000000000000..feb8f08b826b --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-a-specific-LLM-Observability-prompt-version-returns-OK-response_1254772934/recording.har @@ -0,0 +1,249 @@ +{ + "log": { + "_recordingName": "LLM Observability/Get a specific LLM Observability prompt version returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "d2e402326a9c11b79cae9105fc718822", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 196, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 592, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 432, + "content": { + "mimeType": "application/vnd.api+json", + "size": 432, + "text": "{\"data\":{\"id\":\"599ee1f4-9680-5ff8-92c9-ca31130057f3\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T12:24:46.021742711Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T12:24:46.021742711Z\",\"num_versions\":1,\"prompt_id\":\"Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T12:24:45.695Z", + "time": 800 + }, + { + "_id": "dcd8384247236580d888145e8c864180", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 109, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 692, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}]},\"type\":\"prompt-template-versions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285/versions" + }, + "response": { + "bodySize": 464, + "content": { + "mimeType": "application/vnd.api+json", + "size": 464, + "text": "{\"data\":{\"id\":\"d80790f5-cd99-5d57-b6e0-4d4bbbc21514\",\"type\":\"prompt-template-versions\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T12:24:46.796641541Z\",\"prompt_id\":\"Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285\",\"prompt_uuid\":\"599ee1f4-9680-5ff8-92c9-ca31130057f3\",\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}],\"version\":2,\"version_created_at\":\"2026-07-20T12:24:46.796641541Z\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T12:24:46.503Z", + "time": 474 + }, + { + "_id": "0ae2533ea721e8b34845858cf9e60da6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 637, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285/versions/2" + }, + "response": { + "bodySize": 458, + "content": { + "mimeType": "application/vnd.api+json", + "size": 458, + "text": "{\"data\":{\"id\":\"d80790f5-cd99-5d57-b6e0-4d4bbbc21514\",\"type\":\"prompt-template-versions\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T12:24:46.796641Z\",\"prompt_id\":\"Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285\",\"prompt_uuid\":\"599ee1f4-9680-5ff8-92c9-ca31130057f3\",\"template\":[{\"role\":\"user\",\"content\":\"Hello v2\"}],\"version\":2,\"version_created_at\":\"2026-07-20T12:24:46.796641Z\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T12:24:46.983Z", + "time": 1472 + }, + { + "_id": "e98cb8fe7cefa49ce959871739cdfac6", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 625, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285" + }, + "response": { + "bodySize": 236, + "content": { + "mimeType": "application/vnd.api+json", + "size": 236, + "text": "{\"data\":{\"id\":\"599ee1f4-9680-5ff8-92c9-ca31130057f3\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T12:24:48.753279Z\",\"prompt_id\":\"Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T12:24:48.460Z", + "time": 316 + }, + { + "_id": "e98cb8fe7cefa49ce959871739cdfac6", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 625, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285" + }, + "response": { + "bodySize": 236, + "content": { + "mimeType": "application/vnd.api+json", + "size": 236, + "text": "{\"data\":{\"id\":\"599ee1f4-9680-5ff8-92c9-ca31130057f3\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T12:24:49.086069Z\",\"prompt_id\":\"Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T12:24:48.778Z", + "time": 328 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/frozen.json new file mode 100644 index 000000000000..0bc9bc15a752 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:20:08.586Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/recording.har b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/recording.har new file mode 100644 index 000000000000..3ba5ad8939a6 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-Not-Found-response_3881517533/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "LLM Observability/Get an LLM Observability prompt returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "4de338bce1b0d2114eae8e3b518c1240", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 552, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/nonexistent-prompt" + }, + "response": { + "bodySize": 95, + "content": { + "mimeType": "application/vnd.api+json", + "size": 95, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt with id 'nonexistent-prompt' not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-07-20T09:20:08.588Z", + "time": 288 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/frozen.json new file mode 100644 index 000000000000..2ddba56caa7c --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:20:08.880Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/recording.har b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/recording.har new file mode 100644 index 000000000000..73e2bc3145d7 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Get-an-LLM-Observability-prompt-returns-OK-response_3647559676/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "LLM Observability/Get an LLM Observability prompt returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "856e09902d3abb2288708711d796b80a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 180, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 416, + "content": { + "mimeType": "application/vnd.api+json", + "size": 416, + "text": "{\"data\":{\"id\":\"95e93a91-1020-5a23-9cb7-c8ca6e3b1785\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:20:09.112910708Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T09:20:09.112910708Z\",\"num_versions\":1,\"prompt_id\":\"Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:08.881Z", + "time": 641 + }, + { + "_id": "79311cc8039b6e826c92ef6178e72767", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 601, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208" + }, + "response": { + "bodySize": 304, + "content": { + "mimeType": "application/vnd.api+json", + "size": 304, + "text": "{\"data\":{\"id\":\"95e93a91-1020-5a23-9cb7-c8ca6e3b1785\",\"type\":\"prompt-templates\",\"attributes\":{\"chat_template\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"prompt_id\":\"Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208\",\"prompt_version_uuid\":\"9cd92cc7-2f51-5867-8148-eaf41efee79d\",\"version\":\"1\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:09.525Z", + "time": 342 + }, + { + "_id": "9bf6e5933fdd6c8fec69d3db131d76a5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 607, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208" + }, + "response": { + "bodySize": 220, + "content": { + "mimeType": "application/vnd.api+json", + "size": 220, + "text": "{\"data\":{\"id\":\"95e93a91-1020-5a23-9cb7-c8ca6e3b1785\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T09:20:10.172623Z\",\"prompt_id\":\"Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:09.872Z", + "time": 340 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/frozen.json b/cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/frozen.json new file mode 100644 index 000000000000..e9d2d0e92835 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:30:04.586Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/recording.har b/cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/recording.har new file mode 100644 index 000000000000..534b814f9b3e --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/List-LLM-Observability-prompts-returns-OK-response_2780502758/recording.har @@ -0,0 +1,160 @@ +{ + "log": { + "_recordingName": "LLM Observability/List LLM Observability prompts returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "34a7899430303ac6a051512e481f0491", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 179, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-List_LLM_Observability_prompts_returns_OK_response-1784539804\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 415, + "content": { + "mimeType": "application/vnd.api+json", + "size": 415, + "text": "{\"data\":{\"id\":\"b04a1ded-d2da-578c-a520-1c1dd2046d1c\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:30:04.928462935Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T09:30:04.928462935Z\",\"num_versions\":1,\"prompt_id\":\"Test-List_LLM_Observability_prompts_returns_OK_response-1784539804\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:30:04.594Z", + "time": 819 + }, + { + "_id": "1d206097bf694f213dad0725925318b5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 624, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "filter", + "value": { + "prompt_id": "Test-List_LLM_Observability_prompts_returns_OK_response-1784539804" + } + } + ], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts?filter%5Bprompt_id%5D=Test-List_LLM_Observability_prompts_returns_OK_response-1784539804" + }, + "response": { + "bodySize": 411, + "content": { + "mimeType": "application/vnd.api+json", + "size": 411, + "text": "{\"data\":[{\"id\":\"b04a1ded-d2da-578c-a520-1c1dd2046d1c\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:30:04.928462Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T09:30:04.928462Z\",\"num_versions\":1,\"prompt_id\":\"Test-List_LLM_Observability_prompts_returns_OK_response-1784539804\",\"source\":\"registry\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:30:05.420Z", + "time": 1109 + }, + { + "_id": "5561132bc4c362638884b96ebb98304f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 606, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-List_LLM_Observability_prompts_returns_OK_response-1784539804" + }, + "response": { + "bodySize": 219, + "content": { + "mimeType": "application/vnd.api+json", + "size": 219, + "text": "{\"data\":{\"id\":\"b04a1ded-d2da-578c-a520-1c1dd2046d1c\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T09:30:06.787619Z\",\"prompt_id\":\"Test-List_LLM_Observability_prompts_returns_OK_response-1784539804\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:30:06.534Z", + "time": 295 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/frozen.json b/cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/frozen.json new file mode 100644 index 000000000000..390879781413 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:20:12.882Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/recording.har b/cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/recording.har new file mode 100644 index 000000000000..2a31f6dd02e3 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/List-versions-of-an-LLM-Observability-prompt-returns-OK-response_1860170708/recording.har @@ -0,0 +1,153 @@ +{ + "log": { + "_recordingName": "LLM Observability/List versions of an LLM Observability prompt returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "4631cbf1f9e37868b286b46d59adfa5b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 193, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 429, + "content": { + "mimeType": "application/vnd.api+json", + "size": 429, + "text": "{\"data\":{\"id\":\"31fdf246-89b8-5a48-9544-ff84c4504939\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:20:13.145132213Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T09:20:13.145132213Z\",\"num_versions\":1,\"prompt_id\":\"Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:12.887Z", + "time": 643 + }, + { + "_id": "3710bf2851d6689924d76deae756c34a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 632, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212/versions" + }, + "response": { + "bodySize": 407, + "content": { + "mimeType": "application/vnd.api+json", + "size": 407, + "text": "{\"data\":[{\"id\":\"e0cc7c1d-cbb6-589c-bcd9-d9c1b35aec60\",\"type\":\"prompt-template-versions\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:20:13.145132Z\",\"prompt_id\":\"Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212\",\"prompt_uuid\":\"31fdf246-89b8-5a48-9544-ff84c4504939\",\"version\":1,\"version_created_at\":\"2026-07-20T09:20:13.145132Z\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:13.533Z", + "time": 1341 + }, + { + "_id": "aeb88b875db24fcfc2bc88bcdfc81fb0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 620, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212" + }, + "response": { + "bodySize": 233, + "content": { + "mimeType": "application/vnd.api+json", + "size": 233, + "text": "{\"data\":{\"id\":\"31fdf246-89b8-5a48-9544-ff84c4504939\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T09:20:15.144489Z\",\"prompt_id\":\"Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:14.879Z", + "time": 306 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/frozen.json new file mode 100644 index 000000000000..84523277deff --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/frozen.json @@ -0,0 +1 @@ +"2026-07-20T10:29:38.039Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/recording.har b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/recording.har new file mode 100644 index 000000000000..dec16e318a2c --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-Not-Found-response_3284268154/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "LLM Observability/Update a specific LLM Observability prompt version returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "5d775e249e74f9b659547388337ad941", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 84, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 627, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"env_ids\":[],\"labels\":[]},\"type\":\"prompt-template-versions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/nonexistent-prompt/versions/1" + }, + "response": { + "bodySize": 83, + "content": { + "mimeType": "application/vnd.api+json", + "size": 83, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template version not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-07-20T10:29:38.044Z", + "time": 613 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/frozen.json new file mode 100644 index 000000000000..a7cb25dbaaa3 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/frozen.json @@ -0,0 +1 @@ +"2026-07-20T15:43:10.740Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/recording.har b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/recording.har new file mode 100644 index 000000000000..70d46c8d07e2 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-a-specific-LLM-Observability-prompt-version-returns-OK-response_1747795613/recording.har @@ -0,0 +1,259 @@ +{ + "log": { + "_recordingName": "LLM Observability/Update a specific LLM Observability prompt version returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "a8fccc941bf3307afd9045b864a2340a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 199, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 618, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 435, + "content": { + "mimeType": "application/vnd.api+json", + "size": 435, + "text": "{\"data\":{\"id\":\"3c7ea2ea-52df-5324-8e77-0f01cf441ef9\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:43:11.158625133Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T15:43:11.158625133Z\",\"num_versions\":1,\"prompt_id\":\"Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:10.742Z", + "time": 940 + }, + { + "_id": "c3e9563b5710e6f1d2f6829a48f13c94", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 109, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 721, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}]},\"type\":\"prompt-template-versions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190/versions" + }, + "response": { + "bodySize": 467, + "content": { + "mimeType": "application/vnd.api+json", + "size": 467, + "text": "{\"data\":{\"id\":\"c5593d94-81b0-522b-8cae-7fa643ea7ec9\",\"type\":\"prompt-template-versions\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:43:12.623730838Z\",\"prompt_id\":\"Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190\",\"prompt_uuid\":\"3c7ea2ea-52df-5324-8e77-0f01cf441ef9\",\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}],\"version\":2,\"version_created_at\":\"2026-07-20T15:43:12.623730838Z\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:11.686Z", + "time": 1138 + }, + { + "_id": "95e1fe959e0aecaeba91c8726d5efe19", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 136, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 724, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Give concise answers and cite relevant help-center articles.\"},\"type\":\"prompt-template-versions\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190/versions/2" + }, + "response": { + "bodySize": 536, + "content": { + "mimeType": "application/vnd.api+json", + "size": 536, + "text": "{\"data\":{\"id\":\"c5593d94-81b0-522b-8cae-7fa643ea7ec9\",\"type\":\"prompt-template-versions\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:43:12.62373Z\",\"description\":\"Give concise answers and cite relevant help-center articles.\",\"prompt_id\":\"Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190\",\"prompt_uuid\":\"3c7ea2ea-52df-5324-8e77-0f01cf441ef9\",\"template\":[{\"role\":\"user\",\"content\":\"Hello v2\"}],\"version\":2,\"version_created_at\":\"2026-07-20T15:43:12.62373Z\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:12.828Z", + "time": 618 + }, + { + "_id": "ba1ddfacc8079ebb4b8164fbbd1e5a1a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 654, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190" + }, + "response": { + "bodySize": 239, + "content": { + "mimeType": "application/vnd.api+json", + "size": 239, + "text": "{\"data\":{\"id\":\"3c7ea2ea-52df-5324-8e77-0f01cf441ef9\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T15:43:13.804223Z\",\"prompt_id\":\"Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:13.450Z", + "time": 368 + }, + { + "_id": "ba1ddfacc8079ebb4b8164fbbd1e5a1a", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 654, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190" + }, + "response": { + "bodySize": 238, + "content": { + "mimeType": "application/vnd.api+json", + "size": 238, + "text": "{\"data\":{\"id\":\"3c7ea2ea-52df-5324-8e77-0f01cf441ef9\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T15:43:14.36251Z\",\"prompt_id\":\"Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:13.821Z", + "time": 549 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/frozen.json new file mode 100644 index 000000000000..e2073869ab14 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:20:18.946Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/recording.har b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/recording.har new file mode 100644 index 000000000000..ce63fc569cfe --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Bad-Request-response_261225595/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "LLM Observability/Update an LLM Observability prompt returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "75e0607bf971f86ab3a262e04bb88856", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 192, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 590, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 428, + "content": { + "mimeType": "application/vnd.api+json", + "size": 428, + "text": "{\"data\":{\"id\":\"b28f22d5-eec8-57f0-be7f-5042b6bb4ae1\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T09:20:19.301545921Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T09:20:19.301545921Z\",\"num_versions\":1,\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:18.947Z", + "time": 740 + }, + { + "_id": "3b4551b121ca3868c34d2f7f239c354b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 52, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 670, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218" + }, + "response": { + "bodySize": 103, + "content": { + "mimeType": "application/vnd.api+json", + "size": 103, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"at least one of title or description must be provided\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2026-07-20T09:20:19.691Z", + "time": 285 + }, + { + "_id": "b6884ef226ac4ba4db7c61594b0cfa1f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 619, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218" + }, + "response": { + "bodySize": 232, + "content": { + "mimeType": "application/vnd.api+json", + "size": 232, + "text": "{\"data\":{\"id\":\"b28f22d5-eec8-57f0-be7f-5042b6bb4ae1\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T09:20:20.235152Z\",\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T09:20:19.978Z", + "time": 339 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/frozen.json new file mode 100644 index 000000000000..4564fb9a6a40 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/frozen.json @@ -0,0 +1 @@ +"2026-07-20T09:20:20.319Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/recording.har b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/recording.har new file mode 100644 index 000000000000..e35b3316396f --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-Not-Found-response_2271732444/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "LLM Observability/Update an LLM Observability prompt returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1a509dafad9dd1a20f59090ba74bf89a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 71, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 609, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"title\":\"New title\"},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/nonexistent-prompt" + }, + "response": { + "bodySize": 75, + "content": { + "mimeType": "application/vnd.api+json", + "size": 75, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 522, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2026-07-20T09:20:20.320Z", + "time": 283 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/frozen.json b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/frozen.json new file mode 100644 index 000000000000..6455f4b10977 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/frozen.json @@ -0,0 +1 @@ +"2026-07-20T15:43:14.374Z" diff --git a/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/recording.har b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/recording.har new file mode 100644 index 000000000000..c5353bf5e512 --- /dev/null +++ b/cassettes/v2/LLM-Observability_1435126733/Update-an-LLM-Observability-prompt-returns-OK-response_2923335791/recording.har @@ -0,0 +1,163 @@ +{ + "log": { + "_recordingName": "LLM Observability/Update an LLM Observability prompt returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "38ff885764ed29b6b0248b2da0948f28", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 183, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 618, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts" + }, + "response": { + "bodySize": 419, + "content": { + "mimeType": "application/vnd.api+json", + "size": 419, + "text": "{\"data\":{\"id\":\"a36505e7-3c2f-5482-b8ac-ac51250a0116\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:43:14.698626703Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T15:43:14.698626703Z\",\"num_versions\":1,\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194\",\"source\":\"registry\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:14.376Z", + "time": 1228 + }, + { + "_id": "fd24dfa96a05c34f5fdac07022f11787", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 88, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 689, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"title\":\"Customer Support Assistant\"},\"type\":\"prompt-templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194" + }, + "response": { + "bodySize": 394, + "content": { + "mimeType": "application/vnd.api+json", + "size": 394, + "text": "{\"data\":{\"id\":\"a36505e7-3c2f-5482-b8ac-ac51250a0116\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:43:14.698626Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"num_versions\":0,\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194\",\"source\":\"registry\",\"title\":\"Customer Support Assistant\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:15.607Z", + "time": 461 + }, + { + "_id": "be99c933e8d931d4aa8c9ef38ef958e7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 638, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194" + }, + "response": { + "bodySize": 222, + "content": { + "mimeType": "application/vnd.api+json", + "size": 222, + "text": "{\"data\":{\"id\":\"a36505e7-3c2f-5482-b8ac-ac51250a0116\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T15:43:16.39072Z\",\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194\"}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 555, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-07-20T15:43:16.071Z", + "time": 323 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/features/v2/given.json b/features/v2/given.json index 75fa924ff16d..6f57cbefde83 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -858,6 +858,34 @@ "tag": "IP Allowlist", "operationId": "UpdateIPAllowlist" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"prompt-templates\",\n \"attributes\": {\n \"prompt_id\": \"{{ unique }}\",\n \"template\": [{\"role\": \"user\", \"content\": \"Hello\"}]\n }\n }\n}" + } + ], + "step": "there is a valid \"prompt\" in the system", + "key": "prompt", + "tag": "LLM Observability", + "operationId": "CreateLLMObsPrompt" + }, + { + "parameters": [ + { + "name": "prompt_id", + "source": "prompt.data.attributes.prompt_id" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"prompt-template-versions\",\n \"attributes\": {\n \"template\": [{\"role\": \"user\", \"content\": \"Hello v2\"}]\n }\n }\n}" + } + ], + "step": "there is a valid \"prompt_version\" in the system", + "key": "prompt_version", + "tag": "LLM Observability", + "operationId": "CreateLLMObsPromptVersion" + }, { "parameters": [ { diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index 35e9592fa0a9..2c23f9f6d7b4 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -1,12 +1,12 @@ @endpoint(llm-observability) @endpoint(llm-observability-v2) Feature: LLM Observability Manage LLM Observability spans, data, projects, datasets, dataset records, - experiments, and annotations. + experiments, prompts, and annotations. Background: Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system And an instance of "LLMObservability" API + And a valid "appKeyAuth" key in the system @skip @team:DataDog/ml-observability Scenario: Add a display_block interaction returns "Created" response @@ -179,6 +179,35 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @team:DataDog/ml-observability + Scenario: Create a new LLM Observability prompt version returns "Bad Request" response + Given there is a valid "prompt" in the system + And operation "CreateLLMObsPromptVersion" enabled + And new "CreateLLMObsPromptVersion" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + And body with value {"data": {"attributes": {"template": " "}, "type": "prompt-template-versions"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/ml-observability + Scenario: Create a new LLM Observability prompt version returns "Not Found" response + Given operation "CreateLLMObsPromptVersion" enabled + And new "CreateLLMObsPromptVersion" request + And request contains "prompt_id" parameter with value "nonexistent-prompt" + And body with value {"data": {"attributes": {"env_ids": [], "labels": [], "template": [{"content": "Hello v2", "role": "user"}]}, "type": "prompt-template-versions"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/ml-observability + Scenario: Create a new LLM Observability prompt version returns "OK" response + Given there is a valid "prompt" in the system + And operation "CreateLLMObsPromptVersion" enabled + And new "CreateLLMObsPromptVersion" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + And body with value {"data": {"attributes": {"template": [{"content": "You are a concise customer support assistant for {{ '{{company_name}}' }}.", "role": "system"}, {"content": "Answer {{ '{{customer_name}}' }}'s question: {{ '{{question}}' }}", "role": "user"}]}, "type": "prompt-template-versions"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Create an LLM Observability annotation queue returns "Bad Request" response Given operation "CreateLLMObsAnnotationQueue" enabled @@ -279,6 +308,31 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @team:DataDog/ml-observability + Scenario: Create an LLM Observability prompt returns "Bad Request" response + Given operation "CreateLLMObsPrompt" enabled + And new "CreateLLMObsPrompt" request + And body with value {"data": {"attributes": {"prompt_id": "{{ unique }}", "template": " "}, "type": "prompt-templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/ml-observability + Scenario: Create an LLM Observability prompt returns "Conflict" response + Given there is a valid "prompt" in the system + And operation "CreateLLMObsPrompt" enabled + And new "CreateLLMObsPrompt" request + And body with value {"data": {"attributes": {"env_ids": [], "labels": [], "prompt_id": "{{ prompt.data.attributes.prompt_id }}", "template": [{"content": "Hello", "role": "user"}]}, "type": "prompt-templates"}} + When the request is sent + Then the response status is 409 Conflict + + @team:DataDog/ml-observability + Scenario: Create an LLM Observability prompt returns "OK" response + Given operation "CreateLLMObsPrompt" enabled + And new "CreateLLMObsPrompt" request + And body with value {"data": {"attributes": {"prompt_id": "{{ unique }}", "title": "Customer Support Assistant", "template": [{"content": "You are a helpful customer support assistant for {{ '{{company_name}}' }}.", "role": "system"}, {"content": "Help {{ '{{customer_name}}' }} with this question: {{ '{{question}}' }}", "role": "user"}]}, "type": "prompt-templates"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Create or update a custom evaluator configuration returns "Bad Request" response Given operation "UpdateLLMObsCustomEvalConfig" enabled @@ -535,6 +589,23 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @team:DataDog/ml-observability + Scenario: Delete an LLM Observability prompt returns "Not Found" response + Given operation "DeleteLLMObsPrompt" enabled + And new "DeleteLLMObsPrompt" request + And request contains "prompt_id" parameter with value "nonexistent-prompt" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/ml-observability + Scenario: Delete an LLM Observability prompt returns "OK" response + Given there is a valid "prompt" in the system + And operation "DeleteLLMObsPrompt" enabled + And new "DeleteLLMObsPrompt" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Delete annotation queue interactions returns "Bad Request" response Given operation "DeleteLLMObsAnnotationQueueInteractions" enabled @@ -688,6 +759,52 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get a specific LLM Observability prompt version returns "Bad Request" response + Given operation "GetLLMObsPromptVersion" enabled + And new "GetLLMObsPromptVersion" request + And request contains "prompt_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/ml-observability + Scenario: Get a specific LLM Observability prompt version returns "Not Found" response + Given operation "GetLLMObsPromptVersion" enabled + And new "GetLLMObsPromptVersion" request + And request contains "prompt_id" parameter with value "nonexistent-prompt" + And request contains "version" parameter with value 1 + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/ml-observability + Scenario: Get a specific LLM Observability prompt version returns "OK" response + Given there is a valid "prompt" in the system + And there is a valid "prompt_version" in the system + And operation "GetLLMObsPromptVersion" enabled + And new "GetLLMObsPromptVersion" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + And request contains "version" parameter from "prompt_version.data.attributes.version" + When the request is sent + Then the response status is 200 OK + + @team:DataDog/ml-observability + Scenario: Get an LLM Observability prompt returns "Not Found" response + Given operation "GetLLMObsPrompt" enabled + And new "GetLLMObsPrompt" request + And request contains "prompt_id" parameter with value "nonexistent-prompt" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/ml-observability + Scenario: Get an LLM Observability prompt returns "OK" response + Given there is a valid "prompt" in the system + And operation "GetLLMObsPrompt" enabled + And new "GetLLMObsPrompt" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Get annotated interactions by content IDs returns "Bad Request" response Given operation "GetLLMObsAnnotatedInteractionsByTraceIDs" enabled @@ -936,6 +1053,15 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @team:DataDog/ml-observability + Scenario: List LLM Observability prompts returns "OK" response + Given there is a valid "prompt" in the system + And operation "ListLLMObsPrompts" enabled + And new "ListLLMObsPrompts" request + And request contains "filter[prompt_id]" parameter from "prompt.data.attributes.prompt_id" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability spans returns "Bad Request" response Given operation "ListLLMObsSpans" enabled @@ -1118,6 +1244,15 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @team:DataDog/ml-observability + Scenario: List versions of an LLM Observability prompt returns "OK" response + Given there is a valid "prompt" in the system + And operation "ListLLMObsPromptVersions" enabled + And new "ListLLMObsPromptVersions" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Lock LLM Observability dataset draft state returns "Bad Request" response Given operation "LockLLMObsDatasetDraftState" enabled @@ -1359,6 +1494,38 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Update a specific LLM Observability prompt version returns "Bad Request" response + Given operation "UpdateLLMObsPromptVersion" enabled + And new "UpdateLLMObsPromptVersion" request + And request contains "prompt_id" parameter from "REPLACE.ME" + And request contains "version" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"env_ids": [], "labels": ["production"]}, "type": "prompt-template-versions"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/ml-observability + Scenario: Update a specific LLM Observability prompt version returns "Not Found" response + Given operation "UpdateLLMObsPromptVersion" enabled + And new "UpdateLLMObsPromptVersion" request + And request contains "prompt_id" parameter with value "nonexistent-prompt" + And request contains "version" parameter with value 1 + And body with value {"data": {"attributes": {"env_ids": [], "labels": []}, "type": "prompt-template-versions"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/ml-observability + Scenario: Update a specific LLM Observability prompt version returns "OK" response + Given there is a valid "prompt" in the system + And there is a valid "prompt_version" in the system + And operation "UpdateLLMObsPromptVersion" enabled + And new "UpdateLLMObsPromptVersion" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + And request contains "version" parameter from "prompt_version.data.attributes.version" + And body with value {"data": {"attributes": {"description": "Give concise answers and cite relevant help-center articles."}, "type": "prompt-template-versions"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Update an LLM Observability annotation queue returns "Bad Request" response Given operation "UpdateLLMObsAnnotationQueue" enabled @@ -1470,6 +1637,35 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @team:DataDog/ml-observability + Scenario: Update an LLM Observability prompt returns "Bad Request" response + Given there is a valid "prompt" in the system + And operation "UpdateLLMObsPrompt" enabled + And new "UpdateLLMObsPrompt" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + And body with value {"data": {"attributes": {}, "type": "prompt-templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/ml-observability + Scenario: Update an LLM Observability prompt returns "Not Found" response + Given operation "UpdateLLMObsPrompt" enabled + And new "UpdateLLMObsPrompt" request + And request contains "prompt_id" parameter with value "nonexistent-prompt" + And body with value {"data": {"attributes": {"title": "New title"}, "type": "prompt-templates"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/ml-observability + Scenario: Update an LLM Observability prompt returns "OK" response + Given there is a valid "prompt" in the system + And operation "UpdateLLMObsPrompt" enabled + And new "UpdateLLMObsPrompt" request + And request contains "prompt_id" parameter from "prompt.data.attributes.prompt_id" + And body with value {"data": {"attributes": {"title": "Customer Support Assistant"}, "type": "prompt-templates"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Update annotation queue label schema returns "Bad Request" response Given operation "UpdateLLMObsAnnotationQueueLabelSchema" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index f7316aecda2c..e72767d8e0d5 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -4555,6 +4555,74 @@ "type": "idempotent" } }, + "ListLLMObsPrompts": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "CreateLLMObsPrompt": { + "tag": "LLM Observability", + "undo": { + "operationId": "DeleteLLMObsPrompt", + "parameters": [ + { + "name": "prompt_id", + "source": "data.attributes.prompt_id" + } + ], + "type": "unsafe" + } + }, + "DeleteLLMObsPrompt": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "GetLLMObsPrompt": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "UpdateLLMObsPrompt": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "ListLLMObsPromptVersions": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "CreateLLMObsPromptVersion": { + "tag": "LLM Observability", + "undo": { + "operationId": "DeleteLLMObsPrompt", + "parameters": [ + { + "name": "prompt_id", + "source": "data.attributes.prompt_id" + } + ], + "type": "unsafe" + } + }, + "GetLLMObsPromptVersion": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "UpdateLLMObsPromptVersion": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, "ListLLMObsSpans": { "tag": "LLM Observability", "undo": { diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index 39d4c22f7e39..caea94f24260 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -2870,6 +2870,93 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "LLMObsProjectResponse", }, + "LLMObservabilityApi.V2.ListLLMObsPrompts": { + filterPromptId: { + type: "string", + format: "", + }, + operationResponseType: "LLMObsPromptsResponse", + }, + "LLMObservabilityApi.V2.CreateLLMObsPrompt": { + body: { + type: "LLMObsCreatePromptRequest", + format: "", + }, + operationResponseType: "LLMObsPromptResponse", + }, + "LLMObservabilityApi.V2.GetLLMObsPrompt": { + promptId: { + type: "string", + format: "", + }, + label: { + type: "string", + format: "", + }, + operationResponseType: "LLMObsPromptSDKResponse", + }, + "LLMObservabilityApi.V2.DeleteLLMObsPrompt": { + promptId: { + type: "string", + format: "", + }, + operationResponseType: "LLMObsDeletedPromptResponse", + }, + "LLMObservabilityApi.V2.UpdateLLMObsPrompt": { + promptId: { + type: "string", + format: "", + }, + body: { + type: "LLMObsUpdatePromptRequest", + format: "", + }, + operationResponseType: "LLMObsPromptResponse", + }, + "LLMObservabilityApi.V2.ListLLMObsPromptVersions": { + promptId: { + type: "string", + format: "", + }, + operationResponseType: "LLMObsPromptVersionsResponse", + }, + "LLMObservabilityApi.V2.CreateLLMObsPromptVersion": { + promptId: { + type: "string", + format: "", + }, + body: { + type: "LLMObsCreatePromptVersionRequest", + format: "", + }, + operationResponseType: "LLMObsPromptVersionResponse", + }, + "LLMObservabilityApi.V2.GetLLMObsPromptVersion": { + promptId: { + type: "string", + format: "", + }, + version: { + type: "number", + format: "int64", + }, + operationResponseType: "LLMObsPromptVersionResponse", + }, + "LLMObservabilityApi.V2.UpdateLLMObsPromptVersion": { + promptId: { + type: "string", + format: "", + }, + version: { + type: "number", + format: "int64", + }, + body: { + type: "LLMObsUpdatePromptVersionRequest", + format: "", + }, + operationResponseType: "LLMObsPromptVersionResponse", + }, "LLMObservabilityApi.V2.ListLLMObsSpans": { filterFrom: { type: "string", diff --git a/services/llm_observability/README.md b/services/llm_observability/README.md index def2a10af800..4669b3f2fc7e 100644 --- a/services/llm_observability/README.md +++ b/services/llm_observability/README.md @@ -2,7 +2,7 @@ ## Description -Manage LLM Observability spans, data, projects, datasets, dataset records, experiments, and annotations. +Manage LLM Observability spans, data, projects, datasets, dataset records, experiments, prompts, and annotations. ## Navigation diff --git a/services/llm_observability/src/v2/LLMObservabilityApi.ts b/services/llm_observability/src/v2/LLMObservabilityApi.ts index 6ad55df9ff5d..f1b188fdaf5d 100644 --- a/services/llm_observability/src/v2/LLMObservabilityApi.ts +++ b/services/llm_observability/src/v2/LLMObservabilityApi.ts @@ -39,6 +39,8 @@ import { LLMObsAnnotationQueuesResponse } from "./models/LLMObsAnnotationQueuesR import { LLMObsAnnotationQueueUpdateRequest } from "./models/LLMObsAnnotationQueueUpdateRequest"; import { LLMObsAnnotationsRequest } from "./models/LLMObsAnnotationsRequest"; import { LLMObsAnnotationsResponse } from "./models/LLMObsAnnotationsResponse"; +import { LLMObsCreatePromptRequest } from "./models/LLMObsCreatePromptRequest"; +import { LLMObsCreatePromptVersionRequest } from "./models/LLMObsCreatePromptVersionRequest"; import { LLMObsCustomEvalConfigResponse } from "./models/LLMObsCustomEvalConfigResponse"; import { LLMObsCustomEvalConfigUpdateRequest } from "./models/LLMObsCustomEvalConfigUpdateRequest"; import { LLMObsDataDeletionRequest } from "./models/LLMObsDataDeletionRequest"; @@ -62,6 +64,7 @@ import { LLMObsDeleteAnnotationsRequest } from "./models/LLMObsDeleteAnnotations import { LLMObsDeleteAnnotationsResponse } from "./models/LLMObsDeleteAnnotationsResponse"; import { LLMObsDeleteDatasetRecordsRequest } from "./models/LLMObsDeleteDatasetRecordsRequest"; import { LLMObsDeleteDatasetsRequest } from "./models/LLMObsDeleteDatasetsRequest"; +import { LLMObsDeletedPromptResponse } from "./models/LLMObsDeletedPromptResponse"; import { LLMObsDeleteExperimentsRequest } from "./models/LLMObsDeleteExperimentsRequest"; import { LLMObsDeleteProjectsRequest } from "./models/LLMObsDeleteProjectsRequest"; import { LLMObsExperimentationAnalyticsRequest } from "./models/LLMObsExperimentationAnalyticsRequest"; @@ -96,8 +99,15 @@ import { LLMObsProjectRequest } from "./models/LLMObsProjectRequest"; import { LLMObsProjectResponse } from "./models/LLMObsProjectResponse"; import { LLMObsProjectsResponse } from "./models/LLMObsProjectsResponse"; import { LLMObsProjectUpdateRequest } from "./models/LLMObsProjectUpdateRequest"; +import { LLMObsPromptResponse } from "./models/LLMObsPromptResponse"; +import { LLMObsPromptSDKResponse } from "./models/LLMObsPromptSDKResponse"; +import { LLMObsPromptsResponse } from "./models/LLMObsPromptsResponse"; +import { LLMObsPromptVersionResponse } from "./models/LLMObsPromptVersionResponse"; +import { LLMObsPromptVersionsResponse } from "./models/LLMObsPromptVersionsResponse"; import { LLMObsSearchSpansRequest } from "./models/LLMObsSearchSpansRequest"; import { LLMObsSpansResponse } from "./models/LLMObsSpansResponse"; +import { LLMObsUpdatePromptRequest } from "./models/LLMObsUpdatePromptRequest"; +import { LLMObsUpdatePromptVersionRequest } from "./models/LLMObsUpdatePromptVersionRequest"; import { version } from "../version"; export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { @@ -866,6 +876,134 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async createLLMObsPrompt( + body: LLMObsCreatePromptRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["LLMObservabilityApi.v2.createLLMObsPrompt"] + ) { + throw new Error( + "Unstable operation 'createLLMObsPrompt' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.createLLMObsPrompt'] = true`", + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createLLMObsPrompt"); + } + + // Path Params + const localVarPath = "/api/v2/llm-obs/v1/prompts"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.createLLMObsPrompt", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "LLMObsCreatePromptRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createLLMObsPromptVersion( + promptId: string, + body: LLMObsCreatePromptVersionRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.createLLMObsPromptVersion" + ] + ) { + throw new Error( + "Unstable operation 'createLLMObsPromptVersion' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.createLLMObsPromptVersion'] = true`", + ); + } + + // verify required parameter 'promptId' is not null or undefined + if (promptId === null || promptId === undefined) { + throw new RequiredError("promptId", "createLLMObsPromptVersion"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createLLMObsPromptVersion"); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions".replace( + "{prompt_id}", + encodeURIComponent(String(promptId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.createLLMObsPromptVersion", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "LLMObsCreatePromptVersionRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async deleteLLMObsAnnotationQueue( queueId: string, _options?: Configuration, @@ -1501,6 +1639,58 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async deleteLLMObsPrompt( + promptId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["LLMObservabilityApi.v2.deleteLLMObsPrompt"] + ) { + throw new Error( + "Unstable operation 'deleteLLMObsPrompt' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.deleteLLMObsPrompt'] = true`", + ); + } + + // verify required parameter 'promptId' is not null or undefined + if (promptId === null || promptId === undefined) { + throw new RequiredError("promptId", "deleteLLMObsPrompt"); + } + + // Path Params + const localVarPath = "/api/v2/llm-obs/v1/prompts/{prompt_id}".replace( + "{prompt_id}", + encodeURIComponent(String(promptId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.deleteLLMObsPrompt", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.DELETE, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async exportLLMObsDataset( projectId: string, datasetId: string, @@ -1986,6 +2176,126 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async getLLMObsPrompt( + promptId: string, + label?: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["LLMObservabilityApi.v2.getLLMObsPrompt"]) { + throw new Error( + "Unstable operation 'getLLMObsPrompt' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.getLLMObsPrompt'] = true`", + ); + } + + // verify required parameter 'promptId' is not null or undefined + if (promptId === null || promptId === undefined) { + throw new RequiredError("promptId", "getLLMObsPrompt"); + } + + // Path Params + const localVarPath = "/api/v2/llm-obs/v1/prompts/{prompt_id}".replace( + "{prompt_id}", + encodeURIComponent(String(promptId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.getLLMObsPrompt", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (label !== undefined) { + requestContext.setQueryParam( + "label", + serialize(label, TypingInfo, "string", ""), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getLLMObsPromptVersion( + promptId: string, + version: number, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.getLLMObsPromptVersion" + ] + ) { + throw new Error( + "Unstable operation 'getLLMObsPromptVersion' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.getLLMObsPromptVersion'] = true`", + ); + } + + // verify required parameter 'promptId' is not null or undefined + if (promptId === null || promptId === undefined) { + throw new RequiredError("promptId", "getLLMObsPromptVersion"); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new RequiredError("version", "getLLMObsPromptVersion"); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}" + .replace("{prompt_id}", encodeURIComponent(String(promptId))) + .replace("{version}", encodeURIComponent(String(version))); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.getLLMObsPromptVersion", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async listLLMObsAnnotationQueues( projectId?: string, queueIds?: Array, @@ -3128,35 +3438,143 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listLLMObsSpans( - filterFrom?: string, - filterTo?: string, - filterQuery?: string, - filterSpanId?: string, - filterTraceId?: string, - filterSpanKind?: string, - filterSpanName?: string, - filterMlApp?: string, - pageLimit?: number, - pageCursor?: string, - sort?: string, - includeAttachments?: boolean, + public async listLLMObsPrompts( + filterPromptId?: string, _options?: Configuration, ): Promise { const _config = _options || this.configuration; - if (!_config.unstableOperations["LLMObservabilityApi.v2.listLLMObsSpans"]) { + if ( + !_config.unstableOperations["LLMObservabilityApi.v2.listLLMObsPrompts"] + ) { throw new Error( - "Unstable operation 'listLLMObsSpans' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.listLLMObsSpans'] = true`", + "Unstable operation 'listLLMObsPrompts' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.listLLMObsPrompts'] = true`", ); } // Path Params - const localVarPath = "/api/v2/llm-obs/v1/spans/events"; + const localVarPath = "/api/v2/llm-obs/v1/prompts"; // Make Request Context const { server, overrides } = _config.getServerAndOverrides( - "LLMObservabilityApi.v2.listLLMObsSpans", + "LLMObservabilityApi.v2.listLLMObsPrompts", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (filterPromptId !== undefined) { + requestContext.setQueryParam( + "filter[prompt_id]", + serialize(filterPromptId, TypingInfo, "string", ""), + "", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listLLMObsPromptVersions( + promptId: string, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.listLLMObsPromptVersions" + ] + ) { + throw new Error( + "Unstable operation 'listLLMObsPromptVersions' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.listLLMObsPromptVersions'] = true`", + ); + } + + // verify required parameter 'promptId' is not null or undefined + if (promptId === null || promptId === undefined) { + throw new RequiredError("promptId", "listLLMObsPromptVersions"); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions".replace( + "{prompt_id}", + encodeURIComponent(String(promptId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.listLLMObsPromptVersions", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async listLLMObsSpans( + filterFrom?: string, + filterTo?: string, + filterQuery?: string, + filterSpanId?: string, + filterTraceId?: string, + filterSpanKind?: string, + filterSpanName?: string, + filterMlApp?: string, + pageLimit?: number, + pageCursor?: string, + sort?: string, + includeAttachments?: boolean, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if (!_config.unstableOperations["LLMObservabilityApi.v2.listLLMObsSpans"]) { + throw new Error( + "Unstable operation 'listLLMObsSpans' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.listLLMObsSpans'] = true`", + ); + } + + // Path Params + const localVarPath = "/api/v2/llm-obs/v1/spans/events"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.listLLMObsSpans", LLMObservabilityApi.operationServers, ); const requestContext = server.makeRequestContext( @@ -4207,6 +4625,148 @@ export class LLMObservabilityApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async updateLLMObsPrompt( + promptId: string, + body: LLMObsUpdatePromptRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations["LLMObservabilityApi.v2.updateLLMObsPrompt"] + ) { + throw new Error( + "Unstable operation 'updateLLMObsPrompt' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.updateLLMObsPrompt'] = true`", + ); + } + + // verify required parameter 'promptId' is not null or undefined + if (promptId === null || promptId === undefined) { + throw new RequiredError("promptId", "updateLLMObsPrompt"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateLLMObsPrompt"); + } + + // Path Params + const localVarPath = "/api/v2/llm-obs/v1/prompts/{prompt_id}".replace( + "{prompt_id}", + encodeURIComponent(String(promptId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.updateLLMObsPrompt", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "LLMObsUpdatePromptRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateLLMObsPromptVersion( + promptId: string, + version: number, + body: LLMObsUpdatePromptVersionRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + if ( + !_config.unstableOperations[ + "LLMObservabilityApi.v2.updateLLMObsPromptVersion" + ] + ) { + throw new Error( + "Unstable operation 'updateLLMObsPromptVersion' is disabled. Enable it by setting `configuration.unstableOperations['LLMObservabilityApi.v2.updateLLMObsPromptVersion'] = true`", + ); + } + + // verify required parameter 'promptId' is not null or undefined + if (promptId === null || promptId === undefined) { + throw new RequiredError("promptId", "updateLLMObsPromptVersion"); + } + + // verify required parameter 'version' is not null or undefined + if (version === null || version === undefined) { + throw new RequiredError("version", "updateLLMObsPromptVersion"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateLLMObsPromptVersion"); + } + + // Path Params + const localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}" + .replace("{prompt_id}", encodeURIComponent(String(promptId))) + .replace("{version}", encodeURIComponent(String(version))); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "LLMObservabilityApi.v2.updateLLMObsPromptVersion", + LLMObservabilityApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PATCH, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "LLMObsUpdatePromptVersionRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + public async uploadLLMObsDatasetRecordsFile( projectId: string, datasetId: string, @@ -5337,20 +5897,26 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteLLMObsAnnotationQueue + * @params response Response returned by the server for a request to createLLMObsPrompt * @throws ApiException if the response code was not in [200, 299] */ - public async deleteLLMObsAnnotationQueue( + public async createLLMObsPrompt( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 204) { - return; + if (response.httpStatusCode === 200) { + const body: LLMObsPromptResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptResponse", + ) as LLMObsPromptResponse; + return body; } if ( + response.httpStatusCode === 400 || response.httpStatusCode === 401 || response.httpStatusCode === 403 || - response.httpStatusCode === 404 + response.httpStatusCode === 409 ) { const bodyText = parse(await response.body.text(), contentType); let body: JSONAPIErrorResponse; @@ -5393,7 +5959,13 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + const body: LLMObsPromptResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptResponse", + "", + ) as LLMObsPromptResponse; + return body; } const body = (await response.body.text()) || ""; @@ -5407,15 +5979,20 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteLLMObsAnnotationQueueInteractions + * @params response Response returned by the server for a request to createLLMObsPromptVersion * @throws ApiException if the response code was not in [200, 299] */ - public async deleteLLMObsAnnotationQueueInteractions( + public async createLLMObsPromptVersion( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 204) { - return; + if (response.httpStatusCode === 200) { + const body: LLMObsPromptVersionResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptVersionResponse", + ) as LLMObsPromptVersionResponse; + return body; } if ( response.httpStatusCode === 400 || @@ -5464,7 +6041,13 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + const body: LLMObsPromptVersionResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptVersionResponse", + "", + ) as LLMObsPromptVersionResponse; + return body; } const body = (await response.body.text()) || ""; @@ -5478,20 +6061,161 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to deleteLLMObsAnnotations + * @params response Response returned by the server for a request to deleteLLMObsAnnotationQueue * @throws ApiException if the response code was not in [200, 299] */ - public async deleteLLMObsAnnotations( + public async deleteLLMObsAnnotationQueue( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); - if (response.httpStatusCode === 200) { - const body: LLMObsDeleteAnnotationsResponse = deserialize( - parse(await response.body.text(), contentType), - TypingInfo, - "LLMObsDeleteAnnotationsResponse", - ) as LLMObsDeleteAnnotationsResponse; - return body; + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteLLMObsAnnotationQueueInteractions + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteLLMObsAnnotationQueueInteractions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteLLMObsAnnotations + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteLLMObsAnnotations( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsDeleteAnnotationsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDeleteAnnotationsResponse", + ) as LLMObsDeleteAnnotationsResponse; + return body; } if ( response.httpStatusCode === 400 || @@ -6058,6 +6782,87 @@ export class LLMObservabilityApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteLLMObsPrompt + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteLLMObsPrompt( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsDeletedPromptResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDeletedPromptResponse", + ) as LLMObsDeletedPromptResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsDeletedPromptResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDeletedPromptResponse", + "", + ) as LLMObsDeletedPromptResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -6720,25 +7525,25 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to listLLMObsAnnotationQueues + * @params response Response returned by the server for a request to getLLMObsPrompt * @throws ApiException if the response code was not in [200, 299] */ - public async listLLMObsAnnotationQueues( + public async getLLMObsPrompt( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: LLMObsAnnotationQueuesResponse = deserialize( + const body: LLMObsPromptSDKResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsAnnotationQueuesResponse", - ) as LLMObsAnnotationQueuesResponse; + "LLMObsPromptSDKResponse", + ) as LLMObsPromptSDKResponse; return body; } if ( - response.httpStatusCode === 400 || response.httpStatusCode === 401 || - response.httpStatusCode === 403 + response.httpStatusCode === 403 || + response.httpStatusCode === 404 ) { const bodyText = parse(await response.body.text(), contentType); let body: JSONAPIErrorResponse; @@ -6781,12 +7586,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsAnnotationQueuesResponse = deserialize( + const body: LLMObsPromptSDKResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsAnnotationQueuesResponse", + "LLMObsPromptSDKResponse", "", - ) as LLMObsAnnotationQueuesResponse; + ) as LLMObsPromptSDKResponse; return body; } @@ -6801,19 +7606,19 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to listLLMObsDatasetRecords + * @params response Response returned by the server for a request to getLLMObsPromptVersion * @throws ApiException if the response code was not in [200, 299] */ - public async listLLMObsDatasetRecords( + public async getLLMObsPromptVersion( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: LLMObsDatasetRecordsListResponse = deserialize( + const body: LLMObsPromptVersionResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetRecordsListResponse", - ) as LLMObsDatasetRecordsListResponse; + "LLMObsPromptVersionResponse", + ) as LLMObsPromptVersionResponse; return body; } if ( @@ -6863,12 +7668,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsDatasetRecordsListResponse = deserialize( + const body: LLMObsPromptVersionResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetRecordsListResponse", + "LLMObsPromptVersionResponse", "", - ) as LLMObsDatasetRecordsListResponse; + ) as LLMObsPromptVersionResponse; return body; } @@ -6883,26 +7688,189 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to listLLMObsDatasets + * @params response Response returned by the server for a request to listLLMObsAnnotationQueues * @throws ApiException if the response code was not in [200, 299] */ - public async listLLMObsDatasets( + public async listLLMObsAnnotationQueues( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: LLMObsDatasetsResponse = deserialize( + const body: LLMObsAnnotationQueuesResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetsResponse", - ) as LLMObsDatasetsResponse; + "LLMObsAnnotationQueuesResponse", + ) as LLMObsAnnotationQueuesResponse; return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 + response.httpStatusCode === 403 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsAnnotationQueuesResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsAnnotationQueuesResponse", + "", + ) as LLMObsAnnotationQueuesResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listLLMObsDatasetRecords + * @throws ApiException if the response code was not in [200, 299] + */ + public async listLLMObsDatasetRecords( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsDatasetRecordsListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetRecordsListResponse", + ) as LLMObsDatasetRecordsListResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsDatasetRecordsListResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetRecordsListResponse", + "", + ) as LLMObsDatasetRecordsListResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listLLMObsDatasets + * @throws ApiException if the response code was not in [200, 299] + */ + public async listLLMObsDatasets( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsDatasetsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetsResponse", + ) as LLMObsDatasetsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 ) { const bodyText = parse(await response.body.text(), contentType); let body: JSONAPIErrorResponse; @@ -8031,6 +8999,160 @@ export class LLMObservabilityApiResponseProcessor { ); } + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listLLMObsPrompts + * @throws ApiException if the response code was not in [200, 299] + */ + public async listLLMObsPrompts( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsPromptsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptsResponse", + ) as LLMObsPromptsResponse; + return body; + } + if (response.httpStatusCode === 401 || response.httpStatusCode === 403) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsPromptsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptsResponse", + "", + ) as LLMObsPromptsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to listLLMObsPromptVersions + * @throws ApiException if the response code was not in [200, 299] + */ + public async listLLMObsPromptVersions( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsPromptVersionsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptVersionsResponse", + ) as LLMObsPromptVersionsResponse; + return body; + } + if (response.httpStatusCode === 401 || response.httpStatusCode === 403) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsPromptVersionsResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsPromptVersionsResponse", + "", + ) as LLMObsPromptVersionsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + /** * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects @@ -8908,19 +10030,183 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateLLMObsDataset + * @params response Response returned by the server for a request to updateLLMObsDataset + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateLLMObsDataset( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsDatasetResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetResponse", + ) as LLMObsDatasetResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsDatasetResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetResponse", + "", + ) as LLMObsDatasetResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateLLMObsDatasetRecords + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateLLMObsDatasetRecords( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: LLMObsDatasetRecordsMutationResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetRecordsMutationResponse", + ) as LLMObsDatasetRecordsMutationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: JSONAPIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "JSONAPIErrorResponse", + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException( + response.httpStatusCode, + body, + ); + } + if (response.httpStatusCode === 429) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "APIErrorResponse", + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText, + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: LLMObsDatasetRecordsMutationResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "LLMObsDatasetRecordsMutationResponse", + "", + ) as LLMObsDatasetRecordsMutationResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to updateLLMObsExperiment * @throws ApiException if the response code was not in [200, 299] */ - public async updateLLMObsDataset( + public async updateLLMObsExperiment( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: LLMObsDatasetResponse = deserialize( + const body: LLMObsExperimentResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetResponse", - ) as LLMObsDatasetResponse; + "LLMObsExperimentResponse", + ) as LLMObsExperimentResponse; return body; } if ( @@ -8970,12 +10256,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsDatasetResponse = deserialize( + const body: LLMObsExperimentResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetResponse", + "LLMObsExperimentResponse", "", - ) as LLMObsDatasetResponse; + ) as LLMObsExperimentResponse; return body; } @@ -8990,19 +10276,19 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateLLMObsDatasetRecords + * @params response Response returned by the server for a request to updateLLMObsProject * @throws ApiException if the response code was not in [200, 299] */ - public async updateLLMObsDatasetRecords( + public async updateLLMObsProject( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: LLMObsDatasetRecordsMutationResponse = deserialize( + const body: LLMObsProjectResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetRecordsMutationResponse", - ) as LLMObsDatasetRecordsMutationResponse; + "LLMObsProjectResponse", + ) as LLMObsProjectResponse; return body; } if ( @@ -9052,12 +10338,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsDatasetRecordsMutationResponse = deserialize( + const body: LLMObsProjectResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsDatasetRecordsMutationResponse", + "LLMObsProjectResponse", "", - ) as LLMObsDatasetRecordsMutationResponse; + ) as LLMObsProjectResponse; return body; } @@ -9072,19 +10358,19 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateLLMObsExperiment + * @params response Response returned by the server for a request to updateLLMObsPrompt * @throws ApiException if the response code was not in [200, 299] */ - public async updateLLMObsExperiment( + public async updateLLMObsPrompt( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: LLMObsExperimentResponse = deserialize( + const body: LLMObsPromptResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsExperimentResponse", - ) as LLMObsExperimentResponse; + "LLMObsPromptResponse", + ) as LLMObsPromptResponse; return body; } if ( @@ -9134,12 +10420,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsExperimentResponse = deserialize( + const body: LLMObsPromptResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsExperimentResponse", + "LLMObsPromptResponse", "", - ) as LLMObsExperimentResponse; + ) as LLMObsPromptResponse; return body; } @@ -9154,19 +10440,19 @@ export class LLMObservabilityApiResponseProcessor { * Unwraps the actual response sent by the server from the response context and deserializes the response content * to the expected objects * - * @params response Response returned by the server for a request to updateLLMObsProject + * @params response Response returned by the server for a request to updateLLMObsPromptVersion * @throws ApiException if the response code was not in [200, 299] */ - public async updateLLMObsProject( + public async updateLLMObsPromptVersion( response: ResponseContext, - ): Promise { + ): Promise { const contentType = normalizeMediaType(response.headers["content-type"]); if (response.httpStatusCode === 200) { - const body: LLMObsProjectResponse = deserialize( + const body: LLMObsPromptVersionResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsProjectResponse", - ) as LLMObsProjectResponse; + "LLMObsPromptVersionResponse", + ) as LLMObsPromptVersionResponse; return body; } if ( @@ -9216,12 +10502,12 @@ export class LLMObservabilityApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: LLMObsProjectResponse = deserialize( + const body: LLMObsPromptVersionResponse = deserialize( parse(await response.body.text(), contentType), TypingInfo, - "LLMObsProjectResponse", + "LLMObsPromptVersionResponse", "", - ) as LLMObsProjectResponse; + ) as LLMObsPromptVersionResponse; return body; } @@ -9613,6 +10899,27 @@ export interface LLMObservabilityApiCreateLLMObsProjectRequest { body: LLMObsProjectRequest; } +export interface LLMObservabilityApiCreateLLMObsPromptRequest { + /** + * Create prompt payload. + * @type LLMObsCreatePromptRequest + */ + body: LLMObsCreatePromptRequest; +} + +export interface LLMObservabilityApiCreateLLMObsPromptVersionRequest { + /** + * The customer-provided identifier of the LLM Observability prompt. + * @type string + */ + promptId: string; + /** + * Create prompt version payload. + * @type LLMObsCreatePromptVersionRequest + */ + body: LLMObsCreatePromptVersionRequest; +} + export interface LLMObservabilityApiDeleteLLMObsAnnotationQueueRequest { /** * The ID of the LLM Observability annotation queue. @@ -9718,6 +11025,14 @@ export interface LLMObservabilityApiDeleteLLMObsProjectsRequest { body: LLMObsDeleteProjectsRequest; } +export interface LLMObservabilityApiDeleteLLMObsPromptRequest { + /** + * The customer-provided identifier of the LLM Observability prompt. + * @type string + */ + promptId: string; +} + export interface LLMObservabilityApiExportLLMObsDatasetRequest { /** * The ID of the LLM Observability project. @@ -9804,6 +11119,32 @@ export interface LLMObservabilityApiGetLLMObsPatternsRunStatusRequest { configId: string; } +export interface LLMObservabilityApiGetLLMObsPromptRequest { + /** + * The customer-provided identifier of the LLM Observability prompt. + * @type string + */ + promptId: string; + /** + * **Deprecated.** Optional label of the prompt version to return. Do not use this parameter for new integrations. If omitted, the latest version is returned. If the prompt has no labels, the latest version is returned even when a label is requested. If the prompt has labels but none match the requested label, a 404 response is returned. + * @type string + */ + label?: string; +} + +export interface LLMObservabilityApiGetLLMObsPromptVersionRequest { + /** + * The customer-provided identifier of the LLM Observability prompt. + * @type string + */ + promptId: string; + /** + * The version number of the LLM Observability prompt. + * @type number + */ + version: number; +} + export interface LLMObservabilityApiListLLMObsAnnotationQueuesRequest { /** * Filter annotation queues by project ID. Cannot be used together with `queueIds`. @@ -10088,6 +11429,22 @@ export interface LLMObservabilityApiListLLMObsProjectsRequest { pageLimit?: number; } +export interface LLMObservabilityApiListLLMObsPromptsRequest { + /** + * Optional filter for prompts by prompt ID. + * @type string + */ + filterPromptId?: string; +} + +export interface LLMObservabilityApiListLLMObsPromptVersionsRequest { + /** + * The customer-provided identifier of the LLM Observability prompt. + * @type string + */ + promptId: string; +} + export interface LLMObservabilityApiListLLMObsSpansRequest { /** * Start of the time range. Accepts ISO 8601 or relative format (e.g., `now-15m`). Defaults to `now-15m`. @@ -10328,6 +11685,37 @@ export interface LLMObservabilityApiUpdateLLMObsProjectRequest { body: LLMObsProjectUpdateRequest; } +export interface LLMObservabilityApiUpdateLLMObsPromptRequest { + /** + * The customer-provided identifier of the LLM Observability prompt. + * @type string + */ + promptId: string; + /** + * Update prompt payload. + * @type LLMObsUpdatePromptRequest + */ + body: LLMObsUpdatePromptRequest; +} + +export interface LLMObservabilityApiUpdateLLMObsPromptVersionRequest { + /** + * The customer-provided identifier of the LLM Observability prompt. + * @type string + */ + promptId: string; + /** + * The version number of the LLM Observability prompt. + * @type number + */ + version: number; + /** + * Update prompt version payload. + * @type LLMObsUpdatePromptVersionRequest + */ + body: LLMObsUpdatePromptVersionRequest; +} + export interface LLMObservabilityApiUploadLLMObsDatasetRecordsFileRequest { /** * The ID of the LLM Observability project. @@ -10678,6 +12066,51 @@ export class LLMObservabilityApi { }); } + /** + * Create a new prompt (and its first version) in the LLM Observability prompt registry. + * @param param The request object + */ + public createLLMObsPrompt( + param: LLMObservabilityApiCreateLLMObsPromptRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.createLLMObsPrompt( + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createLLMObsPrompt(responseContext); + }); + }); + } + + /** + * Create a new version of an existing LLM Observability prompt. + * @param param The request object + */ + public createLLMObsPromptVersion( + param: LLMObservabilityApiCreateLLMObsPromptVersionRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.createLLMObsPromptVersion( + param.promptId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createLLMObsPromptVersion( + responseContext, + ); + }); + }); + } + /** * Delete an annotation queue by its ID. * @param param The request object @@ -10903,6 +12336,27 @@ export class LLMObservabilityApi { }); } + /** + * Soft-delete an LLM Observability prompt. The prompt's version rows are retained, but they are no longer accessible through the public prompt registry endpoints. + * @param param The request object + */ + public deleteLLMObsPrompt( + param: LLMObservabilityApiDeleteLLMObsPromptRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.deleteLLMObsPrompt( + param.promptId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteLLMObsPrompt(responseContext); + }); + }); + } + /** * Download the contents of a dataset as a CSV file. The download is streamed and includes one row per dataset record. * @param param The request object @@ -11092,6 +12546,50 @@ export class LLMObservabilityApi { }); } + /** + * Get the latest version of an LLM Observability prompt by prompt ID. + * @param param The request object + */ + public getLLMObsPrompt( + param: LLMObservabilityApiGetLLMObsPromptRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getLLMObsPrompt( + param.promptId, + param.label, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getLLMObsPrompt(responseContext); + }); + }); + } + + /** + * Get the full template of a single, specific version of an LLM Observability prompt. + * @param param The request object + */ + public getLLMObsPromptVersion( + param: LLMObservabilityApiGetLLMObsPromptVersionRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getLLMObsPromptVersion( + param.promptId, + param.version, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getLLMObsPromptVersion(responseContext); + }); + }); + } + /** * List annotation queues. Optionally filter by project ID or queue IDs. These parameters are mutually exclusive. * If neither is provided, all queues in the organization are returned. @@ -11494,6 +12992,50 @@ export class LLMObservabilityApi { }); } + /** + * List all LLM Observability prompts in the prompt registry for the organization. + * @param param The request object + */ + public listLLMObsPrompts( + param: LLMObservabilityApiListLLMObsPromptsRequest = {}, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.listLLMObsPrompts( + param.filterPromptId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listLLMObsPrompts(responseContext); + }); + }); + } + + /** + * List all versions of an LLM Observability prompt, ordered newest to oldest. If the prompt does not exist, is not registered, or is archived, the response contains an empty list. + * @param param The request object + */ + public listLLMObsPromptVersions( + param: LLMObservabilityApiListLLMObsPromptVersionsRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.listLLMObsPromptVersions( + param.promptId, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listLLMObsPromptVersions( + responseContext, + ); + }); + }); + } + /** * List LLM Observability spans matching the specified filters. * @param param The request object @@ -11867,6 +13409,53 @@ export class LLMObservabilityApi { }); } + /** + * Update the title, the description, or both, for an LLM Observability prompt. + * @param param The request object + */ + public updateLLMObsPrompt( + param: LLMObservabilityApiUpdateLLMObsPromptRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateLLMObsPrompt( + param.promptId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateLLMObsPrompt(responseContext); + }); + }); + } + + /** + * Update the description, the feature-flag environments, or both, for a specific version of an LLM Observability prompt. + * @param param The request object + */ + public updateLLMObsPromptVersion( + param: LLMObservabilityApiUpdateLLMObsPromptVersionRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateLLMObsPromptVersion( + param.promptId, + param.version, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateLLMObsPromptVersion( + responseContext, + ); + }); + }); + } + /** * Upload records to a dataset from a file. The request is a `multipart/form-data` upload containing a single `file` part. * Currently only CSV is supported. The CSV must include an `input` column. Optional columns are `id`, `expected_output`, `metadata`, and `tags`. diff --git a/services/llm_observability/src/v2/index.ts b/services/llm_observability/src/v2/index.ts index b9c0fc1b0a80..7e56a63e1c29 100644 --- a/services/llm_observability/src/v2/index.ts +++ b/services/llm_observability/src/v2/index.ts @@ -10,6 +10,8 @@ export { LLMObservabilityApiCreateLLMObsExperimentEventsRequest, LLMObservabilityApiCreateLLMObsIntegrationInferenceRequest, LLMObservabilityApiCreateLLMObsProjectRequest, + LLMObservabilityApiCreateLLMObsPromptRequest, + LLMObservabilityApiCreateLLMObsPromptVersionRequest, LLMObservabilityApiDeleteLLMObsAnnotationQueueRequest, LLMObservabilityApiDeleteLLMObsAnnotationQueueInteractionsRequest, LLMObservabilityApiDeleteLLMObsAnnotationsRequest, @@ -20,6 +22,7 @@ export { LLMObservabilityApiDeleteLLMObsExperimentsRequest, LLMObservabilityApiDeleteLLMObsPatternsConfigRequest, LLMObservabilityApiDeleteLLMObsProjectsRequest, + LLMObservabilityApiDeleteLLMObsPromptRequest, LLMObservabilityApiExportLLMObsDatasetRequest, LLMObservabilityApiGetLLMObsAnnotatedInteractionsRequest, LLMObservabilityApiGetLLMObsAnnotatedInteractionsByTraceIDsRequest, @@ -27,6 +30,8 @@ export { LLMObservabilityApiGetLLMObsCustomEvalConfigRequest, LLMObservabilityApiGetLLMObsDatasetDraftStateRequest, LLMObservabilityApiGetLLMObsPatternsRunStatusRequest, + LLMObservabilityApiGetLLMObsPromptRequest, + LLMObservabilityApiGetLLMObsPromptVersionRequest, LLMObservabilityApiListLLMObsAnnotationQueuesRequest, LLMObservabilityApiListLLMObsDatasetRecordsRequest, LLMObservabilityApiListLLMObsDatasetVersionsRequest, @@ -42,6 +47,8 @@ export { LLMObservabilityApiListLLMObsPatternsTopicsRequest, LLMObservabilityApiListLLMObsPatternsTopicsWithClusteredPointsRequest, LLMObservabilityApiListLLMObsProjectsRequest, + LLMObservabilityApiListLLMObsPromptVersionsRequest, + LLMObservabilityApiListLLMObsPromptsRequest, LLMObservabilityApiListLLMObsSpansRequest, LLMObservabilityApiLockLLMObsDatasetDraftStateRequest, LLMObservabilityApiRestoreLLMObsDatasetVersionRequest, @@ -57,6 +64,8 @@ export { LLMObservabilityApiUpdateLLMObsDatasetRecordsRequest, LLMObservabilityApiUpdateLLMObsExperimentRequest, LLMObservabilityApiUpdateLLMObsProjectRequest, + LLMObservabilityApiUpdateLLMObsPromptRequest, + LLMObservabilityApiUpdateLLMObsPromptVersionRequest, LLMObservabilityApiUploadLLMObsDatasetRecordsFileRequest, LLMObservabilityApiUpsertLLMObsAnnotationsRequest, LLMObservabilityApiUpsertLLMObsPatternsConfigRequest, @@ -132,6 +141,12 @@ export { LLMObsContentBlockHeaderLevel } from "./models/LLMObsContentBlockHeader export { LLMObsContentBlockLLMObsTraceInteractionType } from "./models/LLMObsContentBlockLLMObsTraceInteractionType"; export { LLMObsContentBlockTimeFrame } from "./models/LLMObsContentBlockTimeFrame"; export { LLMObsContentBlockType } from "./models/LLMObsContentBlockType"; +export { LLMObsCreatePromptData } from "./models/LLMObsCreatePromptData"; +export { LLMObsCreatePromptDataAttributes } from "./models/LLMObsCreatePromptDataAttributes"; +export { LLMObsCreatePromptRequest } from "./models/LLMObsCreatePromptRequest"; +export { LLMObsCreatePromptVersionData } from "./models/LLMObsCreatePromptVersionData"; +export { LLMObsCreatePromptVersionDataAttributes } from "./models/LLMObsCreatePromptVersionDataAttributes"; +export { LLMObsCreatePromptVersionRequest } from "./models/LLMObsCreatePromptVersionRequest"; export { LLMObsCursorMeta } from "./models/LLMObsCursorMeta"; export { LLMObsCustomEvalConfigAssessmentCriteria } from "./models/LLMObsCustomEvalConfigAssessmentCriteria"; export { LLMObsCustomEvalConfigAttributes } from "./models/LLMObsCustomEvalConfigAttributes"; @@ -225,6 +240,9 @@ export { LLMObsDeleteDatasetRecordsRequest } from "./models/LLMObsDeleteDatasetR export { LLMObsDeleteDatasetsDataAttributesRequest } from "./models/LLMObsDeleteDatasetsDataAttributesRequest"; export { LLMObsDeleteDatasetsDataRequest } from "./models/LLMObsDeleteDatasetsDataRequest"; export { LLMObsDeleteDatasetsRequest } from "./models/LLMObsDeleteDatasetsRequest"; +export { LLMObsDeletedPromptData } from "./models/LLMObsDeletedPromptData"; +export { LLMObsDeletedPromptDataAttributes } from "./models/LLMObsDeletedPromptDataAttributes"; +export { LLMObsDeletedPromptResponse } from "./models/LLMObsDeletedPromptResponse"; export { LLMObsDeleteExperimentsDataAttributesRequest } from "./models/LLMObsDeleteExperimentsDataAttributesRequest"; export { LLMObsDeleteExperimentsDataRequest } from "./models/LLMObsDeleteExperimentsDataRequest"; export { LLMObsDeleteExperimentsRequest } from "./models/LLMObsDeleteExperimentsRequest"; @@ -383,6 +401,26 @@ export { LLMObsProjectType } from "./models/LLMObsProjectType"; export { LLMObsProjectUpdateDataAttributesRequest } from "./models/LLMObsProjectUpdateDataAttributesRequest"; export { LLMObsProjectUpdateDataRequest } from "./models/LLMObsProjectUpdateDataRequest"; export { LLMObsProjectUpdateRequest } from "./models/LLMObsProjectUpdateRequest"; +export { LLMObsPromptChatMessage } from "./models/LLMObsPromptChatMessage"; +export { LLMObsPromptData } from "./models/LLMObsPromptData"; +export { LLMObsPromptDataAttributes } from "./models/LLMObsPromptDataAttributes"; +export { LLMObsPromptDataset } from "./models/LLMObsPromptDataset"; +export { LLMObsPromptResponse } from "./models/LLMObsPromptResponse"; +export { LLMObsPromptResponseSource } from "./models/LLMObsPromptResponseSource"; +export { LLMObsPromptSDKData } from "./models/LLMObsPromptSDKData"; +export { LLMObsPromptSDKDataAttributes } from "./models/LLMObsPromptSDKDataAttributes"; +export { LLMObsPromptSDKResponse } from "./models/LLMObsPromptSDKResponse"; +export { LLMObsPromptsResponse } from "./models/LLMObsPromptsResponse"; +export { LLMObsPromptTemplate } from "./models/LLMObsPromptTemplate"; +export { LLMObsPromptType } from "./models/LLMObsPromptType"; +export { LLMObsPromptVersionData } from "./models/LLMObsPromptVersionData"; +export { LLMObsPromptVersionDataAttributes } from "./models/LLMObsPromptVersionDataAttributes"; +export { LLMObsPromptVersionLabel } from "./models/LLMObsPromptVersionLabel"; +export { LLMObsPromptVersionListData } from "./models/LLMObsPromptVersionListData"; +export { LLMObsPromptVersionListDataAttributes } from "./models/LLMObsPromptVersionListDataAttributes"; +export { LLMObsPromptVersionResponse } from "./models/LLMObsPromptVersionResponse"; +export { LLMObsPromptVersionsResponse } from "./models/LLMObsPromptVersionsResponse"; +export { LLMObsPromptVersionType } from "./models/LLMObsPromptVersionType"; export { LLMObsRecordType } from "./models/LLMObsRecordType"; export { LLMObsSearchSpansRequest } from "./models/LLMObsSearchSpansRequest"; export { LLMObsSearchSpansRequestAttributes } from "./models/LLMObsSearchSpansRequestAttributes"; @@ -408,5 +446,11 @@ export { LLMObsTraceAnnotatedInteractionItem } from "./models/LLMObsTraceAnnotat export { LLMObsTraceInteractionItem } from "./models/LLMObsTraceInteractionItem"; export { LLMObsTraceInteractionResponseItem } from "./models/LLMObsTraceInteractionResponseItem"; export { LLMObsTraceInteractionType } from "./models/LLMObsTraceInteractionType"; +export { LLMObsUpdatePromptData } from "./models/LLMObsUpdatePromptData"; +export { LLMObsUpdatePromptDataAttributes } from "./models/LLMObsUpdatePromptDataAttributes"; +export { LLMObsUpdatePromptRequest } from "./models/LLMObsUpdatePromptRequest"; +export { LLMObsUpdatePromptVersionData } from "./models/LLMObsUpdatePromptVersionData"; +export { LLMObsUpdatePromptVersionDataAttributes } from "./models/LLMObsUpdatePromptVersionDataAttributes"; +export { LLMObsUpdatePromptVersionRequest } from "./models/LLMObsUpdatePromptVersionRequest"; export { LLMObsUpsertAnnotationItem } from "./models/LLMObsUpsertAnnotationItem"; export { LLMObsVertexAIMetadata } from "./models/LLMObsVertexAIMetadata"; diff --git a/services/llm_observability/src/v2/models/LLMObsCreatePromptData.ts b/services/llm_observability/src/v2/models/LLMObsCreatePromptData.ts new file mode 100644 index 000000000000..9d4d016a2875 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsCreatePromptData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsCreatePromptDataAttributes } from "./LLMObsCreatePromptDataAttributes"; +import { LLMObsPromptType } from "./LLMObsPromptType"; + +/** + * Data object for creating an LLM Observability prompt. + */ +export class LLMObsCreatePromptData { + /** + * Attributes for creating an LLM Observability prompt and its first version. `prompt_id` and `template` are required; all other attributes are optional. + */ + "attributes": LLMObsCreatePromptDataAttributes; + /** + * Resource type of an LLM Observability prompt. + */ + "type": LLMObsPromptType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsCreatePromptDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsCreatePromptData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsCreatePromptDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsCreatePromptDataAttributes.ts new file mode 100644 index 000000000000..c33f560d2ddf --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsCreatePromptDataAttributes.ts @@ -0,0 +1,97 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptTemplate } from "./LLMObsPromptTemplate"; +import { LLMObsPromptVersionLabel } from "./LLMObsPromptVersionLabel"; + +/** + * Attributes for creating an LLM Observability prompt and its first version. `prompt_id` and `template` are required; all other attributes are optional. + */ +export class LLMObsCreatePromptDataAttributes { + /** + * Optional description of the prompt. + */ + "description"?: string; + /** + * Optional feature-flag environment UUIDs the service attempts to enable and configure to use the first version as their default after creation. + */ + "envIds"?: Array; + /** + * Optional labels to attach to the first version. Do not use this attribute for new integrations. + */ + "labels"?: Array; + /** + * Customer-provided identifier for the new prompt. + */ + "promptId": string; + /** + * A text template or a list of chat messages. + */ + "template": LLMObsPromptTemplate; + /** + * Optional title of the prompt. + */ + "title"?: string; + /** + * Optional user-supplied version identifier for the first version. + */ + "userVersion"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + envIds: { + baseName: "env_ids", + type: "Array", + }, + labels: { + baseName: "labels", + type: "Array", + }, + promptId: { + baseName: "prompt_id", + type: "string", + required: true, + }, + template: { + baseName: "template", + type: "LLMObsPromptTemplate", + required: true, + }, + title: { + baseName: "title", + type: "string", + }, + userVersion: { + baseName: "user_version", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsCreatePromptDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsCreatePromptRequest.ts b/services/llm_observability/src/v2/models/LLMObsCreatePromptRequest.ts new file mode 100644 index 000000000000..b1025373b0d8 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsCreatePromptRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsCreatePromptData } from "./LLMObsCreatePromptData"; + +/** + * Request to create an LLM Observability prompt. + */ +export class LLMObsCreatePromptRequest { + /** + * Data object for creating an LLM Observability prompt. + */ + "data": LLMObsCreatePromptData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsCreatePromptData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsCreatePromptRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionData.ts b/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionData.ts new file mode 100644 index 000000000000..882af30fad2f --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsCreatePromptVersionDataAttributes } from "./LLMObsCreatePromptVersionDataAttributes"; +import { LLMObsPromptVersionType } from "./LLMObsPromptVersionType"; + +/** + * Data object for creating an LLM Observability prompt version. + */ +export class LLMObsCreatePromptVersionData { + /** + * Attributes for creating a new version of an LLM Observability prompt. `template` is required; all other attributes are optional. + */ + "attributes": LLMObsCreatePromptVersionDataAttributes; + /** + * Resource type of an LLM Observability prompt version. + */ + "type": LLMObsPromptVersionType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsCreatePromptVersionDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptVersionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsCreatePromptVersionData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionDataAttributes.ts new file mode 100644 index 000000000000..ed396e613908 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionDataAttributes.ts @@ -0,0 +1,80 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptTemplate } from "./LLMObsPromptTemplate"; +import { LLMObsPromptVersionLabel } from "./LLMObsPromptVersionLabel"; + +/** + * Attributes for creating a new version of an LLM Observability prompt. `template` is required; all other attributes are optional. + */ +export class LLMObsCreatePromptVersionDataAttributes { + /** + * Optional description of this version. + */ + "description"?: string; + /** + * Optional feature-flag environment UUIDs the service attempts to enable and configure to use this version as their default after creation. + */ + "envIds"?: Array; + /** + * Optional labels to attach to this version. Do not use this attribute for new integrations. + */ + "labels"?: Array; + /** + * A text template or a list of chat messages. + */ + "template": LLMObsPromptTemplate; + /** + * Optional user-supplied version identifier for this version. + */ + "userVersion"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + envIds: { + baseName: "env_ids", + type: "Array", + }, + labels: { + baseName: "labels", + type: "Array", + }, + template: { + baseName: "template", + type: "LLMObsPromptTemplate", + required: true, + }, + userVersion: { + baseName: "user_version", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsCreatePromptVersionDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionRequest.ts b/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionRequest.ts new file mode 100644 index 000000000000..54625962bbfe --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsCreatePromptVersionRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsCreatePromptVersionData } from "./LLMObsCreatePromptVersionData"; + +/** + * Request to create a new version of an LLM Observability prompt. + */ +export class LLMObsCreatePromptVersionRequest { + /** + * Data object for creating an LLM Observability prompt version. + */ + "data": LLMObsCreatePromptVersionData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsCreatePromptVersionData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsCreatePromptVersionRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsDeletedPromptData.ts b/services/llm_observability/src/v2/models/LLMObsDeletedPromptData.ts new file mode 100644 index 000000000000..f772ffe90577 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsDeletedPromptData.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsDeletedPromptDataAttributes } from "./LLMObsDeletedPromptDataAttributes"; +import { LLMObsPromptType } from "./LLMObsPromptType"; + +/** + * Data object confirming that an LLM Observability prompt was deleted. + */ +export class LLMObsDeletedPromptData { + /** + * Attributes confirming that an LLM Observability prompt was deleted. + */ + "attributes": LLMObsDeletedPromptDataAttributes; + /** + * Unique identifier of the deleted prompt. + */ + "id": string; + /** + * Resource type of an LLM Observability prompt. + */ + "type": LLMObsPromptType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsDeletedPromptDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsDeletedPromptData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsDeletedPromptDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsDeletedPromptDataAttributes.ts new file mode 100644 index 000000000000..9b83be71c77f --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsDeletedPromptDataAttributes.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes confirming that an LLM Observability prompt was deleted. + */ +export class LLMObsDeletedPromptDataAttributes { + /** + * Timestamp when the prompt was deleted. + */ + "deletedAt": Date; + /** + * Customer-provided identifier of the deleted prompt. + */ + "promptId": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + deletedAt: { + baseName: "deleted_at", + type: "Date", + required: true, + format: "date-time", + }, + promptId: { + baseName: "prompt_id", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsDeletedPromptDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsDeletedPromptResponse.ts b/services/llm_observability/src/v2/models/LLMObsDeletedPromptResponse.ts new file mode 100644 index 000000000000..f26ef7dc3dfa --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsDeletedPromptResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsDeletedPromptData } from "./LLMObsDeletedPromptData"; + +/** + * Response confirming that an LLM Observability prompt was deleted. + */ +export class LLMObsDeletedPromptResponse { + /** + * Data object confirming that an LLM Observability prompt was deleted. + */ + "data": LLMObsDeletedPromptData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsDeletedPromptData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsDeletedPromptResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptChatMessage.ts b/services/llm_observability/src/v2/models/LLMObsPromptChatMessage.ts new file mode 100644 index 000000000000..6c3f04c42eeb --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptChatMessage.ts @@ -0,0 +1,54 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * A single chat message in a prompt template. + */ +export class LLMObsPromptChatMessage { + /** + * Content of the message. + */ + "content": string; + /** + * Role of the message (for example `system`, `user`, or `assistant`). + */ + "role": string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + content: { + baseName: "content", + type: "string", + required: true, + }, + role: { + baseName: "role", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptChatMessage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptData.ts b/services/llm_observability/src/v2/models/LLMObsPromptData.ts new file mode 100644 index 000000000000..d94806ff41b0 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptData.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptDataAttributes } from "./LLMObsPromptDataAttributes"; +import { LLMObsPromptType } from "./LLMObsPromptType"; + +/** + * Data object for an LLM Observability prompt. + */ +export class LLMObsPromptData { + /** + * Attributes of an LLM Observability prompt registry entry. + */ + "attributes": LLMObsPromptDataAttributes; + /** + * Unique identifier of the prompt. + */ + "id": string; + /** + * Resource type of an LLM Observability prompt. + */ + "type": LLMObsPromptType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsPromptDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsPromptDataAttributes.ts new file mode 100644 index 000000000000..3ea8db12d1b7 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptDataAttributes.ts @@ -0,0 +1,176 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptDataset } from "./LLMObsPromptDataset"; +import { LLMObsPromptResponseSource } from "./LLMObsPromptResponseSource"; + +/** + * Attributes of an LLM Observability prompt registry entry. + */ +export class LLMObsPromptDataAttributes { + /** + * UUID of the user who authored the prompt. + */ + "author"?: string; + /** + * Timestamp when the prompt was created. + */ + "createdAt"?: Date; + /** + * Source that created the prompt, such as `ui-registry`, `sdk-registry`, or `sdk-instrumentation`. + */ + "createdFrom": string; + /** + * Datasets observed in runs associated with this prompt. + */ + "datasets"?: Array; + /** + * Description of the prompt. + */ + "description"?: string; + /** + * Source prompt from which this prompt was extracted, when applicable. + */ + "extractedFrom"?: string; + /** + * Whether the prompt is a registry entry (as opposed to a code-discovered prompt). + */ + "inRegistry": boolean; + /** + * Timestamp of the most recent observed run of this prompt. + */ + "lastSeenAt"?: Date; + /** + * Timestamp when the most recent version of the prompt was created. + */ + "lastVersionCreatedAt"?: Date; + /** + * The ML application this prompt is associated with. + */ + "mlApp"?: string; + /** + * ML applications observed running this prompt. + */ + "mlApps"?: Array; + /** + * Number of versions of the prompt. + */ + "numVersions": number; + /** + * Customer-provided identifier of the prompt. + */ + "promptId": string; + /** + * Whether the prompt was created from the registry or discovered from observed LLM calls. + */ + "source": LLMObsPromptResponseSource; + /** + * Tags observed on runs of this prompt. + */ + "tags"?: Array; + /** + * Title of the prompt. + */ + "title"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + author: { + baseName: "author", + type: "string", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + createdFrom: { + baseName: "created_from", + type: "string", + required: true, + }, + datasets: { + baseName: "datasets", + type: "Array", + }, + description: { + baseName: "description", + type: "string", + }, + extractedFrom: { + baseName: "extracted_from", + type: "string", + }, + inRegistry: { + baseName: "in_registry", + type: "boolean", + required: true, + }, + lastSeenAt: { + baseName: "last_seen_at", + type: "Date", + format: "date-time", + }, + lastVersionCreatedAt: { + baseName: "last_version_created_at", + type: "Date", + format: "date-time", + }, + mlApp: { + baseName: "ml_app", + type: "string", + }, + mlApps: { + baseName: "ml_apps", + type: "Array", + }, + numVersions: { + baseName: "num_versions", + type: "number", + required: true, + format: "int64", + }, + promptId: { + baseName: "prompt_id", + type: "string", + required: true, + }, + source: { + baseName: "source", + type: "LLMObsPromptResponseSource", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + title: { + baseName: "title", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptDataset.ts b/services/llm_observability/src/v2/models/LLMObsPromptDataset.ts new file mode 100644 index 000000000000..1f392f6daa2c --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptDataset.ts @@ -0,0 +1,53 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * A dataset observed in runs associated with a prompt or prompt version. + */ +export class LLMObsPromptDataset { + /** + * Unique identifier of the dataset. + */ + "id": string; + /** + * Name of the dataset. + */ + "name"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptDataset.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptResponse.ts b/services/llm_observability/src/v2/models/LLMObsPromptResponse.ts new file mode 100644 index 000000000000..67364581cb91 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptData } from "./LLMObsPromptData"; + +/** + * Response containing a single LLM Observability prompt. + */ +export class LLMObsPromptResponse { + /** + * Data object for an LLM Observability prompt. + */ + "data": LLMObsPromptData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsPromptData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptResponseSource.ts b/services/llm_observability/src/v2/models/LLMObsPromptResponseSource.ts new file mode 100644 index 000000000000..d2ad3d5a6b58 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptResponseSource.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Whether the prompt was created from the registry or discovered from observed LLM calls. + */ +export type LLMObsPromptResponseSource = + | typeof REGISTRY + | typeof CODE + | UnparsedObject; +export const REGISTRY = "registry"; +export const CODE = "code"; diff --git a/services/llm_observability/src/v2/models/LLMObsPromptSDKData.ts b/services/llm_observability/src/v2/models/LLMObsPromptSDKData.ts new file mode 100644 index 000000000000..00400fd23e16 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptSDKData.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptSDKDataAttributes } from "./LLMObsPromptSDKDataAttributes"; +import { LLMObsPromptType } from "./LLMObsPromptType"; + +/** + * Data object for a flattened LLM Observability prompt version returned for SDK consumption. + */ +export class LLMObsPromptSDKData { + /** + * Attributes of a flattened prompt version returned for SDK consumption. Exactly one of `template` and `chat_template` is returned. + */ + "attributes": LLMObsPromptSDKDataAttributes; + /** + * Unique identifier of the prompt. + */ + "id": string; + /** + * Resource type of an LLM Observability prompt. + */ + "type": LLMObsPromptType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsPromptSDKDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptSDKData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptSDKDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsPromptSDKDataAttributes.ts new file mode 100644 index 000000000000..e7c7b5fb1df8 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptSDKDataAttributes.ts @@ -0,0 +1,86 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptChatMessage } from "./LLMObsPromptChatMessage"; + +/** + * Attributes of a flattened prompt version returned for SDK consumption. Exactly one of `template` and `chat_template` is returned. + */ +export class LLMObsPromptSDKDataAttributes { + /** + * Chat template for this prompt version, as a list of role and content messages. Omitted for text templates. + */ + "chatTemplate"?: Array; + /** + * Labels attached to the selected version. + */ + "labels"?: Array; + /** + * Customer-provided identifier of the prompt. + */ + "promptId"?: string; + /** + * Unique identifier of this prompt version. + */ + "promptVersionUuid"?: string; + /** + * Text template for this prompt version. Omitted for chat templates. + */ + "template"?: string; + /** + * Version identifier for this prompt version. This is the sequential version number unless a user-supplied version identifier was set, in which case that identifier is used instead. + */ + "version"?: string; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + chatTemplate: { + baseName: "chat_template", + type: "Array", + }, + labels: { + baseName: "labels", + type: "Array", + }, + promptId: { + baseName: "prompt_id", + type: "string", + }, + promptVersionUuid: { + baseName: "prompt_version_uuid", + type: "string", + }, + template: { + baseName: "template", + type: "string", + }, + version: { + baseName: "version", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptSDKDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptSDKResponse.ts b/services/llm_observability/src/v2/models/LLMObsPromptSDKResponse.ts new file mode 100644 index 000000000000..4ba46ec71288 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptSDKResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptSDKData } from "./LLMObsPromptSDKData"; + +/** + * Response containing a flattened LLM Observability prompt version for SDK consumption. + */ +export class LLMObsPromptSDKResponse { + /** + * Data object for a flattened LLM Observability prompt version returned for SDK consumption. + */ + "data": LLMObsPromptSDKData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsPromptSDKData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptSDKResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptTemplate.ts b/services/llm_observability/src/v2/models/LLMObsPromptTemplate.ts new file mode 100644 index 000000000000..85b054ea4ccd --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptTemplate.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { LLMObsPromptChatMessage } from "./LLMObsPromptChatMessage"; + +/** + * A text template or a list of chat messages. + */ +export type LLMObsPromptTemplate = + | string + | Array + | UnparsedObject; diff --git a/services/llm_observability/src/v2/models/LLMObsPromptType.ts b/services/llm_observability/src/v2/models/LLMObsPromptType.ts new file mode 100644 index 000000000000..e124c2f7968d --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Resource type of an LLM Observability prompt. + */ +export type LLMObsPromptType = typeof PROMPT_TEMPLATES | UnparsedObject; +export const PROMPT_TEMPLATES = "prompt-templates"; diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionData.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionData.ts new file mode 100644 index 000000000000..629cc244c0bb --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionData.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptVersionDataAttributes } from "./LLMObsPromptVersionDataAttributes"; +import { LLMObsPromptVersionType } from "./LLMObsPromptVersionType"; + +/** + * Data object for a specific version of an LLM Observability prompt. + */ +export class LLMObsPromptVersionData { + /** + * Attributes of a specific version of an LLM Observability prompt. + */ + "attributes": LLMObsPromptVersionDataAttributes; + /** + * Unique identifier of the prompt version. + */ + "id": string; + /** + * Resource type of an LLM Observability prompt version. + */ + "type": LLMObsPromptVersionType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsPromptVersionDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptVersionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptVersionData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionDataAttributes.ts new file mode 100644 index 000000000000..609cb5f3379d --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionDataAttributes.ts @@ -0,0 +1,167 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptDataset } from "./LLMObsPromptDataset"; +import { LLMObsPromptTemplate } from "./LLMObsPromptTemplate"; + +/** + * Attributes of a specific version of an LLM Observability prompt. + */ +export class LLMObsPromptVersionDataAttributes { + /** + * UUID of the user who authored this version. + */ + "author"?: string; + /** + * Timestamp stored on this prompt version. + */ + "createdAt"?: Date; + /** + * Datasets observed in runs associated with this prompt version. + */ + "datasets"?: Array; + /** + * Description of this version. + */ + "description"?: string; + /** + * Labels attached to this version (for example `development`, `staging`, `production`). + */ + "labels"?: Array; + /** + * Timestamp of the most recent observed run of this prompt version. + */ + "lastSeenAt"?: Date; + /** + * The ML application this prompt is associated with. + */ + "mlApp"?: string; + /** + * ML applications observed running this prompt version. + */ + "mlApps"?: Array; + /** + * Customer-provided identifier of the parent prompt. + */ + "promptId": string; + /** + * Unique identifier of the parent prompt. + */ + "promptUuid": string; + /** + * Tags observed on runs of this prompt version. + */ + "tags"?: Array; + /** + * A text template or a list of chat messages. + */ + "template": LLMObsPromptTemplate; + /** + * User-supplied identifier for this version. + */ + "userVersion"?: string; + /** + * Sequential version number. + */ + "version": number; + /** + * Timestamp when this version was created. + */ + "versionCreatedAt"?: Date; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + author: { + baseName: "author", + type: "string", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + datasets: { + baseName: "datasets", + type: "Array", + }, + description: { + baseName: "description", + type: "string", + }, + labels: { + baseName: "labels", + type: "Array", + }, + lastSeenAt: { + baseName: "last_seen_at", + type: "Date", + format: "date-time", + }, + mlApp: { + baseName: "ml_app", + type: "string", + }, + mlApps: { + baseName: "ml_apps", + type: "Array", + }, + promptId: { + baseName: "prompt_id", + type: "string", + required: true, + }, + promptUuid: { + baseName: "prompt_uuid", + type: "string", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + template: { + baseName: "template", + type: "LLMObsPromptTemplate", + required: true, + }, + userVersion: { + baseName: "user_version", + type: "string", + }, + version: { + baseName: "version", + type: "number", + required: true, + format: "int64", + }, + versionCreatedAt: { + baseName: "version_created_at", + type: "Date", + format: "date-time", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptVersionDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionLabel.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionLabel.ts new file mode 100644 index 000000000000..ca70ad9d484c --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionLabel.ts @@ -0,0 +1,11 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * A label attached to an LLM Observability prompt version. + */ +export type LLMObsPromptVersionLabel = + | typeof PRODUCTION + | typeof DEVELOPMENT + | UnparsedObject; +export const PRODUCTION = "production"; +export const DEVELOPMENT = "development"; diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionListData.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionListData.ts new file mode 100644 index 000000000000..b1d260ff7eba --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionListData.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptVersionListDataAttributes } from "./LLMObsPromptVersionListDataAttributes"; +import { LLMObsPromptVersionType } from "./LLMObsPromptVersionType"; + +/** + * Data object for a prompt version returned in a list. + */ +export class LLMObsPromptVersionListData { + /** + * Attributes of a prompt version returned in a list, excluding its template. + */ + "attributes": LLMObsPromptVersionListDataAttributes; + /** + * Unique identifier of the prompt version. + */ + "id": string; + /** + * Resource type of an LLM Observability prompt version. + */ + "type": LLMObsPromptVersionType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsPromptVersionListDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptVersionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptVersionListData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionListDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionListDataAttributes.ts new file mode 100644 index 000000000000..047a388a67cb --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionListDataAttributes.ts @@ -0,0 +1,157 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptDataset } from "./LLMObsPromptDataset"; + +/** + * Attributes of a prompt version returned in a list, excluding its template. + */ +export class LLMObsPromptVersionListDataAttributes { + /** + * UUID of the user who authored this version. + */ + "author"?: string; + /** + * Timestamp stored on this prompt version. + */ + "createdAt"?: Date; + /** + * Datasets observed in runs associated with this prompt version. + */ + "datasets"?: Array; + /** + * Description of this version. + */ + "description"?: string; + /** + * Labels attached to this version (for example `development`, `staging`, `production`). + */ + "labels"?: Array; + /** + * Timestamp of the most recent observed run of this prompt version. + */ + "lastSeenAt"?: Date; + /** + * The ML application this prompt is associated with. + */ + "mlApp"?: string; + /** + * ML applications observed running this prompt version. + */ + "mlApps"?: Array; + /** + * Customer-provided identifier of the parent prompt. + */ + "promptId": string; + /** + * Unique identifier of the parent prompt. + */ + "promptUuid": string; + /** + * Tags observed on runs of this prompt version. + */ + "tags"?: Array; + /** + * User-supplied identifier for this version. + */ + "userVersion"?: string; + /** + * Sequential version number. + */ + "version": number; + /** + * Timestamp when this version was created. + */ + "versionCreatedAt"?: Date; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + author: { + baseName: "author", + type: "string", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + datasets: { + baseName: "datasets", + type: "Array", + }, + description: { + baseName: "description", + type: "string", + }, + labels: { + baseName: "labels", + type: "Array", + }, + lastSeenAt: { + baseName: "last_seen_at", + type: "Date", + format: "date-time", + }, + mlApp: { + baseName: "ml_app", + type: "string", + }, + mlApps: { + baseName: "ml_apps", + type: "Array", + }, + promptId: { + baseName: "prompt_id", + type: "string", + required: true, + }, + promptUuid: { + baseName: "prompt_uuid", + type: "string", + required: true, + }, + tags: { + baseName: "tags", + type: "Array", + }, + userVersion: { + baseName: "user_version", + type: "string", + }, + version: { + baseName: "version", + type: "number", + required: true, + format: "int64", + }, + versionCreatedAt: { + baseName: "version_created_at", + type: "Date", + format: "date-time", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptVersionListDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionResponse.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionResponse.ts new file mode 100644 index 000000000000..d806fc9a2215 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptVersionData } from "./LLMObsPromptVersionData"; + +/** + * Response containing a specific version of an LLM Observability prompt. + */ +export class LLMObsPromptVersionResponse { + /** + * Data object for a specific version of an LLM Observability prompt. + */ + "data": LLMObsPromptVersionData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsPromptVersionData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptVersionResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionType.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionType.ts new file mode 100644 index 000000000000..1693511c1004 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Resource type of an LLM Observability prompt version. + */ +export type LLMObsPromptVersionType = + | typeof PROMPT_TEMPLATE_VERSIONS + | UnparsedObject; +export const PROMPT_TEMPLATE_VERSIONS = "prompt-template-versions"; diff --git a/services/llm_observability/src/v2/models/LLMObsPromptVersionsResponse.ts b/services/llm_observability/src/v2/models/LLMObsPromptVersionsResponse.ts new file mode 100644 index 000000000000..5e087586b920 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptVersionsResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptVersionListData } from "./LLMObsPromptVersionListData"; + +/** + * Response containing the versions of an LLM Observability prompt. + */ +export class LLMObsPromptVersionsResponse { + /** + * Prompt versions ordered from newest to oldest. + */ + "data": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptVersionsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsPromptsResponse.ts b/services/llm_observability/src/v2/models/LLMObsPromptsResponse.ts new file mode 100644 index 000000000000..9fbfaf40ab98 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsPromptsResponse.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptData } from "./LLMObsPromptData"; + +/** + * Response containing a list of LLM Observability prompts. + */ +export class LLMObsPromptsResponse { + /** + * List of LLM Observability prompts. + */ + "data": Array; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsPromptsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsUpdatePromptData.ts b/services/llm_observability/src/v2/models/LLMObsUpdatePromptData.ts new file mode 100644 index 000000000000..34f8a6f3f6a1 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsUpdatePromptData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptType } from "./LLMObsPromptType"; +import { LLMObsUpdatePromptDataAttributes } from "./LLMObsUpdatePromptDataAttributes"; + +/** + * Data object for updating an LLM Observability prompt. + */ +export class LLMObsUpdatePromptData { + /** + * Attributes for updating an LLM Observability prompt. At least one of `title` or `description` must be provided; both attributes are optional individually. + */ + "attributes": LLMObsUpdatePromptDataAttributes; + /** + * Resource type of an LLM Observability prompt. + */ + "type": LLMObsPromptType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsUpdatePromptDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsUpdatePromptData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsUpdatePromptDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsUpdatePromptDataAttributes.ts new file mode 100644 index 000000000000..23e8b7765208 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsUpdatePromptDataAttributes.ts @@ -0,0 +1,42 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Attributes for updating an LLM Observability prompt. At least one of `title` or `description` must be provided; both attributes are optional individually. + */ +export class LLMObsUpdatePromptDataAttributes { + /** + * Optional new description for the prompt. + */ + "description"?: string; + /** + * Optional new title for the prompt. + */ + "title"?: string; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + title: { + baseName: "title", + type: "string", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsUpdatePromptDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsUpdatePromptRequest.ts b/services/llm_observability/src/v2/models/LLMObsUpdatePromptRequest.ts new file mode 100644 index 000000000000..2bed65304983 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsUpdatePromptRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsUpdatePromptData } from "./LLMObsUpdatePromptData"; + +/** + * Request to update an LLM Observability prompt's metadata. + */ +export class LLMObsUpdatePromptRequest { + /** + * Data object for updating an LLM Observability prompt. + */ + "data": LLMObsUpdatePromptData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsUpdatePromptData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsUpdatePromptRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionData.ts b/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionData.ts new file mode 100644 index 000000000000..11d1bb30ecd9 --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptVersionType } from "./LLMObsPromptVersionType"; +import { LLMObsUpdatePromptVersionDataAttributes } from "./LLMObsUpdatePromptVersionDataAttributes"; + +/** + * Data object for updating an LLM Observability prompt version. + */ +export class LLMObsUpdatePromptVersionData { + /** + * Attributes for updating an LLM Observability prompt version. At least one of `description`, `labels`, or `env_ids` must be provided; all three attributes are optional individually. + */ + "attributes": LLMObsUpdatePromptVersionDataAttributes; + /** + * Resource type of an LLM Observability prompt version. + */ + "type": LLMObsPromptVersionType; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "LLMObsUpdatePromptVersionDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "LLMObsPromptVersionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsUpdatePromptVersionData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionDataAttributes.ts b/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionDataAttributes.ts new file mode 100644 index 000000000000..cb051ef2e61f --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionDataAttributes.ts @@ -0,0 +1,52 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsPromptVersionLabel } from "./LLMObsPromptVersionLabel"; + +/** + * Attributes for updating an LLM Observability prompt version. At least one of `description`, `labels`, or `env_ids` must be provided; all three attributes are optional individually. + */ +export class LLMObsUpdatePromptVersionDataAttributes { + /** + * Optional new description for this version. + */ + "description"?: string; + /** + * Optional feature-flag environment UUIDs the service attempts to enable and configure to use this version as their default. + */ + "envIds"?: Array; + /** + * Optional new labels for this version. Do not use this attribute for new integrations. + */ + "labels"?: Array; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + envIds: { + baseName: "env_ids", + type: "Array", + }, + labels: { + baseName: "labels", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsUpdatePromptVersionDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionRequest.ts b/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionRequest.ts new file mode 100644 index 000000000000..e05597dac57d --- /dev/null +++ b/services/llm_observability/src/v2/models/LLMObsUpdatePromptVersionRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { LLMObsUpdatePromptVersionData } from "./LLMObsUpdatePromptVersionData"; + +/** + * Request to update an LLM Observability prompt version's metadata or feature-flag environments. + */ +export class LLMObsUpdatePromptVersionRequest { + /** + * Data object for updating an LLM Observability prompt version. + */ + "data": LLMObsUpdatePromptVersionData; + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "LLMObsUpdatePromptVersionData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return LLMObsUpdatePromptVersionRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/llm_observability/src/v2/models/TypingInfo.ts b/services/llm_observability/src/v2/models/TypingInfo.ts index 8d7ae9bc3084..03476db256ad 100644 --- a/services/llm_observability/src/v2/models/TypingInfo.ts +++ b/services/llm_observability/src/v2/models/TypingInfo.ts @@ -51,6 +51,12 @@ import { LLMObsAzureOpenAIMetadata } from "./LLMObsAzureOpenAIMetadata"; import { LLMObsBedrockMetadata } from "./LLMObsBedrockMetadata"; import { LLMObsContentBlock } from "./LLMObsContentBlock"; import { LLMObsContentBlockTimeFrame } from "./LLMObsContentBlockTimeFrame"; +import { LLMObsCreatePromptData } from "./LLMObsCreatePromptData"; +import { LLMObsCreatePromptDataAttributes } from "./LLMObsCreatePromptDataAttributes"; +import { LLMObsCreatePromptRequest } from "./LLMObsCreatePromptRequest"; +import { LLMObsCreatePromptVersionData } from "./LLMObsCreatePromptVersionData"; +import { LLMObsCreatePromptVersionDataAttributes } from "./LLMObsCreatePromptVersionDataAttributes"; +import { LLMObsCreatePromptVersionRequest } from "./LLMObsCreatePromptVersionRequest"; import { LLMObsCursorMeta } from "./LLMObsCursorMeta"; import { LLMObsCustomEvalConfigAssessmentCriteria } from "./LLMObsCustomEvalConfigAssessmentCriteria"; import { LLMObsCustomEvalConfigAttributes } from "./LLMObsCustomEvalConfigAttributes"; @@ -140,6 +146,9 @@ import { LLMObsDeleteExperimentsRequest } from "./LLMObsDeleteExperimentsRequest import { LLMObsDeleteProjectsDataAttributesRequest } from "./LLMObsDeleteProjectsDataAttributesRequest"; import { LLMObsDeleteProjectsDataRequest } from "./LLMObsDeleteProjectsDataRequest"; import { LLMObsDeleteProjectsRequest } from "./LLMObsDeleteProjectsRequest"; +import { LLMObsDeletedPromptData } from "./LLMObsDeletedPromptData"; +import { LLMObsDeletedPromptDataAttributes } from "./LLMObsDeletedPromptDataAttributes"; +import { LLMObsDeletedPromptResponse } from "./LLMObsDeletedPromptResponse"; import { LLMObsDisplayBlockAnnotatedInteractionItem } from "./LLMObsDisplayBlockAnnotatedInteractionItem"; import { LLMObsDisplayBlockInteractionItem } from "./LLMObsDisplayBlockInteractionItem"; import { LLMObsDisplayBlockInteractionResponseItem } from "./LLMObsDisplayBlockInteractionResponseItem"; @@ -267,6 +276,21 @@ import { LLMObsProjectUpdateDataAttributesRequest } from "./LLMObsProjectUpdateD import { LLMObsProjectUpdateDataRequest } from "./LLMObsProjectUpdateDataRequest"; import { LLMObsProjectUpdateRequest } from "./LLMObsProjectUpdateRequest"; import { LLMObsProjectsResponse } from "./LLMObsProjectsResponse"; +import { LLMObsPromptChatMessage } from "./LLMObsPromptChatMessage"; +import { LLMObsPromptData } from "./LLMObsPromptData"; +import { LLMObsPromptDataAttributes } from "./LLMObsPromptDataAttributes"; +import { LLMObsPromptDataset } from "./LLMObsPromptDataset"; +import { LLMObsPromptResponse } from "./LLMObsPromptResponse"; +import { LLMObsPromptSDKData } from "./LLMObsPromptSDKData"; +import { LLMObsPromptSDKDataAttributes } from "./LLMObsPromptSDKDataAttributes"; +import { LLMObsPromptSDKResponse } from "./LLMObsPromptSDKResponse"; +import { LLMObsPromptVersionData } from "./LLMObsPromptVersionData"; +import { LLMObsPromptVersionDataAttributes } from "./LLMObsPromptVersionDataAttributes"; +import { LLMObsPromptVersionListData } from "./LLMObsPromptVersionListData"; +import { LLMObsPromptVersionListDataAttributes } from "./LLMObsPromptVersionListDataAttributes"; +import { LLMObsPromptVersionResponse } from "./LLMObsPromptVersionResponse"; +import { LLMObsPromptVersionsResponse } from "./LLMObsPromptVersionsResponse"; +import { LLMObsPromptsResponse } from "./LLMObsPromptsResponse"; import { LLMObsSearchSpansRequest } from "./LLMObsSearchSpansRequest"; import { LLMObsSearchSpansRequestAttributes } from "./LLMObsSearchSpansRequestAttributes"; import { LLMObsSearchSpansRequestData } from "./LLMObsSearchSpansRequestData"; @@ -288,6 +312,12 @@ import { LLMObsSpansResponsePage } from "./LLMObsSpansResponsePage"; import { LLMObsTraceAnnotatedInteractionItem } from "./LLMObsTraceAnnotatedInteractionItem"; import { LLMObsTraceInteractionItem } from "./LLMObsTraceInteractionItem"; import { LLMObsTraceInteractionResponseItem } from "./LLMObsTraceInteractionResponseItem"; +import { LLMObsUpdatePromptData } from "./LLMObsUpdatePromptData"; +import { LLMObsUpdatePromptDataAttributes } from "./LLMObsUpdatePromptDataAttributes"; +import { LLMObsUpdatePromptRequest } from "./LLMObsUpdatePromptRequest"; +import { LLMObsUpdatePromptVersionData } from "./LLMObsUpdatePromptVersionData"; +import { LLMObsUpdatePromptVersionDataAttributes } from "./LLMObsUpdatePromptVersionDataAttributes"; +import { LLMObsUpdatePromptVersionRequest } from "./LLMObsUpdatePromptVersionRequest"; import { LLMObsUpsertAnnotationItem } from "./LLMObsUpsertAnnotationItem"; import { LLMObsVertexAIMetadata } from "./LLMObsVertexAIMetadata"; @@ -369,6 +399,10 @@ export const TypingInfo: ModelTypingInfo = { ], LLMObsPatternsTriggerResponseType: ["topic_discovery_run"], LLMObsProjectType: ["projects"], + LLMObsPromptResponseSource: ["registry", "code"], + LLMObsPromptType: ["prompt-templates"], + LLMObsPromptVersionLabel: ["production", "development"], + LLMObsPromptVersionType: ["prompt-template-versions"], LLMObsRecordType: ["records"], LLMObsSearchSpansRequestType: ["spans"], LLMObsSpanType: ["span"], @@ -401,6 +435,7 @@ export const TypingInfo: ModelTypingInfo = { "LLMObsTraceInteractionResponseItem", "LLMObsDisplayBlockInteractionResponseItem", ], + LLMObsPromptTemplate: ["string", "Array"], }, typeMap: { APIErrorResponse: APIErrorResponse, @@ -477,6 +512,13 @@ export const TypingInfo: ModelTypingInfo = { LLMObsBedrockMetadata: LLMObsBedrockMetadata, LLMObsContentBlock: LLMObsContentBlock, LLMObsContentBlockTimeFrame: LLMObsContentBlockTimeFrame, + LLMObsCreatePromptData: LLMObsCreatePromptData, + LLMObsCreatePromptDataAttributes: LLMObsCreatePromptDataAttributes, + LLMObsCreatePromptRequest: LLMObsCreatePromptRequest, + LLMObsCreatePromptVersionData: LLMObsCreatePromptVersionData, + LLMObsCreatePromptVersionDataAttributes: + LLMObsCreatePromptVersionDataAttributes, + LLMObsCreatePromptVersionRequest: LLMObsCreatePromptVersionRequest, LLMObsCursorMeta: LLMObsCursorMeta, LLMObsCustomEvalConfigAssessmentCriteria: LLMObsCustomEvalConfigAssessmentCriteria, @@ -591,6 +633,9 @@ export const TypingInfo: ModelTypingInfo = { LLMObsDeleteProjectsDataAttributesRequest, LLMObsDeleteProjectsDataRequest: LLMObsDeleteProjectsDataRequest, LLMObsDeleteProjectsRequest: LLMObsDeleteProjectsRequest, + LLMObsDeletedPromptData: LLMObsDeletedPromptData, + LLMObsDeletedPromptDataAttributes: LLMObsDeletedPromptDataAttributes, + LLMObsDeletedPromptResponse: LLMObsDeletedPromptResponse, LLMObsDisplayBlockAnnotatedInteractionItem: LLMObsDisplayBlockAnnotatedInteractionItem, LLMObsDisplayBlockInteractionItem: LLMObsDisplayBlockInteractionItem, @@ -760,6 +805,22 @@ export const TypingInfo: ModelTypingInfo = { LLMObsProjectUpdateDataRequest: LLMObsProjectUpdateDataRequest, LLMObsProjectUpdateRequest: LLMObsProjectUpdateRequest, LLMObsProjectsResponse: LLMObsProjectsResponse, + LLMObsPromptChatMessage: LLMObsPromptChatMessage, + LLMObsPromptData: LLMObsPromptData, + LLMObsPromptDataAttributes: LLMObsPromptDataAttributes, + LLMObsPromptDataset: LLMObsPromptDataset, + LLMObsPromptResponse: LLMObsPromptResponse, + LLMObsPromptSDKData: LLMObsPromptSDKData, + LLMObsPromptSDKDataAttributes: LLMObsPromptSDKDataAttributes, + LLMObsPromptSDKResponse: LLMObsPromptSDKResponse, + LLMObsPromptVersionData: LLMObsPromptVersionData, + LLMObsPromptVersionDataAttributes: LLMObsPromptVersionDataAttributes, + LLMObsPromptVersionListData: LLMObsPromptVersionListData, + LLMObsPromptVersionListDataAttributes: + LLMObsPromptVersionListDataAttributes, + LLMObsPromptVersionResponse: LLMObsPromptVersionResponse, + LLMObsPromptVersionsResponse: LLMObsPromptVersionsResponse, + LLMObsPromptsResponse: LLMObsPromptsResponse, LLMObsSearchSpansRequest: LLMObsSearchSpansRequest, LLMObsSearchSpansRequestAttributes: LLMObsSearchSpansRequestAttributes, LLMObsSearchSpansRequestData: LLMObsSearchSpansRequestData, @@ -781,6 +842,13 @@ export const TypingInfo: ModelTypingInfo = { LLMObsTraceAnnotatedInteractionItem: LLMObsTraceAnnotatedInteractionItem, LLMObsTraceInteractionItem: LLMObsTraceInteractionItem, LLMObsTraceInteractionResponseItem: LLMObsTraceInteractionResponseItem, + LLMObsUpdatePromptData: LLMObsUpdatePromptData, + LLMObsUpdatePromptDataAttributes: LLMObsUpdatePromptDataAttributes, + LLMObsUpdatePromptRequest: LLMObsUpdatePromptRequest, + LLMObsUpdatePromptVersionData: LLMObsUpdatePromptVersionData, + LLMObsUpdatePromptVersionDataAttributes: + LLMObsUpdatePromptVersionDataAttributes, + LLMObsUpdatePromptVersionRequest: LLMObsUpdatePromptVersionRequest, LLMObsUpsertAnnotationItem: LLMObsUpsertAnnotationItem, LLMObsVertexAIMetadata: LLMObsVertexAIMetadata, },