From ffbc6ac49bbf09b97a0b253688251f19c0962ca9 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 21 Jul 2026 08:40:44 +0000 Subject: [PATCH] Regenerate client from commit c1852be of spec repo --- .generator/schemas/v2/openapi.yaml | 1885 ++++- .../llm-observability/CreateLLMObsPrompt.java | 45 + .../CreateLLMObsPromptVersion.java | 47 + .../llm-observability/DeleteLLMObsPrompt.java | 29 + .../v2/llm-observability/GetLLMObsPrompt.java | 29 + .../GetLLMObsPromptVersion.java | 34 + .../ListLLMObsPromptVersions.java | 29 + .../llm-observability/ListLLMObsPrompts.java | 32 + .../llm-observability/UpdateLLMObsPrompt.java | 41 + .../UpdateLLMObsPromptVersion.java | 48 + .../com/datadog/api/client/ApiClient.java | 9 + .../client/v2/api/LlmObservabilityApi.java | 7017 ++++++++++------- .../v2/model/LLMObsCreatePromptData.java | 185 + .../LLMObsCreatePromptDataAttributes.java | 343 + .../v2/model/LLMObsCreatePromptRequest.java | 149 + .../model/LLMObsCreatePromptVersionData.java | 187 + ...MObsCreatePromptVersionDataAttributes.java | 289 + .../LLMObsCreatePromptVersionRequest.java | 151 + .../v2/model/LLMObsDeletedPromptData.java | 212 + .../LLMObsDeletedPromptDataAttributes.java | 176 + .../v2/model/LLMObsDeletedPromptResponse.java | 149 + .../v2/model/LLMObsPromptChatMessage.java | 174 + .../v2/model/LLMObsPromptChatTemplate.java | 109 + .../api/client/v2/model/LLMObsPromptData.java | 212 + .../v2/model/LLMObsPromptDataAttributes.java | 620 ++ .../client/v2/model/LLMObsPromptDataset.java | 168 + .../client/v2/model/LLMObsPromptResponse.java | 148 + .../v2/model/LLMObsPromptResponseSource.java | 58 + .../client/v2/model/LLMObsPromptSDKData.java | 213 + .../model/LLMObsPromptSDKDataAttributes.java | 312 + .../v2/model/LLMObsPromptSDKResponse.java | 148 + .../client/v2/model/LLMObsPromptTemplate.java | 279 + .../api/client/v2/model/LLMObsPromptType.java | 54 + .../v2/model/LLMObsPromptVersionData.java | 212 + .../LLMObsPromptVersionDataAttributes.java | 599 ++ .../v2/model/LLMObsPromptVersionLabel.java | 59 + .../v2/model/LLMObsPromptVersionListData.java | 213 + ...LLMObsPromptVersionListDataAttributes.java | 566 ++ .../v2/model/LLMObsPromptVersionResponse.java | 149 + .../v2/model/LLMObsPromptVersionType.java | 57 + .../model/LLMObsPromptVersionsResponse.java | 164 + .../v2/model/LLMObsPromptsResponse.java | 162 + .../v2/model/LLMObsUpdatePromptData.java | 185 + .../LLMObsUpdatePromptDataAttributes.java | 114 + .../v2/model/LLMObsUpdatePromptRequest.java | 149 + .../model/LLMObsUpdatePromptVersionData.java | 188 + ...MObsUpdatePromptVersionDataAttributes.java | 166 + .../LLMObsUpdatePromptVersionRequest.java | 153 + ...ersion_returns_Bad_Request_response.freeze | 1 + ..._version_returns_Bad_Request_response.json | 88 + ..._version_returns_Not_Found_response.freeze | 1 + ...pt_version_returns_Not_Found_response.json | 32 + ..._prompt_version_returns_OK_response.freeze | 1 + ...ty_prompt_version_returns_OK_response.json | 114 + ...prompt_returns_Bad_Request_response.freeze | 1 + ...y_prompt_returns_Bad_Request_response.json | 32 + ...ty_prompt_returns_Conflict_response.freeze | 1 + ...lity_prompt_returns_Conflict_response.json | 88 + ...vability_prompt_returns_OK_response.freeze | 1 + ...ervability_prompt_returns_OK_response.json | 58 + ...y_prompt_returns_Not_Found_response.freeze | 1 + ...ity_prompt_returns_Not_Found_response.json | 28 + ...vability_prompt_returns_OK_response.freeze | 1 + ...ervability_prompt_returns_OK_response.json | 84 + ..._version_returns_Not_Found_response.freeze | 1 + ...pt_version_returns_Not_Found_response.json | 28 + ..._prompt_version_returns_OK_response.freeze | 1 + ...ty_prompt_version_returns_OK_response.json | 140 + ...y_prompt_returns_Not_Found_response.freeze | 1 + ...ity_prompt_returns_Not_Found_response.json | 28 + ...vability_prompt_returns_OK_response.freeze | 1 + ...ervability_prompt_returns_OK_response.json | 84 + ...ability_prompts_returns_OK_response.freeze | 1 + ...rvability_prompts_returns_OK_response.json | 89 + ...vability_prompt_returns_OK_response.freeze | 1 + ...ervability_prompt_returns_OK_response.json | 84 + ..._version_returns_Not_Found_response.freeze | 1 + ...pt_version_returns_Not_Found_response.json | 32 + ..._prompt_version_returns_OK_response.freeze | 1 + ...ty_prompt_version_returns_OK_response.json | 144 + ...prompt_returns_Bad_Request_response.freeze | 1 + ...y_prompt_returns_Bad_Request_response.json | 88 + ...y_prompt_returns_Not_Found_response.freeze | 1 + ...ity_prompt_returns_Not_Found_response.json | 32 + ...vability_prompt_returns_OK_response.freeze | 1 + ...ervability_prompt_returns_OK_response.json | 88 + .../com/datadog/api/client/v2/api/given.json | 28 + .../client/v2/api/llm_observability.feature | 200 +- .../com/datadog/api/client/v2/api/undo.json | 68 + 89 files changed, 15474 insertions(+), 2919 deletions(-) create mode 100644 examples/v2/llm-observability/CreateLLMObsPrompt.java create mode 100644 examples/v2/llm-observability/CreateLLMObsPromptVersion.java create mode 100644 examples/v2/llm-observability/DeleteLLMObsPrompt.java create mode 100644 examples/v2/llm-observability/GetLLMObsPrompt.java create mode 100644 examples/v2/llm-observability/GetLLMObsPromptVersion.java create mode 100644 examples/v2/llm-observability/ListLLMObsPromptVersions.java create mode 100644 examples/v2/llm-observability/ListLLMObsPrompts.java create mode 100644 examples/v2/llm-observability/UpdateLLMObsPrompt.java create mode 100644 examples/v2/llm-observability/UpdateLLMObsPromptVersion.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatMessage.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataset.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponseSource.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptTemplate.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionLabel.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionType.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsPromptsResponse.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptRequest.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionData.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionDataAttributes.java create mode 100644 src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionRequest.java create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.json create mode 100644 src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 61320cadad6..639f0ffb959 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 @@ -51818,6 +51844,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: @@ -53293,6 +53421,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: @@ -56387,6 +56562,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: @@ -56880,6 +57570,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 @@ -151128,18 +151891,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: @@ -151147,22 +152592,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: @@ -151175,39 +152619,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": @@ -151216,24 +152667,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: @@ -151253,106 +152702,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: @@ -151362,21 +152743,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: @@ -151394,15 +152782,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: @@ -151411,11 +152805,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": @@ -151426,32 +152825,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: @@ -151470,39 +152860,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: @@ -151521,23 +152936,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: @@ -151545,10 +152971,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": @@ -151559,14 +152987,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: @@ -151597,9 +153033,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/). @@ -201963,7 +203407,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/examples/v2/llm-observability/CreateLLMObsPrompt.java b/examples/v2/llm-observability/CreateLLMObsPrompt.java new file mode 100644 index 00000000000..6412f611849 --- /dev/null +++ b/examples/v2/llm-observability/CreateLLMObsPrompt.java @@ -0,0 +1,45 @@ +// Create an LLM Observability prompt returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsCreatePromptData; +import com.datadog.api.client.v2.model.LLMObsCreatePromptDataAttributes; +import com.datadog.api.client.v2.model.LLMObsCreatePromptRequest; +import com.datadog.api.client.v2.model.LLMObsPromptResponse; +import com.datadog.api.client.v2.model.LLMObsPromptTemplate; +import com.datadog.api.client.v2.model.LLMObsPromptType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createLLMObsPrompt", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + LLMObsCreatePromptRequest body = + new LLMObsCreatePromptRequest() + .data( + new LLMObsCreatePromptData() + .attributes( + new LLMObsCreatePromptDataAttributes() + .promptId("Example-LLM-Observability") + .title("Customer Support Assistant") + .template( + new LLMObsPromptTemplate( + "You are a helpful customer support assistant for" + + " {{company_name}}. Help {{customer_name}} with this" + + " question: {{question}}"))) + .type(LLMObsPromptType.PROMPT_TEMPLATES)); + + try { + LLMObsPromptResponse result = apiInstance.createLLMObsPrompt(body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#createLLMObsPrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/CreateLLMObsPromptVersion.java b/examples/v2/llm-observability/CreateLLMObsPromptVersion.java new file mode 100644 index 00000000000..19617a29dfa --- /dev/null +++ b/examples/v2/llm-observability/CreateLLMObsPromptVersion.java @@ -0,0 +1,47 @@ +// Create a new LLM Observability prompt version returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsCreatePromptVersionData; +import com.datadog.api.client.v2.model.LLMObsCreatePromptVersionDataAttributes; +import com.datadog.api.client.v2.model.LLMObsCreatePromptVersionRequest; +import com.datadog.api.client.v2.model.LLMObsPromptTemplate; +import com.datadog.api.client.v2.model.LLMObsPromptVersionResponse; +import com.datadog.api.client.v2.model.LLMObsPromptVersionType; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.createLLMObsPromptVersion", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + LLMObsCreatePromptVersionRequest body = + new LLMObsCreatePromptVersionRequest() + .data( + new LLMObsCreatePromptVersionData() + .attributes( + new LLMObsCreatePromptVersionDataAttributes() + .template( + new LLMObsPromptTemplate( + "You are a concise customer support assistant for" + + " {{company_name}}. Answer {{customer_name}}'s question:" + + " {{question}}"))) + .type(LLMObsPromptVersionType.PROMPT_TEMPLATE_VERSIONS)); + + try { + LLMObsPromptVersionResponse result = + apiInstance.createLLMObsPromptVersion(PROMPT_DATA_ATTRIBUTES_PROMPT_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#createLLMObsPromptVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/DeleteLLMObsPrompt.java b/examples/v2/llm-observability/DeleteLLMObsPrompt.java new file mode 100644 index 00000000000..55a716ecdc6 --- /dev/null +++ b/examples/v2/llm-observability/DeleteLLMObsPrompt.java @@ -0,0 +1,29 @@ +// Delete an LLM Observability prompt returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsDeletedPromptResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.deleteLLMObsPrompt", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + try { + LLMObsDeletedPromptResponse result = + apiInstance.deleteLLMObsPrompt(PROMPT_DATA_ATTRIBUTES_PROMPT_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#deleteLLMObsPrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/GetLLMObsPrompt.java b/examples/v2/llm-observability/GetLLMObsPrompt.java new file mode 100644 index 00000000000..112c2661387 --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPrompt.java @@ -0,0 +1,29 @@ +// Get an LLM Observability prompt returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPromptSDKResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsPrompt", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + try { + LLMObsPromptSDKResponse result = + apiInstance.getLLMObsPrompt(PROMPT_DATA_ATTRIBUTES_PROMPT_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#getLLMObsPrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/GetLLMObsPromptVersion.java b/examples/v2/llm-observability/GetLLMObsPromptVersion.java new file mode 100644 index 00000000000..a3558cccf1c --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPromptVersion.java @@ -0,0 +1,34 @@ +// Get a specific LLM Observability prompt version returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPromptVersionResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.getLLMObsPromptVersion", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + // there is a valid "prompt_version" in the system + Long PROMPT_VERSION_DATA_ATTRIBUTES_VERSION = + Long.parseLong(System.getenv("PROMPT_VERSION_DATA_ATTRIBUTES_VERSION")); + + try { + LLMObsPromptVersionResponse result = + apiInstance.getLLMObsPromptVersion( + PROMPT_DATA_ATTRIBUTES_PROMPT_ID, PROMPT_VERSION_DATA_ATTRIBUTES_VERSION); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#getLLMObsPromptVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPromptVersions.java b/examples/v2/llm-observability/ListLLMObsPromptVersions.java new file mode 100644 index 00000000000..7f6cea40cd0 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPromptVersions.java @@ -0,0 +1,29 @@ +// List versions of an LLM Observability prompt returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPromptVersionsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPromptVersions", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + try { + LLMObsPromptVersionsResponse result = + apiInstance.listLLMObsPromptVersions(PROMPT_DATA_ATTRIBUTES_PROMPT_ID); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPromptVersions"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/ListLLMObsPrompts.java b/examples/v2/llm-observability/ListLLMObsPrompts.java new file mode 100644 index 00000000000..5007e7ab05d --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPrompts.java @@ -0,0 +1,32 @@ +// List LLM Observability prompts returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.api.LlmObservabilityApi.ListLLMObsPromptsOptionalParameters; +import com.datadog.api.client.v2.model.LLMObsPromptsResponse; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.listLLMObsPrompts", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + try { + LLMObsPromptsResponse result = + apiInstance.listLLMObsPrompts( + new ListLLMObsPromptsOptionalParameters() + .filterPromptId(PROMPT_DATA_ATTRIBUTES_PROMPT_ID)); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#listLLMObsPrompts"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/UpdateLLMObsPrompt.java b/examples/v2/llm-observability/UpdateLLMObsPrompt.java new file mode 100644 index 00000000000..a4c83b38939 --- /dev/null +++ b/examples/v2/llm-observability/UpdateLLMObsPrompt.java @@ -0,0 +1,41 @@ +// Update an LLM Observability prompt returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPromptResponse; +import com.datadog.api.client.v2.model.LLMObsPromptType; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptData; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptDataAttributes; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateLLMObsPrompt", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + LLMObsUpdatePromptRequest body = + new LLMObsUpdatePromptRequest() + .data( + new LLMObsUpdatePromptData() + .attributes( + new LLMObsUpdatePromptDataAttributes().title("Customer Support Assistant")) + .type(LLMObsPromptType.PROMPT_TEMPLATES)); + + try { + LLMObsPromptResponse result = + apiInstance.updateLLMObsPrompt(PROMPT_DATA_ATTRIBUTES_PROMPT_ID, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#updateLLMObsPrompt"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/examples/v2/llm-observability/UpdateLLMObsPromptVersion.java b/examples/v2/llm-observability/UpdateLLMObsPromptVersion.java new file mode 100644 index 00000000000..84dfe179ff0 --- /dev/null +++ b/examples/v2/llm-observability/UpdateLLMObsPromptVersion.java @@ -0,0 +1,48 @@ +// Update a specific LLM Observability prompt version returns "OK" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.LlmObservabilityApi; +import com.datadog.api.client.v2.model.LLMObsPromptVersionResponse; +import com.datadog.api.client.v2.model.LLMObsPromptVersionType; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptVersionData; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptVersionDataAttributes; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptVersionRequest; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + defaultClient.setUnstableOperationEnabled("v2.updateLLMObsPromptVersion", true); + LlmObservabilityApi apiInstance = new LlmObservabilityApi(defaultClient); + + // there is a valid "prompt" in the system + String PROMPT_DATA_ATTRIBUTES_PROMPT_ID = System.getenv("PROMPT_DATA_ATTRIBUTES_PROMPT_ID"); + + // there is a valid "prompt_version" in the system + Long PROMPT_VERSION_DATA_ATTRIBUTES_VERSION = + Long.parseLong(System.getenv("PROMPT_VERSION_DATA_ATTRIBUTES_VERSION")); + + LLMObsUpdatePromptVersionRequest body = + new LLMObsUpdatePromptVersionRequest() + .data( + new LLMObsUpdatePromptVersionData() + .attributes( + new LLMObsUpdatePromptVersionDataAttributes() + .description( + "Give concise answers and cite relevant help-center articles.")) + .type(LLMObsPromptVersionType.PROMPT_TEMPLATE_VERSIONS)); + + try { + LLMObsPromptVersionResponse result = + apiInstance.updateLLMObsPromptVersion( + PROMPT_DATA_ATTRIBUTES_PROMPT_ID, PROMPT_VERSION_DATA_ATTRIBUTES_VERSION, body); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling LlmObservabilityApi#updateLLMObsPromptVersion"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/ApiClient.java b/src/main/java/com/datadog/api/client/ApiClient.java index dacb988dec6..00191bcdd4f 100644 --- a/src/main/java/com/datadog/api/client/ApiClient.java +++ b/src/main/java/com/datadog/api/client/ApiClient.java @@ -788,6 +788,8 @@ public class ApiClient { put("v2.createLLMObsExperimentEvents", false); put("v2.createLLMObsIntegrationInference", false); put("v2.createLLMObsProject", false); + put("v2.createLLMObsPrompt", false); + put("v2.createLLMObsPromptVersion", false); put("v2.deleteLLMObsAnnotationQueue", false); put("v2.deleteLLMObsAnnotationQueueInteractions", false); put("v2.deleteLLMObsAnnotations", false); @@ -798,6 +800,7 @@ public class ApiClient { put("v2.deleteLLMObsExperiments", false); put("v2.deleteLLMObsPatternsConfig", false); put("v2.deleteLLMObsProjects", false); + put("v2.deleteLLMObsPrompt", false); put("v2.exportLLMObsDataset", false); put("v2.getLLMObsAnnotatedInteractions", false); put("v2.getLLMObsAnnotatedInteractionsByTraceIDs", false); @@ -806,6 +809,8 @@ public class ApiClient { put("v2.getLLMObsDatasetDraftState", false); put("v2.getLLMObsPatternsConfig", false); put("v2.getLLMObsPatternsRunStatus", false); + put("v2.getLLMObsPrompt", false); + put("v2.getLLMObsPromptVersion", false); put("v2.listLLMObsAnnotationQueues", false); put("v2.listLLMObsDatasetRecords", false); put("v2.listLLMObsDatasets", false); @@ -822,6 +827,8 @@ public class ApiClient { put("v2.listLLMObsPatternsTopics", false); put("v2.listLLMObsPatternsTopicsWithClusteredPoints", false); put("v2.listLLMObsProjects", false); + put("v2.listLLMObsPrompts", false); + put("v2.listLLMObsPromptVersions", false); put("v2.listLLMObsSpans", false); put("v2.lockLLMObsDatasetDraftState", false); put("v2.restoreLLMObsDatasetVersion", false); @@ -837,6 +844,8 @@ public class ApiClient { put("v2.updateLLMObsDatasetRecords", false); put("v2.updateLLMObsExperiment", false); put("v2.updateLLMObsProject", false); + put("v2.updateLLMObsPrompt", false); + put("v2.updateLLMObsPromptVersion", false); put("v2.uploadLLMObsDatasetRecordsFile", false); put("v2.upsertLLMObsAnnotations", false); put("v2.upsertLLMObsPatternsConfig", false); diff --git a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java index e93ab1fb788..7cd226335a9 100644 --- a/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/LlmObservabilityApi.java @@ -16,6 +16,8 @@ import com.datadog.api.client.v2.model.LLMObsAnnotationQueuesResponse; import com.datadog.api.client.v2.model.LLMObsAnnotationsRequest; import com.datadog.api.client.v2.model.LLMObsAnnotationsResponse; +import com.datadog.api.client.v2.model.LLMObsCreatePromptRequest; +import com.datadog.api.client.v2.model.LLMObsCreatePromptVersionRequest; import com.datadog.api.client.v2.model.LLMObsCustomEvalConfigResponse; import com.datadog.api.client.v2.model.LLMObsCustomEvalConfigUpdateRequest; import com.datadog.api.client.v2.model.LLMObsDataDeletionRequest; @@ -41,6 +43,7 @@ import com.datadog.api.client.v2.model.LLMObsDeleteDatasetsRequest; import com.datadog.api.client.v2.model.LLMObsDeleteExperimentsRequest; import com.datadog.api.client.v2.model.LLMObsDeleteProjectsRequest; +import com.datadog.api.client.v2.model.LLMObsDeletedPromptResponse; import com.datadog.api.client.v2.model.LLMObsExperimentEventsRequest; import com.datadog.api.client.v2.model.LLMObsExperimentEventsV2Response; import com.datadog.api.client.v2.model.LLMObsExperimentRequest; @@ -73,8 +76,15 @@ import com.datadog.api.client.v2.model.LLMObsProjectResponse; import com.datadog.api.client.v2.model.LLMObsProjectUpdateRequest; import com.datadog.api.client.v2.model.LLMObsProjectsResponse; +import com.datadog.api.client.v2.model.LLMObsPromptResponse; +import com.datadog.api.client.v2.model.LLMObsPromptSDKResponse; +import com.datadog.api.client.v2.model.LLMObsPromptVersionResponse; +import com.datadog.api.client.v2.model.LLMObsPromptVersionsResponse; +import com.datadog.api.client.v2.model.LLMObsPromptsResponse; import com.datadog.api.client.v2.model.LLMObsSearchSpansRequest; import com.datadog.api.client.v2.model.LLMObsSpansResponse; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptRequest; +import com.datadog.api.client.v2.model.LLMObsUpdatePromptVersionRequest; import jakarta.ws.rs.client.Invocation; import jakarta.ws.rs.core.GenericType; import java.io.File; @@ -2137,6 +2147,339 @@ public CompletableFuture> createLLMObsProject new GenericType() {}); } + /** + * Create an LLM Observability prompt. + * + *

See {@link #createLLMObsPromptWithHttpInfo}. + * + * @param body Create prompt payload. (required) + * @return LLMObsPromptResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPromptResponse createLLMObsPrompt(LLMObsCreatePromptRequest body) + throws ApiException { + return createLLMObsPromptWithHttpInfo(body).getData(); + } + + /** + * Create an LLM Observability prompt. + * + *

See {@link #createLLMObsPromptWithHttpInfoAsync}. + * + * @param body Create prompt payload. (required) + * @return CompletableFuture<LLMObsPromptResponse> + */ + public CompletableFuture createLLMObsPromptAsync( + LLMObsCreatePromptRequest body) { + return createLLMObsPromptWithHttpInfoAsync(body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new prompt (and its first version) in the LLM Observability prompt registry. + * + * @param body Create prompt payload. (required) + * @return ApiResponse<LLMObsPromptResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
409 Conflict -
429 Too many requests -
+ */ + public ApiResponse createLLMObsPromptWithHttpInfo( + LLMObsCreatePromptRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createLLMObsPrompt"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createLLMObsPrompt"); + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/prompts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.createLLMObsPrompt", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create an LLM Observability prompt. + * + *

See {@link #createLLMObsPromptWithHttpInfo}. + * + * @param body Create prompt payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPromptResponse>> + */ + public CompletableFuture> createLLMObsPromptWithHttpInfoAsync( + LLMObsCreatePromptRequest body) { + // Check if unstable operation is enabled + String operationId = "createLLMObsPrompt"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createLLMObsPrompt")); + return result; + } + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/prompts"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.createLLMObsPrompt", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a new LLM Observability prompt version. + * + *

See {@link #createLLMObsPromptVersionWithHttpInfo}. + * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Create prompt version payload. (required) + * @return LLMObsPromptVersionResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPromptVersionResponse createLLMObsPromptVersion( + String promptId, LLMObsCreatePromptVersionRequest body) throws ApiException { + return createLLMObsPromptVersionWithHttpInfo(promptId, body).getData(); + } + + /** + * Create a new LLM Observability prompt version. + * + *

See {@link #createLLMObsPromptVersionWithHttpInfoAsync}. + * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Create prompt version payload. (required) + * @return CompletableFuture<LLMObsPromptVersionResponse> + */ + public CompletableFuture createLLMObsPromptVersionAsync( + String promptId, LLMObsCreatePromptVersionRequest body) { + return createLLMObsPromptVersionWithHttpInfoAsync(promptId, body) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Create a new version of an existing LLM Observability prompt. + * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Create prompt version payload. (required) + * @return ApiResponse<LLMObsPromptVersionResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse createLLMObsPromptVersionWithHttpInfo( + String promptId, LLMObsCreatePromptVersionRequest body) throws ApiException { + // Check if unstable operation is enabled + String operationId = "createLLMObsPromptVersion"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = body; + + // verify the required parameter 'promptId' is set + if (promptId == null) { + throw new ApiException( + 400, "Missing the required parameter 'promptId' when calling createLLMObsPromptVersion"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling createLLMObsPromptVersion"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.createLLMObsPromptVersion", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Create a new LLM Observability prompt version. + * + *

See {@link #createLLMObsPromptVersionWithHttpInfo}. + * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Create prompt version payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPromptVersionResponse>> + */ + public CompletableFuture> + createLLMObsPromptVersionWithHttpInfoAsync( + String promptId, LLMObsCreatePromptVersionRequest body) { + // Check if unstable operation is enabled + String operationId = "createLLMObsPromptVersion"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = body; + + // verify the required parameter 'promptId' is set + if (promptId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'promptId' when calling createLLMObsPromptVersion")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'body' when calling createLLMObsPromptVersion")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.createLLMObsPromptVersion", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {"application/json"}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Delete an LLM Observability annotation queue. * @@ -3791,14 +4134,171 @@ public CompletableFuture> deleteLLMObsProjectsWithHttpInfoAsyn null); } - /** Manage optional parameters to exportLLMObsDataset. */ - public static class ExportLLMObsDatasetOptionalParameters { - private LLMObsDatasetExportFormat format; - private Long version; + /** + * Delete an LLM Observability prompt. + * + *

See {@link #deleteLLMObsPromptWithHttpInfo}. + * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return LLMObsDeletedPromptResponse + * @throws ApiException if fails to make API call + */ + public LLMObsDeletedPromptResponse deleteLLMObsPrompt(String promptId) throws ApiException { + return deleteLLMObsPromptWithHttpInfo(promptId).getData(); + } - /** - * Set format. - * + /** + * Delete an LLM Observability prompt. + * + *

See {@link #deleteLLMObsPromptWithHttpInfoAsync}. + * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return CompletableFuture<LLMObsDeletedPromptResponse> + */ + public CompletableFuture deleteLLMObsPromptAsync(String promptId) { + return deleteLLMObsPromptWithHttpInfoAsync(promptId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * 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 promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return ApiResponse<LLMObsDeletedPromptResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
+ */ + public ApiResponse deleteLLMObsPromptWithHttpInfo(String promptId) + throws ApiException { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsPrompt"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'promptId' is set + if (promptId == null) { + throw new ApiException( + 400, "Missing the required parameter 'promptId' when calling deleteLLMObsPrompt"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsPrompt", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Delete an LLM Observability prompt. + * + *

See {@link #deleteLLMObsPromptWithHttpInfo}. + * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return CompletableFuture<ApiResponse<LLMObsDeletedPromptResponse>> + */ + public CompletableFuture> + deleteLLMObsPromptWithHttpInfoAsync(String promptId) { + // Check if unstable operation is enabled + String operationId = "deleteLLMObsPrompt"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'promptId' is set + if (promptId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'promptId' when calling deleteLLMObsPrompt")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.deleteLLMObsPrompt", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "DELETE", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to exportLLMObsDataset. */ + public static class ExportLLMObsDatasetOptionalParameters { + private LLMObsDatasetExportFormat format; + private Long version; + + /** + * Set format. + * * @param format Export format for the dataset contents. Only csv is currently * supported. (optional, default to "csv") * @return ExportLLMObsDatasetOptionalParameters @@ -5281,60 +5781,49 @@ public ApiResponse getLLMObsPatternsRunStatusWi new GenericType() {}); } - /** Manage optional parameters to listLLMObsAnnotationQueues. */ - public static class ListLLMObsAnnotationQueuesOptionalParameters { - private String projectId; - private List queueIds; - - /** - * Set projectId. - * - * @param projectId Filter annotation queues by project ID. Cannot be used together with - * queueIds. (optional) - * @return ListLLMObsAnnotationQueuesOptionalParameters - */ - public ListLLMObsAnnotationQueuesOptionalParameters projectId(String projectId) { - this.projectId = projectId; - return this; - } + /** Manage optional parameters to getLLMObsPrompt. */ + public static class GetLLMObsPromptOptionalParameters { + private String label; /** - * Set queueIds. + * Set label. * - * @param queueIds Filter annotation queues by queue IDs (comma-separated). Cannot be used - * together with projectId. (optional) - * @return ListLLMObsAnnotationQueuesOptionalParameters + * @param label 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. (optional) + * @return GetLLMObsPromptOptionalParameters */ - public ListLLMObsAnnotationQueuesOptionalParameters queueIds(List queueIds) { - this.queueIds = queueIds; + public GetLLMObsPromptOptionalParameters label(String label) { + this.label = label; return this; } } /** - * List LLM Observability annotation queues. + * Get an LLM Observability prompt. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. + *

See {@link #getLLMObsPromptWithHttpInfo}. * - * @return LLMObsAnnotationQueuesResponse + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return LLMObsPromptSDKResponse * @throws ApiException if fails to make API call */ - public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues() throws ApiException { - return listLLMObsAnnotationQueuesWithHttpInfo( - new ListLLMObsAnnotationQueuesOptionalParameters()) - .getData(); + public LLMObsPromptSDKResponse getLLMObsPrompt(String promptId) throws ApiException { + return getLLMObsPromptWithHttpInfo(promptId, new GetLLMObsPromptOptionalParameters()).getData(); } /** - * List LLM Observability annotation queues. + * Get an LLM Observability prompt. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. + *

See {@link #getLLMObsPromptWithHttpInfoAsync}. * - * @return CompletableFuture<LLMObsAnnotationQueuesResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return CompletableFuture<LLMObsPromptSDKResponse> */ - public CompletableFuture listLLMObsAnnotationQueuesAsync() { - return listLLMObsAnnotationQueuesWithHttpInfoAsync( - new ListLLMObsAnnotationQueuesOptionalParameters()) + public CompletableFuture getLLMObsPromptAsync(String promptId) { + return getLLMObsPromptWithHttpInfoAsync(promptId, new GetLLMObsPromptOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5342,30 +5831,32 @@ public CompletableFuture listLLMObsAnnotationQue } /** - * List LLM Observability annotation queues. + * Get an LLM Observability prompt. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. + *

See {@link #getLLMObsPromptWithHttpInfo}. * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) * @param parameters Optional parameters for the request. - * @return LLMObsAnnotationQueuesResponse + * @return LLMObsPromptSDKResponse * @throws ApiException if fails to make API call */ - public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues( - ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { - return listLLMObsAnnotationQueuesWithHttpInfo(parameters).getData(); + public LLMObsPromptSDKResponse getLLMObsPrompt( + String promptId, GetLLMObsPromptOptionalParameters parameters) throws ApiException { + return getLLMObsPromptWithHttpInfo(promptId, parameters).getData(); } /** - * List LLM Observability annotation queues. + * Get an LLM Observability prompt. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. + *

See {@link #getLLMObsPromptWithHttpInfoAsync}. * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsAnnotationQueuesResponse> + * @return CompletableFuture<LLMObsPromptSDKResponse> */ - public CompletableFuture listLLMObsAnnotationQueuesAsync( - ListLLMObsAnnotationQueuesOptionalParameters parameters) { - return listLLMObsAnnotationQueuesWithHttpInfoAsync(parameters) + public CompletableFuture getLLMObsPromptAsync( + String promptId, GetLLMObsPromptOptionalParameters parameters) { + return getLLMObsPromptWithHttpInfoAsync(promptId, parameters) .thenApply( response -> { return response.getData(); @@ -5373,47 +5864,53 @@ public CompletableFuture listLLMObsAnnotationQue } /** - * 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. + * Get the latest version of an LLM Observability prompt by prompt ID. * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsAnnotationQueuesResponse> + * @return ApiResponse<LLMObsPromptSDKResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * * + * * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listLLMObsAnnotationQueuesWithHttpInfo( - ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { + public ApiResponse getLLMObsPromptWithHttpInfo( + String promptId, GetLLMObsPromptOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsAnnotationQueues"; + String operationId = "getLLMObsPrompt"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String projectId = parameters.projectId; - List queueIds = parameters.queueIds; + + // verify the required parameter 'promptId' is set + if (promptId == null) { + throw new ApiException( + 400, "Missing the required parameter 'promptId' when calling getLLMObsPrompt"); + } + String label = parameters.label; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "label", label)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", + "v2.LlmObservabilityApi.getLLMObsPrompt", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5428,48 +5925,56 @@ public ApiResponse listLLMObsAnnotationQueuesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability annotation queues. + * Get an LLM Observability prompt. * - *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. + *

See {@link #getLLMObsPromptWithHttpInfo}. * + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueuesResponse>> + * @return CompletableFuture<ApiResponse<LLMObsPromptSDKResponse>> */ - public CompletableFuture> - listLLMObsAnnotationQueuesWithHttpInfoAsync( - ListLLMObsAnnotationQueuesOptionalParameters parameters) { + public CompletableFuture> getLLMObsPromptWithHttpInfoAsync( + String promptId, GetLLMObsPromptOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsAnnotationQueues"; + String operationId = "getLLMObsPrompt"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String projectId = parameters.projectId; - List queueIds = parameters.queueIds; + + // verify the required parameter 'promptId' is set + if (promptId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'promptId' when calling getLLMObsPrompt")); + return result; + } + String label = parameters.label; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "label", label)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", + "v2.LlmObservabilityApi.getLLMObsPrompt", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5477,8 +5982,7 @@ public ApiResponse listLLMObsAnnotationQueuesWit new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -5490,116 +5994,36 @@ public ApiResponse listLLMObsAnnotationQueuesWit localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listLLMObsDatasetRecords. */ - public static class ListLLMObsDatasetRecordsOptionalParameters { - private Long filterVersion; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterVersion. - * - * @param filterVersion Retrieve records from a specific dataset version. Defaults to the - * current version. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters filterVersion(Long filterVersion) { - this.filterVersion = filterVersion; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsDatasetRecordsOptionalParameters - */ - public ListLLMObsDatasetRecordsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; - } + new GenericType() {}); } /** - * List LLM Observability dataset records. + * Get a specific LLM Observability prompt version. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. + *

See {@link #getLLMObsPromptVersionWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return LLMObsDatasetRecordsListResponse + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @return LLMObsPromptVersionResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( - String projectId, String datasetId) throws ApiException { - return listLLMObsDatasetRecordsWithHttpInfo( - projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) - .getData(); - } - - /** - * List LLM Observability dataset records. - * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. - * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<LLMObsDatasetRecordsListResponse> - */ - public CompletableFuture listLLMObsDatasetRecordsAsync( - String projectId, String datasetId) { - return listLLMObsDatasetRecordsWithHttpInfoAsync( - projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List LLM Observability dataset records. - * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. - * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return LLMObsDatasetRecordsListResponse - * @throws ApiException if fails to make API call - */ - public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + public LLMObsPromptVersionResponse getLLMObsPromptVersion(String promptId, Long version) throws ApiException { - return listLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, parameters).getData(); + return getLLMObsPromptVersionWithHttpInfo(promptId, version).getData(); } /** - * List LLM Observability dataset records. + * Get a specific LLM Observability prompt version. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. + *

See {@link #getLLMObsPromptVersionWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsDatasetRecordsListResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @return CompletableFuture<LLMObsPromptVersionResponse> */ - public CompletableFuture listLLMObsDatasetRecordsAsync( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) { - return listLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, parameters) + public CompletableFuture getLLMObsPromptVersionAsync( + String promptId, Long version) { + return getLLMObsPromptVersionWithHttpInfoAsync(promptId, version) .thenApply( response -> { return response.getData(); @@ -5607,12 +6031,11 @@ public CompletableFuture listLLMObsDatasetReco } /** - * List all records in an LLM Observability dataset, sorted by creation date, newest first. + * Get the full template of a single, specific version of an LLM Observability prompt. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsDatasetRecordsListResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @return ApiResponse<LLMObsPromptVersionResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5626,11 +6049,10 @@ public CompletableFuture listLLMObsDatasetReco * *
429 Too many requests -
*/ - public ApiResponse listLLMObsDatasetRecordsWithHttpInfo( - String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) - throws ApiException { + public ApiResponse getLLMObsPromptVersionWithHttpInfo( + String promptId, Long version) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetRecords"; + String operationId = "getLLMObsPromptVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -5638,38 +6060,30 @@ public ApiResponse listLLMObsDatasetRecordsWit } Object localVarPostBody = null; - // verify the required parameter 'projectId' is set - if (projectId == null) { + // verify the required parameter 'promptId' is set + if (promptId == null) { throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords"); + 400, "Missing the required parameter 'promptId' when calling getLLMObsPromptVersion"); } - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'version' is set + if (version == null) { throw new ApiException( - 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords"); + 400, "Missing the required parameter 'version' when calling getLLMObsPromptVersion"); } - Long filterVersion = parameters.filterVersion; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + "v2.LlmObservabilityApi.getLLMObsPromptVersion", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -5682,30 +6096,26 @@ public ApiResponse listLLMObsDatasetRecordsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability dataset records. + * Get a specific LLM Observability prompt version. * - *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. + *

See {@link #getLLMObsPromptVersionWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsListResponse>> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @return CompletableFuture<ApiResponse<LLMObsPromptVersionResponse>> */ - public CompletableFuture> - listLLMObsDatasetRecordsWithHttpInfoAsync( - String projectId, - String datasetId, - ListLLMObsDatasetRecordsOptionalParameters parameters) { + public CompletableFuture> + getLLMObsPromptVersionWithHttpInfoAsync(String promptId, Long version) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetRecords"; + String operationId = "getLLMObsPromptVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -5713,56 +6123,47 @@ public ApiResponse listLLMObsDatasetRecordsWit } Object localVarPostBody = null; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = + // verify the required parameter 'promptId' is set + if (promptId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords")); + "Missing the required parameter 'promptId' when calling getLLMObsPromptVersion")); return result; } - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords")); + 400, "Missing the required parameter 'version' when calling getLLMObsPromptVersion")); return result; } - Long filterVersion = parameters.filterVersion; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetRecords", + "v2.LlmObservabilityApi.getLLMObsPromptVersion", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -5775,86 +6176,63 @@ public ApiResponse listLLMObsDatasetRecordsWit localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listLLMObsDatasets. */ - public static class ListLLMObsDatasetsOptionalParameters { - private String filterName; - private String filterId; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterName. - * - * @param filterName Filter datasets by name. (optional) - * @return ListLLMObsDatasetsOptionalParameters - */ - public ListLLMObsDatasetsOptionalParameters filterName(String filterName) { - this.filterName = filterName; - return this; - } - - /** - * Set filterId. - * - * @param filterId Filter datasets by dataset ID. (optional) - * @return ListLLMObsDatasetsOptionalParameters - */ - public ListLLMObsDatasetsOptionalParameters filterId(String filterId) { - this.filterId = filterId; - return this; - } + /** Manage optional parameters to listLLMObsAnnotationQueues. */ + public static class ListLLMObsAnnotationQueuesOptionalParameters { + private String projectId; + private List queueIds; /** - * Set pageCursor. + * Set projectId. * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsDatasetsOptionalParameters + * @param projectId Filter annotation queues by project ID. Cannot be used together with + * queueIds. (optional) + * @return ListLLMObsAnnotationQueuesOptionalParameters */ - public ListLLMObsDatasetsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; + public ListLLMObsAnnotationQueuesOptionalParameters projectId(String projectId) { + this.projectId = projectId; return this; } /** - * Set pageLimit. + * Set queueIds. * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsDatasetsOptionalParameters + * @param queueIds Filter annotation queues by queue IDs (comma-separated). Cannot be used + * together with projectId. (optional) + * @return ListLLMObsAnnotationQueuesOptionalParameters */ - public ListLLMObsDatasetsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListLLMObsAnnotationQueuesOptionalParameters queueIds(List queueIds) { + this.queueIds = queueIds; return this; } } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @return LLMObsDatasetsResponse + * @return LLMObsAnnotationQueuesResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetsResponse listLLMObsDatasets(String projectId) throws ApiException { - return listLLMObsDatasetsWithHttpInfo(projectId, new ListLLMObsDatasetsOptionalParameters()) + public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues() throws ApiException { + return listLLMObsAnnotationQueuesWithHttpInfo( + new ListLLMObsAnnotationQueuesOptionalParameters()) .getData(); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @return CompletableFuture<LLMObsDatasetsResponse> + * @return CompletableFuture<LLMObsAnnotationQueuesResponse> */ - public CompletableFuture listLLMObsDatasetsAsync(String projectId) { - return listLLMObsDatasetsWithHttpInfoAsync( - projectId, new ListLLMObsDatasetsOptionalParameters()) + public CompletableFuture listLLMObsAnnotationQueuesAsync() { + return listLLMObsAnnotationQueuesWithHttpInfoAsync( + new ListLLMObsAnnotationQueuesOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -5862,32 +6240,30 @@ projectId, new ListLLMObsDatasetsOptionalParameters()) } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return LLMObsDatasetsResponse + * @return LLMObsAnnotationQueuesResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetsResponse listLLMObsDatasets( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { - return listLLMObsDatasetsWithHttpInfo(projectId, parameters).getData(); + public LLMObsAnnotationQueuesResponse listLLMObsAnnotationQueues( + ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { + return listLLMObsAnnotationQueuesWithHttpInfo(parameters).getData(); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsDatasetsResponse> + * @return CompletableFuture<LLMObsAnnotationQueuesResponse> */ - public CompletableFuture listLLMObsDatasetsAsync( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) { - return listLLMObsDatasetsWithHttpInfoAsync(projectId, parameters) + public CompletableFuture listLLMObsAnnotationQueuesAsync( + ListLLMObsAnnotationQueuesOptionalParameters parameters) { + return listLLMObsAnnotationQueuesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -5895,11 +6271,11 @@ public CompletableFuture listLLMObsDatasetsAsync( } /** - * List all LLM Observability datasets for a project, sorted by creation date, newest first. + * 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. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsDatasetsResponse> + * @return ApiResponse<LLMObsAnnotationQueuesResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -5909,46 +6285,33 @@ public CompletableFuture listLLMObsDatasetsAsync( * * * - * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
*/ - public ApiResponse listLLMObsDatasetsWithHttpInfo( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { + public ApiResponse listLLMObsAnnotationQueuesWithHttpInfo( + ListLLMObsAnnotationQueuesOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasets"; + String operationId = "listLLMObsAnnotationQueues"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets"); - } - String filterName = parameters.filterName; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + String projectId = parameters.projectId; + List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasets", + "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -5963,62 +6326,48 @@ public ApiResponse listLLMObsDatasetsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability datasets. + * List LLM Observability annotation queues. * - *

See {@link #listLLMObsDatasetsWithHttpInfo}. + *

See {@link #listLLMObsAnnotationQueuesWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsDatasetsResponse>> + * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueuesResponse>> */ - public CompletableFuture> listLLMObsDatasetsWithHttpInfoAsync( - String projectId, ListLLMObsDatasetsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsAnnotationQueuesWithHttpInfoAsync( + ListLLMObsAnnotationQueuesOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasets"; + String operationId = "listLLMObsAnnotationQueues"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets")); - return result; - } - String filterName = parameters.filterName; - String filterId = parameters.filterId; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + String projectId = parameters.projectId; + List queueIds = parameters.queueIds; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/annotation-queues"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "projectId", projectId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "queueIds", queueIds)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasets", + "v2.LlmObservabilityApi.listLLMObsAnnotationQueues", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -6026,7 +6375,8 @@ public CompletableFuture> listLLMObsDatasets new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6038,36 +6388,80 @@ public CompletableFuture> listLLMObsDatasets localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsDatasetRecords. */ + public static class ListLLMObsDatasetRecordsOptionalParameters { + private Long filterVersion; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterVersion. + * + * @param filterVersion Retrieve records from a specific dataset version. Defaults to the + * current version. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters filterVersion(Long filterVersion) { + this.filterVersion = filterVersion; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. (optional) + * @return ListLLMObsDatasetRecordsOptionalParameters + */ + public ListLLMObsDatasetRecordsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return LLMObsDatasetVersionsResponse + * @return LLMObsDatasetRecordsListResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetVersionsResponse listLLMObsDatasetVersions(String projectId, String datasetId) - throws ApiException { - return listLLMObsDatasetVersionsWithHttpInfo(projectId, datasetId).getData(); + public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( + String projectId, String datasetId) throws ApiException { + return listLLMObsDatasetRecordsWithHttpInfo( + projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) + .getData(); } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<LLMObsDatasetVersionsResponse> + * @return CompletableFuture<LLMObsDatasetRecordsListResponse> */ - public CompletableFuture listLLMObsDatasetVersionsAsync( + public CompletableFuture listLLMObsDatasetRecordsAsync( String projectId, String datasetId) { - return listLLMObsDatasetVersionsWithHttpInfoAsync(projectId, datasetId) + return listLLMObsDatasetRecordsWithHttpInfoAsync( + projectId, datasetId, new ListLLMObsDatasetRecordsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6075,12 +6469,48 @@ public CompletableFuture listLLMObsDatasetVersion } /** - * List the active versions of a dataset. A version is created each time a dataset is referenced - * by an experiment run. + * List LLM Observability dataset records. + * + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return ApiResponse<LLMObsDatasetVersionsResponse> + * @param parameters Optional parameters for the request. + * @return LLMObsDatasetRecordsListResponse + * @throws ApiException if fails to make API call + */ + public LLMObsDatasetRecordsListResponse listLLMObsDatasetRecords( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + throws ApiException { + return listLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, parameters).getData(); + } + + /** + * List LLM Observability dataset records. + * + *

See {@link #listLLMObsDatasetRecordsWithHttpInfoAsync}. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsDatasetRecordsListResponse> + */ + public CompletableFuture listLLMObsDatasetRecordsAsync( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) { + return listLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all records in an LLM Observability dataset, sorted by creation date, newest first. + * + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsDatasetRecordsListResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6092,13 +6522,13 @@ public CompletableFuture listLLMObsDatasetVersion * * * - * *
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsDatasetVersionsWithHttpInfo( - String projectId, String datasetId) throws ApiException { + public ApiResponse listLLMObsDatasetRecordsWithHttpInfo( + String projectId, String datasetId, ListLLMObsDatasetRecordsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetVersions"; + String operationId = "listLLMObsDatasetRecords"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6109,27 +6539,35 @@ public ApiResponse listLLMObsDatasetVersionsWithH // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions"); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords"); } // verify the required parameter 'datasetId' is set if (datasetId == null) { throw new ApiException( - 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions"); + 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords"); } + Long filterVersion = parameters.filterVersion; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + "v2.LlmObservabilityApi.listLLMObsDatasetRecords", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6142,26 +6580,30 @@ public ApiResponse listLLMObsDatasetVersionsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability dataset versions. + * List LLM Observability dataset records. * - *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. + *

See {@link #listLLMObsDatasetRecordsWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<ApiResponse<LLMObsDatasetVersionsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsListResponse>> */ - public CompletableFuture> - listLLMObsDatasetVersionsWithHttpInfoAsync(String projectId, String datasetId) { + public CompletableFuture> + listLLMObsDatasetRecordsWithHttpInfoAsync( + String projectId, + String datasetId, + ListLLMObsDatasetRecordsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsDatasetVersions"; + String operationId = "listLLMObsDatasetRecords"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -6171,46 +6613,54 @@ public ApiResponse listLLMObsDatasetVersionsWithH // verify the required parameter 'projectId' is set if (projectId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions")); + "Missing the required parameter 'projectId' when calling listLLMObsDatasetRecords")); return result; } // verify the required parameter 'datasetId' is set if (datasetId == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions")); + "Missing the required parameter 'datasetId' when calling listLLMObsDatasetRecords")); return result; } + Long filterVersion = parameters.filterVersion; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[version]", filterVersion)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsDatasetVersions", + "v2.LlmObservabilityApi.listLLMObsDatasetRecords", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -6223,67 +6673,86 @@ public ApiResponse listLLMObsDatasetVersionsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } - /** Manage optional parameters to listLLMObsExperimentEvents. */ - public static class ListLLMObsExperimentEventsOptionalParameters { - private Long pageLimit; + /** Manage optional parameters to listLLMObsDatasets. */ + public static class ListLLMObsDatasetsOptionalParameters { + private String filterName; + private String filterId; private String pageCursor; + private Long pageLimit; /** - * Set pageLimit. + * Set filterName. * - * @param pageLimit Maximum number of spans to return per page. Defaults to 5000. (optional, - * default to 5000) - * @return ListLLMObsExperimentEventsOptionalParameters + * @param filterName Filter datasets by name. (optional) + * @return ListLLMObsDatasetsOptionalParameters */ - public ListLLMObsExperimentEventsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListLLMObsDatasetsOptionalParameters filterName(String filterName) { + this.filterName = filterName; return this; } /** - * Set pageCursor. + * Set filterId. * - * @param pageCursor Opaque cursor from a previous response to fetch the next page of results. - * (optional) - * @return ListLLMObsExperimentEventsOptionalParameters + * @param filterId Filter datasets by dataset ID. (optional) + * @return ListLLMObsDatasetsOptionalParameters */ - public ListLLMObsExperimentEventsOptionalParameters pageCursor(String pageCursor) { + public ListLLMObsDatasetsOptionalParameters filterId(String filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters pageCursor(String pageCursor) { this.pageCursor = pageCursor; return this; } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. (optional) + * @return ListLLMObsDatasetsOptionalParameters + */ + public ListLLMObsDatasetsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsDatasetsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return LLMObsExperimentEventsV2Response + * @param projectId The ID of the LLM Observability project. (required) + * @return LLMObsDatasetsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents(String experimentId) - throws ApiException { - return listLLMObsExperimentEventsWithHttpInfo( - experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + public LLMObsDatasetsResponse listLLMObsDatasets(String projectId) throws ApiException { + return listLLMObsDatasetsWithHttpInfo(projectId, new ListLLMObsDatasetsOptionalParameters()) .getData(); } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @param projectId The ID of the LLM Observability project. (required) + * @return CompletableFuture<LLMObsDatasetsResponse> */ - public CompletableFuture listLLMObsExperimentEventsAsync( - String experimentId) { - return listLLMObsExperimentEventsWithHttpInfoAsync( - experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + public CompletableFuture listLLMObsDatasetsAsync(String projectId) { + return listLLMObsDatasetsWithHttpInfoAsync( + projectId, new ListLLMObsDatasetsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6291,33 +6760,32 @@ experimentId, new ListLLMObsExperimentEventsOptionalParameters()) } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsDatasetsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return LLMObsExperimentEventsV2Response + * @return LLMObsDatasetsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) - throws ApiException { - return listLLMObsExperimentEventsWithHttpInfo(experimentId, parameters).getData(); + public LLMObsDatasetsResponse listLLMObsDatasets( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { + return listLLMObsDatasetsWithHttpInfo(projectId, parameters).getData(); } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @return CompletableFuture<LLMObsDatasetsResponse> */ - public CompletableFuture listLLMObsExperimentEventsAsync( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { - return listLLMObsExperimentEventsWithHttpInfoAsync(experimentId, parameters) + public CompletableFuture listLLMObsDatasetsAsync( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) { + return listLLMObsDatasetsWithHttpInfoAsync(projectId, parameters) .thenApply( response -> { return response.getData(); @@ -6325,12 +6793,11 @@ public CompletableFuture listLLMObsExperimentE } /** - * Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based - * pagination. + * List all LLM Observability datasets for a project, sorted by creation date, newest first. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsExperimentEventsV2Response> + * @return ApiResponse<LLMObsDatasetsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6342,14 +6809,12 @@ public CompletableFuture listLLMObsExperimentE * * * - * *
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsExperimentEventsWithHttpInfo( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) - throws ApiException { + public ApiResponse listLLMObsDatasetsWithHttpInfo( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEvents"; + String operationId = "listLLMObsDatasets"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6357,29 +6822,31 @@ public ApiResponse listLLMObsExperimentEventsW } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - 400, - "Missing the required parameter 'experimentId' when calling listLLMObsExperimentEvents"); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets"); } - Long pageLimit = parameters.pageLimit; + String filterName = parameters.filterName; + String filterId = parameters.filterId; String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + "v2.LlmObservabilityApi.listLLMObsDatasets", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -6394,64 +6861,62 @@ public ApiResponse listLLMObsExperimentEventsW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List events for an LLM Observability experiment. + * List LLM Observability datasets. * - *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + *

See {@link #listLLMObsDatasetsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) + * @param projectId The ID of the LLM Observability project. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> + * @return CompletableFuture<ApiResponse<LLMObsDatasetsResponse>> */ - public CompletableFuture> - listLLMObsExperimentEventsWithHttpInfoAsync( - String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { + public CompletableFuture> listLLMObsDatasetsWithHttpInfoAsync( + String projectId, ListLLMObsDatasetsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEvents"; + String operationId = "listLLMObsDatasets"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEvents")); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasets")); return result; } - Long pageLimit = parameters.pageLimit; + String filterName = parameters.filterName; + String filterId = parameters.filterId; String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEvents", + "v2.LlmObservabilityApi.listLLMObsDatasets", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -6459,8 +6924,7 @@ public ApiResponse listLLMObsExperimentEventsW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -6472,38 +6936,36 @@ public ApiResponse listLLMObsExperimentEventsW localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability experiment spans (v1). + * List LLM Observability dataset versions. * - *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return LLMObsExperimentSpansResponse + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return LLMObsDatasetVersionsResponse * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public LLMObsExperimentSpansResponse listLLMObsExperimentEventsV1(String experimentId) + public LLMObsDatasetVersionsResponse listLLMObsDatasetVersions(String projectId, String datasetId) throws ApiException { - return listLLMObsExperimentEventsV1WithHttpInfo(experimentId).getData(); + return listLLMObsDatasetVersionsWithHttpInfo(projectId, datasetId).getData(); } /** - * List LLM Observability experiment spans (v1). + * List LLM Observability dataset versions. * - *

See {@link #listLLMObsExperimentEventsV1WithHttpInfoAsync}. + *

See {@link #listLLMObsDatasetVersionsWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return CompletableFuture<LLMObsExperimentSpansResponse> - * @deprecated + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<LLMObsDatasetVersionsResponse> */ - @Deprecated - public CompletableFuture listLLMObsExperimentEventsV1Async( - String experimentId) { - return listLLMObsExperimentEventsV1WithHttpInfoAsync(experimentId) + public CompletableFuture listLLMObsDatasetVersionsAsync( + String projectId, String datasetId) { + return listLLMObsDatasetVersionsWithHttpInfoAsync(projectId, datasetId) .thenApply( response -> { return response.getData(); @@ -6511,12 +6973,12 @@ public CompletableFuture listLLMObsExperimentEven } /** - * Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with - * no summary metrics and no pagination. Deprecated in favor of ListLLMObsExperimentEventsV3 - * . + * List the active versions of a dataset. A version is created each time a dataset is referenced + * by an experiment run. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return ApiResponse<LLMObsExperimentSpansResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return ApiResponse<LLMObsDatasetVersionsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -6530,14 +6992,11 @@ public CompletableFuture listLLMObsExperimentEven * * *
429 Too many requests -
500 Internal Server Error -
- * - * @deprecated */ - @Deprecated - public ApiResponse listLLMObsExperimentEventsV1WithHttpInfo( - String experimentId) throws ApiException { + public ApiResponse listLLMObsDatasetVersionsWithHttpInfo( + String projectId, String datasetId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV1"; + String operationId = "listLLMObsDatasetVersions"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6545,24 +7004,28 @@ public ApiResponse listLLMObsExperimentEventsV1Wi } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV1"); + 400, "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + "v2.LlmObservabilityApi.listLLMObsDatasetVersions", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6577,27 +7040,26 @@ public ApiResponse listLLMObsExperimentEventsV1Wi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability experiment spans (v1). + * List LLM Observability dataset versions. * - *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + *

See {@link #listLLMObsDatasetVersionsWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @return CompletableFuture<ApiResponse<LLMObsExperimentSpansResponse>> - * @deprecated + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<ApiResponse<LLMObsDatasetVersionsResponse>> */ - @Deprecated - public CompletableFuture> - listLLMObsExperimentEventsV1WithHttpInfoAsync(String experimentId) { + public CompletableFuture> + listLLMObsDatasetVersionsWithHttpInfoAsync(String projectId, String datasetId) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV1"; + String operationId = "listLLMObsDatasetVersions"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -6605,22 +7067,32 @@ public ApiResponse listLLMObsExperimentEventsV1Wi } Object localVarPostBody = null; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { - CompletableFuture> result = + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV1")); + "Missing the required parameter 'projectId' when calling listLLMObsDatasetVersions")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling listLLMObsDatasetVersions")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/versions" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -6628,7 +7100,7 @@ public ApiResponse listLLMObsExperimentEventsV1Wi try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + "v2.LlmObservabilityApi.listLLMObsDatasetVersions", localVarPath, new ArrayList(), localVarHeaderParams, @@ -6636,7 +7108,7 @@ public ApiResponse listLLMObsExperimentEventsV1Wi new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -6649,38 +7121,67 @@ public ApiResponse listLLMObsExperimentEventsV1Wi localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsExperimentEvents. */ + public static class ListLLMObsExperimentEventsOptionalParameters { + private Long pageLimit; + private String pageCursor; + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of spans to return per page. Defaults to 5000. (optional, + * default to 5000) + * @return ListLLMObsExperimentEventsOptionalParameters + */ + public ListLLMObsExperimentEventsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Opaque cursor from a previous response to fetch the next page of results. + * (optional) + * @return ListLLMObsExperimentEventsOptionalParameters + */ + public ListLLMObsExperimentEventsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } } /** - * List LLM Observability experiment events (v2). + * List events for an LLM Observability experiment. * - *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. * * @param experimentId The ID of the LLM Observability experiment. (required) * @return LLMObsExperimentEventsV2Response * @throws ApiException if fails to make API call - * @deprecated */ - @Deprecated - public LLMObsExperimentEventsV2Response listLLMObsExperimentEventsV2(String experimentId) + public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents(String experimentId) throws ApiException { - return listLLMObsExperimentEventsV2WithHttpInfo(experimentId).getData(); + return listLLMObsExperimentEventsWithHttpInfo( + experimentId, new ListLLMObsExperimentEventsOptionalParameters()) + .getData(); } /** - * List LLM Observability experiment events (v2). + * List events for an LLM Observability experiment. * - *

See {@link #listLLMObsExperimentEventsV2WithHttpInfoAsync}. + *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. * * @param experimentId The ID of the LLM Observability experiment. (required) * @return CompletableFuture<LLMObsExperimentEventsV2Response> - * @deprecated */ - @Deprecated - public CompletableFuture listLLMObsExperimentEventsV2Async( + public CompletableFuture listLLMObsExperimentEventsAsync( String experimentId) { - return listLLMObsExperimentEventsV2WithHttpInfoAsync(experimentId) + return listLLMObsExperimentEventsWithHttpInfoAsync( + experimentId, new ListLLMObsExperimentEventsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -6688,11 +7189,45 @@ public CompletableFuture listLLMObsExperimentE } /** - * Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full - * events payload without pagination. Deprecated: use ListLLMObsExperimentEventsV3 - * instead. + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsExperimentEventsV2Response + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentEventsV2Response listLLMObsExperimentEvents( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) + throws ApiException { + return listLLMObsExperimentEventsWithHttpInfo(experimentId, parameters).getData(); + } + + /** + * List events for an LLM Observability experiment. + * + *

See {@link #listLLMObsExperimentEventsWithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsExperimentEventsV2Response> + */ + public CompletableFuture listLLMObsExperimentEventsAsync( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { + return listLLMObsExperimentEventsWithHttpInfoAsync(experimentId, parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans and experiment-level summary metrics for a given experiment with cursor-based + * pagination. * * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. * @return ApiResponse<LLMObsExperimentEventsV2Response> * @throws ApiException if fails to make API call * @http.response.details @@ -6707,14 +7242,12 @@ public CompletableFuture listLLMObsExperimentE * 429 Too many requests - * 500 Internal Server Error - * - * - * @deprecated */ - @Deprecated - public ApiResponse listLLMObsExperimentEventsV2WithHttpInfo( - String experimentId) throws ApiException { + public ApiResponse listLLMObsExperimentEventsWithHttpInfo( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV2"; + String operationId = "listLLMObsExperimentEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6726,22 +7259,27 @@ public ApiResponse listLLMObsExperimentEventsV if (experimentId == null) { throw new ApiException( 400, - "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV2"); + "Missing the required parameter 'experimentId' when calling listLLMObsExperimentEvents"); } + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" .replaceAll( "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + "v2.LlmObservabilityApi.listLLMObsExperimentEvents", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6758,19 +7296,19 @@ public ApiResponse listLLMObsExperimentEventsV } /** - * List LLM Observability experiment events (v2). + * List events for an LLM Observability experiment. * - *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + *

See {@link #listLLMObsExperimentEventsWithHttpInfo}. * * @param experimentId The ID of the LLM Observability experiment. (required) + * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> - * @deprecated */ - @Deprecated public CompletableFuture> - listLLMObsExperimentEventsV2WithHttpInfoAsync(String experimentId) { + listLLMObsExperimentEventsWithHttpInfoAsync( + String experimentId, ListLLMObsExperimentEventsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsExperimentEventsV2"; + String operationId = "listLLMObsExperimentEvents"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -6790,24 +7328,30 @@ public ApiResponse listLLMObsExperimentEventsV new ApiException( 400, "Missing the required parameter 'experimentId' when calling" - + " listLLMObsExperimentEventsV2")); + + " listLLMObsExperimentEvents")); return result; } + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; // create path and map variables String localVarPath = - "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + "/api/v2/llm-obs/v3/experiments/{experiment_id}/events" .replaceAll( "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + "v2.LlmObservabilityApi.listLLMObsExperimentEvents", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -6829,192 +7373,1163 @@ public ApiResponse listLLMObsExperimentEventsV new GenericType() {}); } - /** Manage optional parameters to listLLMObsExperiments. */ - public static class ListLLMObsExperimentsOptionalParameters { - private String filterProjectId; - private String filterDatasetId; - private String filterId; - private String filterName; - private String filterExperiment; - private String filterMetadata; - private String filterParentExperimentId; - private Boolean filterIsDeleted; - private Boolean includeUserData; - private Boolean includeDatasetNames; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterProjectId. - * - * @param filterProjectId Filter experiments by project ID. Required if filter[dataset_id] - * is not provided. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterProjectId(String filterProjectId) { - this.filterProjectId = filterProjectId; - return this; - } + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return LLMObsExperimentSpansResponse + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public LLMObsExperimentSpansResponse listLLMObsExperimentEventsV1(String experimentId) + throws ApiException { + return listLLMObsExperimentEventsV1WithHttpInfo(experimentId).getData(); + } - /** - * Set filterDatasetId. - * - * @param filterDatasetId Filter experiments by dataset ID. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterDatasetId(String filterDatasetId) { - this.filterDatasetId = filterDatasetId; - return this; - } + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<LLMObsExperimentSpansResponse> + * @deprecated + */ + @Deprecated + public CompletableFuture listLLMObsExperimentEventsV1Async( + String experimentId) { + return listLLMObsExperimentEventsV1WithHttpInfoAsync(experimentId) + .thenApply( + response -> { + return response.getData(); + }); + } - /** - * Set filterId. - * + /** + * Retrieve spans with their evaluation metrics for a given experiment. Returns spans only, with + * no summary metrics and no pagination. Deprecated in favor of ListLLMObsExperimentEventsV3 + * . + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return ApiResponse<LLMObsExperimentSpansResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse listLLMObsExperimentEventsV1WithHttpInfo( + String experimentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV1"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV1"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiment spans (v1). + * + *

See {@link #listLLMObsExperimentEventsV1WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentSpansResponse>> + * @deprecated + */ + @Deprecated + public CompletableFuture> + listLLMObsExperimentEventsV1WithHttpInfoAsync(String experimentId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV1"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV1")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV1", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return LLMObsExperimentEventsV2Response + * @throws ApiException if fails to make API call + * @deprecated + */ + @Deprecated + public LLMObsExperimentEventsV2Response listLLMObsExperimentEventsV2(String experimentId) + throws ApiException { + return listLLMObsExperimentEventsV2WithHttpInfo(experimentId).getData(); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfoAsync}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<LLMObsExperimentEventsV2Response> + * @deprecated + */ + @Deprecated + public CompletableFuture listLLMObsExperimentEventsV2Async( + String experimentId) { + return listLLMObsExperimentEventsV2WithHttpInfoAsync(experimentId) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve spans and experiment-level summary metrics for a given experiment. Returns the full + * events payload without pagination. Deprecated: use ListLLMObsExperimentEventsV3 + * instead. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return ApiResponse<LLMObsExperimentEventsV2Response> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
+ * + * @deprecated + */ + @Deprecated + public ApiResponse listLLMObsExperimentEventsV2WithHttpInfo( + String experimentId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV2"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV2"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiment events (v2). + * + *

See {@link #listLLMObsExperimentEventsV2WithHttpInfo}. + * + * @param experimentId The ID of the LLM Observability experiment. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentEventsV2Response>> + * @deprecated + */ + @Deprecated + public CompletableFuture> + listLLMObsExperimentEventsV2WithHttpInfoAsync(String experimentId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperimentEventsV2"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'experimentId' when calling" + + " listLLMObsExperimentEventsV2")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v2/experiments/{experiment_id}/events" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperimentEventsV2", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsExperiments. */ + public static class ListLLMObsExperimentsOptionalParameters { + private String filterProjectId; + private String filterDatasetId; + private String filterId; + private String filterName; + private String filterExperiment; + private String filterMetadata; + private String filterParentExperimentId; + private Boolean filterIsDeleted; + private Boolean includeUserData; + private Boolean includeDatasetNames; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterProjectId. + * + * @param filterProjectId Filter experiments by project ID. Required if filter[dataset_id] + * is not provided. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterProjectId(String filterProjectId) { + this.filterProjectId = filterProjectId; + return this; + } + + /** + * Set filterDatasetId. + * + * @param filterDatasetId Filter experiments by dataset ID. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterDatasetId(String filterDatasetId) { + this.filterDatasetId = filterDatasetId; + return this; + } + + /** + * Set filterId. + * * @param filterId Filter experiments by experiment ID. Can be specified multiple times. * (optional) * @return ListLLMObsExperimentsOptionalParameters */ - public ListLLMObsExperimentsOptionalParameters filterId(String filterId) { - this.filterId = filterId; + public ListLLMObsExperimentsOptionalParameters filterId(String filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set filterName. + * + * @param filterName Filter experiments by their exact run name. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set filterExperiment. + * + * @param filterExperiment Filter by logical experiment name. This is the name + * field set when creating an experiment through POST /experiments. Returns all + * experiment runs that share the same name, enabling cross-commit and cross-branch + * comparisons. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterExperiment(String filterExperiment) { + this.filterExperiment = filterExperiment; + return this; + } + + /** + * Set filterMetadata. + * + * @param filterMetadata Filter by JSONB metadata containment. Provide a JSON object string + * where experiments whose metadata contains all specified key-value pairs are returned. For + * example: {"commit":"abc123","branch":"main"}. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterMetadata(String filterMetadata) { + this.filterMetadata = filterMetadata; + return this; + } + + /** + * Set filterParentExperimentId. + * + * @param filterParentExperimentId Filter experiments by the ID of their parent (baseline) + * experiment. Returns all experiments that were run against the given baseline. Can be + * specified multiple times. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterParentExperimentId( + String filterParentExperimentId) { + this.filterParentExperimentId = filterParentExperimentId; + return this; + } + + /** + * Set filterIsDeleted. + * + * @param filterIsDeleted When true, return only soft-deleted experiments. Defaults + * to false. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters filterIsDeleted(Boolean filterIsDeleted) { + this.filterIsDeleted = filterIsDeleted; + return this; + } + + /** + * Set includeUserData. + * + * @param includeUserData When true, enrich each experiment with its author's user + * data in the author field. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters includeUserData(Boolean includeUserData) { + this.includeUserData = includeUserData; + return this; + } + + /** + * Set includeDatasetNames. + * + * @param includeDatasetNames When true, enrich each experiment with its dataset + * name in the dataset_name field. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters includeDatasetNames( + Boolean includeDatasetNames) { + this.includeDatasetNames = includeDatasetNames; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the pagination cursor returned in meta.after to retrieve + * the next page of results. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. Values above 5000 are clamped + * to 5000. Defaults to 5000. (optional) + * @return ListLLMObsExperimentsOptionalParameters + */ + public ListLLMObsExperimentsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; return this; } + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @return LLMObsExperimentsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentsResponse listLLMObsExperiments() throws ApiException { + return listLLMObsExperimentsWithHttpInfo(new ListLLMObsExperimentsOptionalParameters()) + .getData(); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + * + * @return CompletableFuture<LLMObsExperimentsResponse> + */ + public CompletableFuture listLLMObsExperimentsAsync() { + return listLLMObsExperimentsWithHttpInfoAsync(new ListLLMObsExperimentsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return LLMObsExperimentsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsExperimentsResponse listLLMObsExperiments( + ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + return listLLMObsExperimentsWithHttpInfo(parameters).getData(); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsExperimentsResponse> + */ + public CompletableFuture listLLMObsExperimentsAsync( + ListLLMObsExperimentsOptionalParameters parameters) { + return listLLMObsExperimentsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all LLM Observability experiments sorted by creation date, newest first. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsExperimentsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse listLLMObsExperimentsWithHttpInfo( + ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperiments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + String filterProjectId = parameters.filterProjectId; + String filterDatasetId = parameters.filterDatasetId; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String filterExperiment = parameters.filterExperiment; + String filterMetadata = parameters.filterMetadata; + String filterParentExperimentId = parameters.filterParentExperimentId; + Boolean filterIsDeleted = parameters.filterIsDeleted; + Boolean includeUserData = parameters.includeUserData; + Boolean includeDatasetNames = parameters.includeDatasetNames; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/experiments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[user_data]", includeUserData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperiments", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM Observability experiments. + * + *

See {@link #listLLMObsExperimentsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsExperimentsResponse>> + */ + public CompletableFuture> + listLLMObsExperimentsWithHttpInfoAsync(ListLLMObsExperimentsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsExperiments"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + String filterProjectId = parameters.filterProjectId; + String filterDatasetId = parameters.filterDatasetId; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String filterExperiment = parameters.filterExperiment; + String filterMetadata = parameters.filterMetadata; + String filterParentExperimentId = parameters.filterParentExperimentId; + Boolean filterIsDeleted = parameters.filterIsDeleted; + Boolean includeUserData = parameters.includeUserData; + Boolean includeDatasetNames = parameters.includeDatasetNames; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/experiments"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[user_data]", includeUserData)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsExperiments", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @return List<LLMObsIntegrationAccount> + * @throws ApiException if fails to make API call + */ + public List listLLMObsIntegrationAccounts( + LLMObsIntegrationName integration) throws ApiException { + return listLLMObsIntegrationAccountsWithHttpInfo(integration).getData(); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfoAsync}. + * + * @param integration The name of the LLM integration. (required) + * @return CompletableFuture<List<LLMObsIntegrationAccount>> + */ + public CompletableFuture> listLLMObsIntegrationAccountsAsync( + LLMObsIntegrationName integration) { + return listLLMObsIntegrationAccountsWithHttpInfoAsync(integration) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Retrieve the list of configured accounts for the specified LLM provider integration. + * + * @param integration The name of the LLM integration. (required) + * @return ApiResponse<List<LLMObsIntegrationAccount>> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse> listLLMObsIntegrationAccountsWithHttpInfo( + LLMObsIntegrationName integration) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + + // verify the required parameter 'integration' is set + if (integration == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationAccounts"); + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/accounts" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** + * List LLM integration accounts. + * + *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationAccount>>> + */ + public CompletableFuture>> + listLLMObsIntegrationAccountsWithHttpInfoAsync(LLMObsIntegrationName integration) { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationAccounts"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'integration' is set + if (integration == null) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationAccounts")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/accounts" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return List<LLMObsIntegrationModel> + * @throws ApiException if fails to make API call + */ + public List listLLMObsIntegrationModels( + LLMObsIntegrationName integration, String accountId) throws ApiException { + return listLLMObsIntegrationModelsWithHttpInfo(integration, accountId).getData(); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfoAsync}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return CompletableFuture<List<LLMObsIntegrationModel>> + */ + public CompletableFuture> listLLMObsIntegrationModelsAsync( + LLMObsIntegrationName integration, String accountId) { + return listLLMObsIntegrationModelsWithHttpInfoAsync(integration, accountId) + .thenApply( + response -> { + return response.getData(); + }); + } - /** - * Set filterName. - * - * @param filterName Filter experiments by their exact run name. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterName(String filterName) { - this.filterName = filterName; - return this; + /** + * Retrieve the list of models available for the specified LLM provider integration and account. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return ApiResponse<List<LLMObsIntegrationModel>> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
+ */ + public ApiResponse> listLLMObsIntegrationModelsWithHttpInfo( + LLMObsIntegrationName integration, String accountId) throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } + Object localVarPostBody = null; - /** - * Set filterExperiment. - * - * @param filterExperiment Filter by logical experiment name. This is the name - * field set when creating an experiment through POST /experiments. Returns all - * experiment runs that share the same name, enabling cross-commit and cross-branch - * comparisons. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterExperiment(String filterExperiment) { - this.filterExperiment = filterExperiment; - return this; + // verify the required parameter 'integration' is set + if (integration == null) { + throw new ApiException( + 400, + "Missing the required parameter 'integration' when calling listLLMObsIntegrationModels"); } - /** - * Set filterMetadata. - * - * @param filterMetadata Filter by JSONB metadata containment. Provide a JSON object string - * where experiments whose metadata contains all specified key-value pairs are returned. For - * example: {"commit":"abc123","branch":"main"}. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterMetadata(String filterMetadata) { - this.filterMetadata = filterMetadata; - return this; + // verify the required parameter 'accountId' is set + if (accountId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'accountId' when calling listLLMObsIntegrationModels"); } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); - /** - * Set filterParentExperimentId. - * - * @param filterParentExperimentId Filter experiments by the ID of their parent (baseline) - * experiment. Returns all experiments that were run against the given baseline. Can be - * specified multiple times. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterParentExperimentId( - String filterParentExperimentId) { - this.filterParentExperimentId = filterParentExperimentId; - return this; + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** + * List LLM integration models. + * + *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + * + * @param integration The name of the LLM integration. (required) + * @param accountId The ID of the integration account. (required) + * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationModel>>> + */ + public CompletableFuture>> + listLLMObsIntegrationModelsWithHttpInfoAsync( + LLMObsIntegrationName integration, String accountId) { + // Check if unstable operation is enabled + String operationId = "listLLMObsIntegrationModels"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; } + Object localVarPostBody = null; - /** - * Set filterIsDeleted. - * - * @param filterIsDeleted When true, return only soft-deleted experiments. Defaults - * to false. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters filterIsDeleted(Boolean filterIsDeleted) { - this.filterIsDeleted = filterIsDeleted; - return this; + // verify the required parameter 'integration' is set + if (integration == null) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'integration' when calling" + + " listLLMObsIntegrationModels")); + return result; } - /** - * Set includeUserData. - * - * @param includeUserData When true, enrich each experiment with its author's user - * data in the author field. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters includeUserData(Boolean includeUserData) { - this.includeUserData = includeUserData; - return this; + // verify the required parameter 'accountId' is set + if (accountId == null) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'accountId' when calling" + + " listLLMObsIntegrationModels")); + return result; } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" + .replaceAll( + "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) + .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); - /** - * Set includeDatasetNames. - * - * @param includeDatasetNames When true, enrich each experiment with its dataset - * name in the dataset_name field. (optional) - * @return ListLLMObsExperimentsOptionalParameters - */ - public ListLLMObsExperimentsOptionalParameters includeDatasetNames( - Boolean includeDatasetNames) { - this.includeDatasetNames = includeDatasetNames; - return this; + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture>> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType>() {}); + } + + /** Manage optional parameters to listLLMObsPatternsClusteredPoints. */ + public static class ListLLMObsPatternsClusteredPointsOptionalParameters { + private Long pageSize; + private String pageToken; /** - * Set pageCursor. + * Set pageSize. * - * @param pageCursor Use the pagination cursor returned in meta.after to retrieve - * the next page of results. (optional) - * @return ListLLMObsExperimentsOptionalParameters + * @param pageSize Maximum number of clustered points to return per page. (optional) + * @return ListLLMObsPatternsClusteredPointsOptionalParameters */ - public ListLLMObsExperimentsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; + public ListLLMObsPatternsClusteredPointsOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; return this; } /** - * Set pageLimit. + * Set pageToken. * - * @param pageLimit Maximum number of results to return per page. Values above 5000 are clamped - * to 5000. Defaults to 5000. (optional) - * @return ListLLMObsExperimentsOptionalParameters + * @param pageToken Pagination token to retrieve the next page of clustered points. (optional) + * @return ListLLMObsPatternsClusteredPointsOptionalParameters */ - public ListLLMObsExperimentsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; + public ListLLMObsPatternsClusteredPointsOptionalParameters pageToken(String pageToken) { + this.pageToken = pageToken; return this; } } /** - * List LLM Observability experiments. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. * - * @return LLMObsExperimentsResponse + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @return LLMObsPatternsClusteredPointsResponse * @throws ApiException if fails to make API call - */ - public LLMObsExperimentsResponse listLLMObsExperiments() throws ApiException { - return listLLMObsExperimentsWithHttpInfo(new ListLLMObsExperimentsOptionalParameters()) + */ + public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints(String topicId) + throws ApiException { + return listLLMObsPatternsClusteredPointsWithHttpInfo( + topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) .getData(); } /** - * List LLM Observability experiments. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. * - * @return CompletableFuture<LLMObsExperimentsResponse> + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> */ - public CompletableFuture listLLMObsExperimentsAsync() { - return listLLMObsExperimentsWithHttpInfoAsync(new ListLLMObsExperimentsOptionalParameters()) + public CompletableFuture + listLLMObsPatternsClusteredPointsAsync(String topicId) { + return listLLMObsPatternsClusteredPointsWithHttpInfoAsync( + topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -7022,30 +8537,34 @@ public CompletableFuture listLLMObsExperimentsAsync() } /** - * List LLM Observability experiments. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. * + * @param topicId The ID of the topic to retrieve clustered points for. (required) * @param parameters Optional parameters for the request. - * @return LLMObsExperimentsResponse + * @return LLMObsPatternsClusteredPointsResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentsResponse listLLMObsExperiments( - ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { - return listLLMObsExperimentsWithHttpInfo(parameters).getData(); + public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) + throws ApiException { + return listLLMObsPatternsClusteredPointsWithHttpInfo(topicId, parameters).getData(); } /** - * List LLM Observability experiments. + * List patterns clustered points. * - *

See {@link #listLLMObsExperimentsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. * + * @param topicId The ID of the topic to retrieve clustered points for. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsExperimentsResponse> + * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> */ - public CompletableFuture listLLMObsExperimentsAsync( - ListLLMObsExperimentsOptionalParameters parameters) { - return listLLMObsExperimentsWithHttpInfoAsync(parameters) + public CompletableFuture + listLLMObsPatternsClusteredPointsAsync( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { + return listLLMObsPatternsClusteredPointsWithHttpInfoAsync(topicId, parameters) .thenApply( response -> { return response.getData(); @@ -7053,10 +8572,12 @@ public CompletableFuture listLLMObsExperimentsAsync( } /** - * List all LLM Observability experiments sorted by creation date, newest first. + * List the data points grouped into a topic. For a parent topic, points from all of its leaf + * topics are returned. * + * @param topicId The ID of the topic to retrieve clustered points for. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsExperimentsResponse> + * @return ApiResponse<LLMObsPatternsClusteredPointsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7066,62 +8587,203 @@ public CompletableFuture listLLMObsExperimentsAsync( * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsExperimentsWithHttpInfo( - ListLLMObsExperimentsOptionalParameters parameters) throws ApiException { + public ApiResponse + listLLMObsPatternsClusteredPointsWithHttpInfo( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsExperiments"; + String operationId = "listLLMObsPatternsClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String filterProjectId = parameters.filterProjectId; - String filterDatasetId = parameters.filterDatasetId; - String filterId = parameters.filterId; - String filterName = parameters.filterName; - String filterExperiment = parameters.filterExperiment; - String filterMetadata = parameters.filterMetadata; - String filterParentExperimentId = parameters.filterParentExperimentId; - Boolean filterIsDeleted = parameters.filterIsDeleted; - Boolean includeUserData = parameters.includeUserData; - Boolean includeDatasetNames = parameters.includeDatasetNames; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + + // verify the required parameter 'topicId' is set + if (topicId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'topicId' when calling" + + " listLLMObsPatternsClusteredPoints"); + } + Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experiments"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[user_data]", includeUserData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + return apiClient.invokeAPI( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List patterns clustered points. + * + *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. + * + * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsPatternsClusteredPointsResponse>> + */ + public CompletableFuture> + listLLMObsPatternsClusteredPointsWithHttpInfoAsync( + String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsClusteredPoints"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); + return result; + } + Object localVarPostBody = null; + + // verify the required parameter 'topicId' is set + if (topicId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'topicId' when calling" + + " listLLMObsPatternsClusteredPoints")); + return result; + } + Long pageSize = parameters.pageSize; + String pageToken = parameters.pageToken; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; + + List localVarQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + + localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", + localVarPath, + localVarQueryParams, + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * List patterns configurations. + * + *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. + * + * @return LLMObsPatternsConfigsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsConfigsResponse listLLMObsPatternsConfigs() throws ApiException { + return listLLMObsPatternsConfigsWithHttpInfo().getData(); + } + + /** + * List patterns configurations. + * + *

See {@link #listLLMObsPatternsConfigsWithHttpInfoAsync}. + * + * @return CompletableFuture<LLMObsPatternsConfigsResponse> + */ + public CompletableFuture listLLMObsPatternsConfigsAsync() { + return listLLMObsPatternsConfigsWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all patterns configurations for the organization. + * + * @return ApiResponse<LLMObsPatternsConfigsResponse> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
429 Too many requests -
500 Internal Server Error -
+ */ + public ApiResponse listLLMObsPatternsConfigsWithHttpInfo() + throws ApiException { + // Check if unstable operation is enabled + String operationId = "listLLMObsPatternsConfigs"; + if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { + apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); + } else { + throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); + } + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + + Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperiments", + "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -7134,81 +8796,49 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability experiments. + * List patterns configurations. * - *

See {@link #listLLMObsExperimentsWithHttpInfo}. + *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsExperimentsResponse>> + * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigsResponse>> */ - public CompletableFuture> - listLLMObsExperimentsWithHttpInfoAsync(ListLLMObsExperimentsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsPatternsConfigsWithHttpInfoAsync() { // Check if unstable operation is enabled - String operationId = "listLLMObsExperiments"; + String operationId = "listLLMObsPatternsConfigs"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - String filterProjectId = parameters.filterProjectId; - String filterDatasetId = parameters.filterDatasetId; - String filterId = parameters.filterId; - String filterName = parameters.filterName; - String filterExperiment = parameters.filterExperiment; - String filterMetadata = parameters.filterMetadata; - String filterParentExperimentId = parameters.filterParentExperimentId; - Boolean filterIsDeleted = parameters.filterIsDeleted; - Boolean includeUserData = parameters.includeUserData; - Boolean includeDatasetNames = parameters.includeDatasetNames; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experiments"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[project_id]", filterProjectId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[dataset_id]", filterDatasetId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[experiment]", filterExperiment)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[metadata]", filterMetadata)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[parent_experiment_id]", filterParentExperimentId)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "filter[is_deleted]", filterIsDeleted)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[user_data]", includeUserData)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include[dataset_names]", includeDatasetNames)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsExperiments", + "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -7220,34 +8850,33 @@ public ApiResponse listLLMObsExperimentsWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM integration accounts. + * List patterns runs. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @return List<LLMObsIntegrationAccount> + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsRunsResponse * @throws ApiException if fails to make API call */ - public List listLLMObsIntegrationAccounts( - LLMObsIntegrationName integration) throws ApiException { - return listLLMObsIntegrationAccountsWithHttpInfo(integration).getData(); + public LLMObsPatternsRunsResponse listLLMObsPatternsRuns(String configId) throws ApiException { + return listLLMObsPatternsRunsWithHttpInfo(configId).getData(); } /** - * List LLM integration accounts. + * List patterns runs. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfoAsync}. * - * @param integration The name of the LLM integration. (required) - * @return CompletableFuture<List<LLMObsIntegrationAccount>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsRunsResponse> */ - public CompletableFuture> listLLMObsIntegrationAccountsAsync( - LLMObsIntegrationName integration) { - return listLLMObsIntegrationAccountsWithHttpInfoAsync(integration) + public CompletableFuture listLLMObsPatternsRunsAsync( + String configId) { + return listLLMObsPatternsRunsWithHttpInfoAsync(configId) .thenApply( response -> { return response.getData(); @@ -7255,10 +8884,10 @@ public CompletableFuture> listLLMObsIntegrationAc } /** - * Retrieve the list of configured accounts for the specified LLM provider integration. + * List the completed patterns runs for a configuration. * - * @param integration The name of the LLM integration. (required) - * @return ApiResponse<List<LLMObsIntegrationAccount>> + * @param configId The ID of the patterns configuration. (required) + * @return ApiResponse<LLMObsPatternsRunsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7268,13 +8897,15 @@ public CompletableFuture> listLLMObsIntegrationAc * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse> listLLMObsIntegrationAccountsWithHttpInfo( - LLMObsIntegrationName integration) throws ApiException { + public ApiResponse listLLMObsPatternsRunsWithHttpInfo(String configId) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationAccounts"; + String operationId = "listLLMObsPatternsRuns"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7282,26 +8913,24 @@ public ApiResponse> listLLMObsIntegrationAccounts } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( - 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationAccounts"); + 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns"); } // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/accounts" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + "v2.LlmObservabilityApi.listLLMObsPatternsRuns", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -7314,65 +8943,61 @@ public ApiResponse> listLLMObsIntegrationAccounts localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** - * List LLM integration accounts. + * List patterns runs. * - *

See {@link #listLLMObsIntegrationAccountsWithHttpInfo}. + *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationAccount>>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsRunsResponse>> */ - public CompletableFuture>> - listLLMObsIntegrationAccountsWithHttpInfoAsync(LLMObsIntegrationName integration) { + public CompletableFuture> + listLLMObsPatternsRunsWithHttpInfoAsync(String configId) { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationAccounts"; + String operationId = "listLLMObsPatternsRuns"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture>> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - CompletableFuture>> result = - new CompletableFuture<>(); + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationAccounts")); + "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns")); return result; } // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/accounts" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationAccounts", + "v2.LlmObservabilityApi.listLLMObsPatternsRuns", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture>> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -7384,36 +9009,87 @@ public ApiResponse> listLLMObsIntegrationAccounts localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsPatternsTopics. */ + public static class ListLLMObsPatternsTopicsOptionalParameters { + private String runId; + + /** + * Set runId. + * + * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. + * (optional) + * @return ListLLMObsPatternsTopicsOptionalParameters + */ + public ListLLMObsPatternsTopicsOptionalParameters runId(String runId) { + this.runId = runId; + return this; + } } /** - * List LLM integration models. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return List<LLMObsIntegrationModel> + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsTopicsResponse * @throws ApiException if fails to make API call */ - public List listLLMObsIntegrationModels( - LLMObsIntegrationName integration, String accountId) throws ApiException { - return listLLMObsIntegrationModelsWithHttpInfo(integration, accountId).getData(); + public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics(String configId) + throws ApiException { + return listLLMObsPatternsTopicsWithHttpInfo( + configId, new ListLLMObsPatternsTopicsOptionalParameters()) + .getData(); } /** - * List LLM integration models. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return CompletableFuture<List<LLMObsIntegrationModel>> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsTopicsResponse> + */ + public CompletableFuture listLLMObsPatternsTopicsAsync( + String configId) { + return listLLMObsPatternsTopicsWithHttpInfoAsync( + configId, new ListLLMObsPatternsTopicsOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List patterns topics. + * + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return LLMObsPatternsTopicsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { + return listLLMObsPatternsTopicsWithHttpInfo(configId, parameters).getData(); + } + + /** + * List patterns topics. + * + *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. + * + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsPatternsTopicsResponse> */ - public CompletableFuture> listLLMObsIntegrationModelsAsync( - LLMObsIntegrationName integration, String accountId) { - return listLLMObsIntegrationModelsWithHttpInfoAsync(integration, accountId) + public CompletableFuture listLLMObsPatternsTopicsAsync( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { + return listLLMObsPatternsTopicsWithHttpInfoAsync(configId, parameters) .thenApply( response -> { return response.getData(); @@ -7421,11 +9097,12 @@ public CompletableFuture> listLLMObsIntegrationMode } /** - * Retrieve the list of models available for the specified LLM provider integration and account. + * List the topics discovered by a patterns run. When no run is specified, the most recent + * completed run is used. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return ApiResponse<List<LLMObsIntegrationModel>> + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsPatternsTopicsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7435,13 +9112,15 @@ public CompletableFuture> listLLMObsIntegrationMode * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse> listLLMObsIntegrationModelsWithHttpInfo( - LLMObsIntegrationName integration, String accountId) throws ApiException { + public ApiResponse listLLMObsPatternsTopicsWithHttpInfo( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationModels"; + String operationId = "listLLMObsPatternsTopics"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7449,33 +9128,26 @@ public ApiResponse> listLLMObsIntegrationModelsWith } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - throw new ApiException( - 400, - "Missing the required parameter 'integration' when calling listLLMObsIntegrationModels"); - } - - // verify the required parameter 'accountId' is set - if (accountId == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( - 400, - "Missing the required parameter 'accountId' when calling listLLMObsIntegrationModels"); + 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics"); } + String runId = parameters.runId; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + "v2.LlmObservabilityApi.listLLMObsPatternsTopics", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -7488,27 +9160,27 @@ public ApiResponse> listLLMObsIntegrationModelsWith localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } /** - * List LLM integration models. + * List patterns topics. * - *

See {@link #listLLMObsIntegrationModelsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. * - * @param integration The name of the LLM integration. (required) - * @param accountId The ID of the integration account. (required) - * @return CompletableFuture<ApiResponse<List<LLMObsIntegrationModel>>> + * @param configId The ID of the patterns configuration. (required) + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsPatternsTopicsResponse>> */ - public CompletableFuture>> - listLLMObsIntegrationModelsWithHttpInfoAsync( - LLMObsIntegrationName integration, String accountId) { + public CompletableFuture> + listLLMObsPatternsTopicsWithHttpInfoAsync( + String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsIntegrationModels"; + String operationId = "listLLMObsPatternsTopics"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -7516,51 +9188,39 @@ public ApiResponse> listLLMObsIntegrationModelsWith } Object localVarPostBody = null; - // verify the required parameter 'integration' is set - if (integration == null) { - CompletableFuture>> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'integration' when calling" - + " listLLMObsIntegrationModels")); - return result; - } - - // verify the required parameter 'accountId' is set - if (accountId == null) { - CompletableFuture>> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'accountId' when calling" - + " listLLMObsIntegrationModels")); + "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics")); return result; } + String runId = parameters.runId; // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/integrations/{integration}/{account_id}/models" - .replaceAll( - "\\{" + "integration" + "\\}", apiClient.escapeString(integration.toString())) - .replaceAll("\\{" + "account_id" + "\\}", apiClient.escapeString(accountId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsIntegrationModels", + "v2.LlmObservabilityApi.listLLMObsPatternsTopics", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture>> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -7573,65 +9233,68 @@ public ApiResponse> listLLMObsIntegrationModelsWith localVarPostBody, new HashMap(), false, - new GenericType>() {}); + new GenericType() {}); } - /** Manage optional parameters to listLLMObsPatternsClusteredPoints. */ - public static class ListLLMObsPatternsClusteredPointsOptionalParameters { - private Long pageSize; - private String pageToken; + /** Manage optional parameters to listLLMObsPatternsTopicsWithClusteredPoints. */ + public static class ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters { + private String runId; + private Boolean includeMetrics; /** - * Set pageSize. + * Set runId. * - * @param pageSize Maximum number of clustered points to return per page. (optional) - * @return ListLLMObsPatternsClusteredPointsOptionalParameters + * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. + * (optional) + * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters */ - public ListLLMObsPatternsClusteredPointsOptionalParameters pageSize(Long pageSize) { - this.pageSize = pageSize; + public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters runId(String runId) { + this.runId = runId; return this; } /** - * Set pageToken. + * Set includeMetrics. * - * @param pageToken Pagination token to retrieve the next page of clustered points. (optional) - * @return ListLLMObsPatternsClusteredPointsOptionalParameters + * @param includeMetrics When true, enrich each clustered point with span metrics such as + * status, duration, token counts, estimated cost, and evaluations. (optional) + * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters */ - public ListLLMObsPatternsClusteredPointsOptionalParameters pageToken(String pageToken) { - this.pageToken = pageToken; + public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters includeMetrics( + Boolean includeMetrics) { + this.includeMetrics = includeMetrics; return this; } } /** - * List patterns clustered points. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. * - * @param topicId The ID of the topic to retrieve clustered points for. (required) - * @return LLMObsPatternsClusteredPointsResponse + * @param configId The ID of the patterns configuration. (required) + * @return LLMObsPatternsTopicsWithClusteredPointsResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints(String topicId) - throws ApiException { - return listLLMObsPatternsClusteredPointsWithHttpInfo( - topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) + public LLMObsPatternsTopicsWithClusteredPointsResponse + listLLMObsPatternsTopicsWithClusteredPoints(String configId) throws ApiException { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( + configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) .getData(); } /** - * List patterns clustered points. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. * - * @param topicId The ID of the topic to retrieve clustered points for. (required) - * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> + * @param configId The ID of the patterns configuration. (required) + * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> */ - public CompletableFuture - listLLMObsPatternsClusteredPointsAsync(String topicId) { - return listLLMObsPatternsClusteredPointsWithHttpInfoAsync( - topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) + public CompletableFuture + listLLMObsPatternsTopicsWithClusteredPointsAsync(String configId) { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( + configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -7639,34 +9302,36 @@ topicId, new ListLLMObsPatternsClusteredPointsOptionalParameters()) } /** - * List patterns clustered points. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. * - * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return LLMObsPatternsClusteredPointsResponse + * @return LLMObsPatternsTopicsWithClusteredPointsResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( - String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) - throws ApiException { - return listLLMObsPatternsClusteredPointsWithHttpInfo(topicId, parameters).getData(); + public LLMObsPatternsTopicsWithClusteredPointsResponse + listLLMObsPatternsTopicsWithClusteredPoints( + String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) + throws ApiException { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo(configId, parameters).getData(); } /** - * List patterns clustered points. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfoAsync}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. * - * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsPatternsClusteredPointsResponse> + * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> */ - public CompletableFuture - listLLMObsPatternsClusteredPointsAsync( - String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { - return listLLMObsPatternsClusteredPointsWithHttpInfoAsync(topicId, parameters) + public CompletableFuture + listLLMObsPatternsTopicsWithClusteredPointsAsync( + String configId, + ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { + return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync(configId, parameters) .thenApply( response -> { return response.getData(); @@ -7674,12 +9339,12 @@ public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( } /** - * List the data points grouped into a topic. For a parent topic, points from all of its leaf - * topics are returned. + * List the topics discovered by a patterns run, with the clustered points attached inline to each + * leaf topic. When no run is specified, the most recent completed run is used. * - * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsPatternsClusteredPointsResponse> + * @return ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7694,12 +9359,12 @@ public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( * *
500 Internal Server Error -
*/ - public ApiResponse - listLLMObsPatternsClusteredPointsWithHttpInfo( - String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) + public ApiResponse + listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( + String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsClusteredPoints"; + String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -7707,28 +9372,28 @@ public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( } Object localVarPostBody = null; - // verify the required parameter 'topicId' is set - if (topicId == null) { + // verify the required parameter 'configId' is set + if (configId == null) { throw new ApiException( 400, - "Missing the required parameter 'topicId' when calling" - + " listLLMObsPatternsClusteredPoints"); + "Missing the required parameter 'configId' when calling" + + " listLLMObsPatternsTopicsWithClusteredPoints"); } - Long pageSize = parameters.pageSize; - String pageToken = parameters.pageToken; + String runId = parameters.runId; + Boolean includeMetrics = parameters.includeMetrics; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", + "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -7743,27 +9408,29 @@ public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List patterns clustered points. + * List patterns topics with clustered points. * - *

See {@link #listLLMObsPatternsClusteredPointsWithHttpInfo}. + *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. * - * @param topicId The ID of the topic to retrieve clustered points for. (required) + * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsPatternsClusteredPointsResponse>> + * @return + * CompletableFuture<ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse>> */ - public CompletableFuture> - listLLMObsPatternsClusteredPointsWithHttpInfoAsync( - String topicId, ListLLMObsPatternsClusteredPointsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( + String configId, + ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsClusteredPoints"; + String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -7771,34 +9438,34 @@ public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( } Object localVarPostBody = null; - // verify the required parameter 'topicId' is set - if (topicId == null) { - CompletableFuture> result = + // verify the required parameter 'configId' is set + if (configId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'topicId' when calling" - + " listLLMObsPatternsClusteredPoints")); + "Missing the required parameter 'configId' when calling" + + " listLLMObsPatternsTopicsWithClusteredPoints")); return result; } - Long pageSize = parameters.pageSize; - String pageToken = parameters.pageToken; + String runId = parameters.runId; + Boolean includeMetrics = parameters.includeMetrics; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-clustered-points"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "topic_id", topicId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_size", pageSize)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page_token", pageToken)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsClusteredPoints", + "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -7806,7 +9473,7 @@ public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -7819,30 +9486,82 @@ public LLMObsPatternsClusteredPointsResponse listLLMObsPatternsClusteredPoints( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsProjects. */ + public static class ListLLMObsProjectsOptionalParameters { + private String filterId; + private String filterName; + private String pageCursor; + private Long pageLimit; + + /** + * Set filterId. + * + * @param filterId Filter projects by project ID. (optional) + * @return ListLLMObsProjectsOptionalParameters + */ + public ListLLMObsProjectsOptionalParameters filterId(String filterId) { + this.filterId = filterId; + return this; + } + + /** + * Set filterName. + * + * @param filterName Filter projects by name. (optional) + * @return ListLLMObsProjectsOptionalParameters + */ + public ListLLMObsProjectsOptionalParameters filterName(String filterName) { + this.filterName = filterName; + return this; + } + + /** + * Set pageCursor. + * + * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) + * @return ListLLMObsProjectsOptionalParameters + */ + public ListLLMObsProjectsOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } + + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of results to return per page. (optional) + * @return ListLLMObsProjectsOptionalParameters + */ + public ListLLMObsProjectsOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; + } } /** - * List patterns configurations. + * List LLM Observability projects. * - *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. + *

See {@link #listLLMObsProjectsWithHttpInfo}. * - * @return LLMObsPatternsConfigsResponse + * @return LLMObsProjectsResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsConfigsResponse listLLMObsPatternsConfigs() throws ApiException { - return listLLMObsPatternsConfigsWithHttpInfo().getData(); + public LLMObsProjectsResponse listLLMObsProjects() throws ApiException { + return listLLMObsProjectsWithHttpInfo(new ListLLMObsProjectsOptionalParameters()).getData(); } /** - * List patterns configurations. + * List LLM Observability projects. * - *

See {@link #listLLMObsPatternsConfigsWithHttpInfoAsync}. + *

See {@link #listLLMObsProjectsWithHttpInfoAsync}. * - * @return CompletableFuture<LLMObsPatternsConfigsResponse> + * @return CompletableFuture<LLMObsProjectsResponse> */ - public CompletableFuture listLLMObsPatternsConfigsAsync() { - return listLLMObsPatternsConfigsWithHttpInfoAsync() + public CompletableFuture listLLMObsProjectsAsync() { + return listLLMObsProjectsWithHttpInfoAsync(new ListLLMObsProjectsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -7850,9 +9569,41 @@ public CompletableFuture listLLMObsPatternsConfig } /** - * List all patterns configurations for the organization. + * List LLM Observability projects. * - * @return ApiResponse<LLMObsPatternsConfigsResponse> + *

See {@link #listLLMObsProjectsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return LLMObsProjectsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsProjectsResponse listLLMObsProjects(ListLLMObsProjectsOptionalParameters parameters) + throws ApiException { + return listLLMObsProjectsWithHttpInfo(parameters).getData(); + } + + /** + * List LLM Observability projects. + * + *

See {@link #listLLMObsProjectsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsProjectsResponse> + */ + public CompletableFuture listLLMObsProjectsAsync( + ListLLMObsProjectsOptionalParameters parameters) { + return listLLMObsProjectsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all LLM Observability projects sorted by creation date, newest first. + * + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsProjectsResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -7863,29 +9614,38 @@ public CompletableFuture listLLMObsPatternsConfig * * * - * *
401 Unauthorized -
403 Forbidden -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsPatternsConfigsWithHttpInfo() - throws ApiException { + public ApiResponse listLLMObsProjectsWithHttpInfo( + ListLLMObsProjectsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsConfigs"; + String operationId = "listLLMObsProjects"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + String localVarPath = "/api/v2/llm-obs/v1/projects"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", + "v2.LlmObservabilityApi.listLLMObsProjects", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -7898,49 +9658,58 @@ public ApiResponse listLLMObsPatternsConfigsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List patterns configurations. + * List LLM Observability projects. * - *

See {@link #listLLMObsPatternsConfigsWithHttpInfo}. + *

See {@link #listLLMObsProjectsWithHttpInfo}. * - * @return CompletableFuture<ApiResponse<LLMObsPatternsConfigsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsProjectsResponse>> */ - public CompletableFuture> - listLLMObsPatternsConfigsWithHttpInfoAsync() { + public CompletableFuture> listLLMObsProjectsWithHttpInfoAsync( + ListLLMObsProjectsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsConfigs"; + String operationId = "listLLMObsProjects"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; + String filterId = parameters.filterId; + String filterName = parameters.filterName; + String pageCursor = parameters.pageCursor; + Long pageLimit = parameters.pageLimit; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-configs"; + String localVarPath = "/api/v2/llm-obs/v1/projects"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsConfigs", + "v2.LlmObservabilityApi.listLLMObsProjects", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -7952,33 +9721,46 @@ public ApiResponse listLLMObsPatternsConfigsWithH localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsPrompts. */ + public static class ListLLMObsPromptsOptionalParameters { + private String filterPromptId; + + /** + * Set filterPromptId. + * + * @param filterPromptId Optional filter for prompts by prompt ID. (optional) + * @return ListLLMObsPromptsOptionalParameters + */ + public ListLLMObsPromptsOptionalParameters filterPromptId(String filterPromptId) { + this.filterPromptId = filterPromptId; + return this; + } } /** - * List patterns runs. + * List LLM Observability prompts. * - *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. + *

See {@link #listLLMObsPromptsWithHttpInfo}. * - * @param configId The ID of the patterns configuration. (required) - * @return LLMObsPatternsRunsResponse + * @return LLMObsPromptsResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsRunsResponse listLLMObsPatternsRuns(String configId) throws ApiException { - return listLLMObsPatternsRunsWithHttpInfo(configId).getData(); + public LLMObsPromptsResponse listLLMObsPrompts() throws ApiException { + return listLLMObsPromptsWithHttpInfo(new ListLLMObsPromptsOptionalParameters()).getData(); } /** - * List patterns runs. + * List LLM Observability prompts. * - *

See {@link #listLLMObsPatternsRunsWithHttpInfoAsync}. + *

See {@link #listLLMObsPromptsWithHttpInfoAsync}. * - * @param configId The ID of the patterns configuration. (required) - * @return CompletableFuture<LLMObsPatternsRunsResponse> + * @return CompletableFuture<LLMObsPromptsResponse> */ - public CompletableFuture listLLMObsPatternsRunsAsync( - String configId) { - return listLLMObsPatternsRunsWithHttpInfoAsync(configId) + public CompletableFuture listLLMObsPromptsAsync() { + return listLLMObsPromptsWithHttpInfoAsync(new ListLLMObsPromptsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -7986,51 +9768,74 @@ public CompletableFuture listLLMObsPatternsRunsAsync } /** - * List the completed patterns runs for a configuration. + * List LLM Observability prompts. + * + *

See {@link #listLLMObsPromptsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return LLMObsPromptsResponse + * @throws ApiException if fails to make API call + */ + public LLMObsPromptsResponse listLLMObsPrompts(ListLLMObsPromptsOptionalParameters parameters) + throws ApiException { + return listLLMObsPromptsWithHttpInfo(parameters).getData(); + } + + /** + * List LLM Observability prompts. + * + *

See {@link #listLLMObsPromptsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<LLMObsPromptsResponse> + */ + public CompletableFuture listLLMObsPromptsAsync( + ListLLMObsPromptsOptionalParameters parameters) { + return listLLMObsPromptsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List all LLM Observability prompts in the prompt registry for the organization. * - * @param configId The ID of the patterns configuration. (required) - * @return ApiResponse<LLMObsPatternsRunsResponse> + * @param parameters Optional parameters for the request. + * @return ApiResponse<LLMObsPromptsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * * - * * - * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsPatternsRunsWithHttpInfo(String configId) - throws ApiException { + public ApiResponse listLLMObsPromptsWithHttpInfo( + ListLLMObsPromptsOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsRuns"; + String operationId = "listLLMObsPrompts"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - - // verify the required parameter 'configId' is set - if (configId == null) { - throw new ApiException( - 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns"); - } + String filterPromptId = parameters.filterPromptId; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + String localVarPath = "/api/v2/llm-obs/v1/prompts"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[prompt_id]", filterPromptId)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsRuns", + "v2.LlmObservabilityApi.listLLMObsPrompts", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8045,53 +9850,44 @@ public ApiResponse listLLMObsPatternsRunsWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List patterns runs. + * List LLM Observability prompts. * - *

See {@link #listLLMObsPatternsRunsWithHttpInfo}. + *

See {@link #listLLMObsPromptsWithHttpInfo}. * - * @param configId The ID of the patterns configuration. (required) - * @return CompletableFuture<ApiResponse<LLMObsPatternsRunsResponse>> + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ApiResponse<LLMObsPromptsResponse>> */ - public CompletableFuture> - listLLMObsPatternsRunsWithHttpInfoAsync(String configId) { + public CompletableFuture> listLLMObsPromptsWithHttpInfoAsync( + ListLLMObsPromptsOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsRuns"; + String operationId = "listLLMObsPrompts"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - - // verify the required parameter 'configId' is set - if (configId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'configId' when calling listLLMObsPatternsRuns")); - return result; - } + String filterPromptId = parameters.filterPromptId; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + String localVarPath = "/api/v2/llm-obs/v1/prompts"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[prompt_id]", filterPromptId)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsRuns", + "v2.LlmObservabilityApi.listLLMObsPrompts", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8099,7 +9895,7 @@ public ApiResponse listLLMObsPatternsRunsWithHttpInf new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -8111,87 +9907,34 @@ public ApiResponse listLLMObsPatternsRunsWithHttpInf localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listLLMObsPatternsTopics. */ - public static class ListLLMObsPatternsTopicsOptionalParameters { - private String runId; - - /** - * Set runId. - * - * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. - * (optional) - * @return ListLLMObsPatternsTopicsOptionalParameters - */ - public ListLLMObsPatternsTopicsOptionalParameters runId(String runId) { - this.runId = runId; - return this; - } + new GenericType() {}); } /** - * List patterns topics. + * List versions of an LLM Observability prompt. * - *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. + *

See {@link #listLLMObsPromptVersionsWithHttpInfo}. * - * @param configId The ID of the patterns configuration. (required) - * @return LLMObsPatternsTopicsResponse + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return LLMObsPromptVersionsResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics(String configId) + public LLMObsPromptVersionsResponse listLLMObsPromptVersions(String promptId) throws ApiException { - return listLLMObsPatternsTopicsWithHttpInfo( - configId, new ListLLMObsPatternsTopicsOptionalParameters()) - .getData(); - } - - /** - * List patterns topics. - * - *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. - * - * @param configId The ID of the patterns configuration. (required) - * @return CompletableFuture<LLMObsPatternsTopicsResponse> - */ - public CompletableFuture listLLMObsPatternsTopicsAsync( - String configId) { - return listLLMObsPatternsTopicsWithHttpInfoAsync( - configId, new ListLLMObsPatternsTopicsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); - } - - /** - * List patterns topics. - * - *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. - * - * @param configId The ID of the patterns configuration. (required) - * @param parameters Optional parameters for the request. - * @return LLMObsPatternsTopicsResponse - * @throws ApiException if fails to make API call - */ - public LLMObsPatternsTopicsResponse listLLMObsPatternsTopics( - String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { - return listLLMObsPatternsTopicsWithHttpInfo(configId, parameters).getData(); + return listLLMObsPromptVersionsWithHttpInfo(promptId).getData(); } /** - * List patterns topics. + * List versions of an LLM Observability prompt. * - *

See {@link #listLLMObsPatternsTopicsWithHttpInfoAsync}. + *

See {@link #listLLMObsPromptVersionsWithHttpInfoAsync}. * - * @param configId The ID of the patterns configuration. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsPatternsTopicsResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return CompletableFuture<LLMObsPromptVersionsResponse> */ - public CompletableFuture listLLMObsPatternsTopicsAsync( - String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { - return listLLMObsPatternsTopicsWithHttpInfoAsync(configId, parameters) + public CompletableFuture listLLMObsPromptVersionsAsync( + String promptId) { + return listLLMObsPromptVersionsWithHttpInfoAsync(promptId) .thenApply( response -> { return response.getData(); @@ -8199,30 +9942,26 @@ public CompletableFuture listLLMObsPatternsTopicsA } /** - * List the topics discovered by a patterns run. When no run is specified, the most recent - * completed run is used. + * 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 configId The ID of the patterns configuration. (required) - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsPatternsTopicsResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return ApiResponse<LLMObsPromptVersionsResponse> * @throws ApiException if fails to make API call * @http.response.details * * * * - * * * - * * - * *
Response details
Status Code Description Response Headers
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsPatternsTopicsWithHttpInfo( - String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) throws ApiException { + public ApiResponse listLLMObsPromptVersionsWithHttpInfo( + String promptId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsTopics"; + String operationId = "listLLMObsPromptVersions"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -8230,26 +9969,23 @@ public ApiResponse listLLMObsPatternsTopicsWithHtt } Object localVarPostBody = null; - // verify the required parameter 'configId' is set - if (configId == null) { + // verify the required parameter 'promptId' is set + if (promptId == null) { throw new ApiException( - 400, "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics"); + 400, "Missing the required parameter 'promptId' when calling listLLMObsPromptVersions"); } - String runId = parameters.runId; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsTopics", + "v2.LlmObservabilityApi.listLLMObsPromptVersions", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -8262,141 +9998,253 @@ public ApiResponse listLLMObsPatternsTopicsWithHtt localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List patterns topics. + * List versions of an LLM Observability prompt. * - *

See {@link #listLLMObsPatternsTopicsWithHttpInfo}. + *

See {@link #listLLMObsPromptVersionsWithHttpInfo}. * - * @param configId The ID of the patterns configuration. (required) - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsPatternsTopicsResponse>> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @return CompletableFuture<ApiResponse<LLMObsPromptVersionsResponse>> */ - public CompletableFuture> - listLLMObsPatternsTopicsWithHttpInfoAsync( - String configId, ListLLMObsPatternsTopicsOptionalParameters parameters) { + public CompletableFuture> + listLLMObsPromptVersionsWithHttpInfoAsync(String promptId) { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsTopics"; + String operationId = "listLLMObsPromptVersions"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = null; + + // verify the required parameter 'promptId' is set + if (promptId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'promptId' when calling listLLMObsPromptVersions")); + return result; + } + // create path and map variables + String localVarPath = + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.LlmObservabilityApi.listLLMObsPromptVersions", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth"}); + } catch (ApiException ex) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "GET", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** Manage optional parameters to listLLMObsSpans. */ + public static class ListLLMObsSpansOptionalParameters { + private String filterFrom; + private String filterTo; + private String filterQuery; + private String filterSpanId; + private String filterTraceId; + private String filterSpanKind; + private String filterSpanName; + private String filterMlApp; + private Long pageLimit; + private String pageCursor; + private String sort; + private Boolean includeAttachments; + + /** + * Set filterFrom. + * + * @param filterFrom Start of the time range. Accepts ISO 8601 or relative format (e.g., + * now-15m). Defaults to now-15m. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterFrom(String filterFrom) { + this.filterFrom = filterFrom; + return this; + } + + /** + * Set filterTo. + * + * @param filterTo End of the time range. Accepts ISO 8601 or relative format. Defaults to + * now. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterTo(String filterTo) { + this.filterTo = filterTo; + return this; + } + + /** + * Set filterQuery. + * + * @param filterQuery Search query using LLM Observability query syntax. Supports attribute + * filters using the field:value syntax (e.g. session_id, trace_id, ml_app, meta.span.kind). + * When provided, structured field filters (filter[span_id], + * filter[trace_id], etc.) are ignored. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterQuery(String filterQuery) { + this.filterQuery = filterQuery; + return this; + } + + /** + * Set filterSpanId. + * + * @param filterSpanId Filter by exact span ID. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterSpanId(String filterSpanId) { + this.filterSpanId = filterSpanId; + return this; + } + + /** + * Set filterTraceId. + * + * @param filterTraceId Filter by exact trace ID. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterTraceId(String filterTraceId) { + this.filterTraceId = filterTraceId; + return this; + } - // verify the required parameter 'configId' is set - if (configId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'configId' when calling listLLMObsPatternsTopics")); - return result; + /** + * Set filterSpanKind. + * + * @param filterSpanKind Filter by span kind (e.g., llm, agent, tool, task, workflow). + * (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterSpanKind(String filterSpanKind) { + this.filterSpanKind = filterSpanKind; + return this; } - String runId = parameters.runId; - // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics"; - List localVarQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); + /** + * Set filterSpanName. + * + * @param filterSpanName Filter by span name. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterSpanName(String filterSpanName) { + this.filterSpanName = filterSpanName; + return this; + } - localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); + /** + * Set filterMlApp. + * + * @param filterMlApp Filter by ML application name. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters filterMlApp(String filterMlApp) { + this.filterMlApp = filterMlApp; + return this; + } - Invocation.Builder builder; - try { - builder = - apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsTopics", - localVarPath, - localVarQueryParams, - localVarHeaderParams, - new HashMap(), - new String[] {"application/json"}, - new String[] {"apiKeyAuth", "appKeyAuth"}); - } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally(ex); - return result; + /** + * Set pageLimit. + * + * @param pageLimit Maximum number of spans to return. Defaults to 10. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters pageLimit(Long pageLimit) { + this.pageLimit = pageLimit; + return this; } - return apiClient.invokeAPIAsync( - "GET", - builder, - localVarHeaderParams, - new String[] {}, - localVarPostBody, - new HashMap(), - false, - new GenericType() {}); - } - /** Manage optional parameters to listLLMObsPatternsTopicsWithClusteredPoints. */ - public static class ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters { - private String runId; - private Boolean includeMetrics; + /** + * Set pageCursor. + * + * @param pageCursor Cursor from the previous response to retrieve the next page. (optional) + * @return ListLLMObsSpansOptionalParameters + */ + public ListLLMObsSpansOptionalParameters pageCursor(String pageCursor) { + this.pageCursor = pageCursor; + return this; + } /** - * Set runId. + * Set sort. * - * @param runId The ID of a specific patterns run. Defaults to the most recent completed run. - * (optional) - * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters + * @param sort Sort order for the results. (optional) + * @return ListLLMObsSpansOptionalParameters */ - public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters runId(String runId) { - this.runId = runId; + public ListLLMObsSpansOptionalParameters sort(String sort) { + this.sort = sort; return this; } /** - * Set includeMetrics. + * Set includeAttachments. * - * @param includeMetrics When true, enrich each clustered point with span metrics such as - * status, duration, token counts, estimated cost, and evaluations. (optional) - * @return ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters + * @param includeAttachments Whether to include attachment data in the response. Defaults to + * true. (optional) + * @return ListLLMObsSpansOptionalParameters */ - public ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters includeMetrics( - Boolean includeMetrics) { - this.includeMetrics = includeMetrics; + public ListLLMObsSpansOptionalParameters includeAttachments(Boolean includeAttachments) { + this.includeAttachments = includeAttachments; return this; } } /** - * List patterns topics with clustered points. + * List LLM Observability spans. * - *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. + *

See {@link #listLLMObsSpansWithHttpInfo}. * - * @param configId The ID of the patterns configuration. (required) - * @return LLMObsPatternsTopicsWithClusteredPointsResponse + * @return LLMObsSpansResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsTopicsWithClusteredPointsResponse - listLLMObsPatternsTopicsWithClusteredPoints(String configId) throws ApiException { - return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( - configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) - .getData(); + public LLMObsSpansResponse listLLMObsSpans() throws ApiException { + return listLLMObsSpansWithHttpInfo(new ListLLMObsSpansOptionalParameters()).getData(); } /** - * List patterns topics with clustered points. + * List LLM Observability spans. * - *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. + *

See {@link #listLLMObsSpansWithHttpInfoAsync}. * - * @param configId The ID of the patterns configuration. (required) - * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> + * @return CompletableFuture<LLMObsSpansResponse> */ - public CompletableFuture - listLLMObsPatternsTopicsWithClusteredPointsAsync(String configId) { - return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( - configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) + public CompletableFuture listLLMObsSpansAsync() { + return listLLMObsSpansWithHttpInfoAsync(new ListLLMObsSpansOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -8404,36 +10252,30 @@ configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) } /** - * List patterns topics with clustered points. + * List LLM Observability spans. * - *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. + *

See {@link #listLLMObsSpansWithHttpInfo}. * - * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return LLMObsPatternsTopicsWithClusteredPointsResponse + * @return LLMObsSpansResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsTopicsWithClusteredPointsResponse - listLLMObsPatternsTopicsWithClusteredPoints( - String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) - throws ApiException { - return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo(configId, parameters).getData(); + public LLMObsSpansResponse listLLMObsSpans(ListLLMObsSpansOptionalParameters parameters) + throws ApiException { + return listLLMObsSpansWithHttpInfo(parameters).getData(); } /** - * List patterns topics with clustered points. + * List LLM Observability spans. * - *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync}. + *

See {@link #listLLMObsSpansWithHttpInfoAsync}. * - * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsPatternsTopicsWithClusteredPointsResponse> + * @return CompletableFuture<LLMObsSpansResponse> */ - public CompletableFuture - listLLMObsPatternsTopicsWithClusteredPointsAsync( - String configId, - ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { - return listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync(configId, parameters) + public CompletableFuture listLLMObsSpansAsync( + ListLLMObsSpansOptionalParameters parameters) { + return listLLMObsSpansWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -8441,12 +10283,10 @@ configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) } /** - * List the topics discovered by a patterns run, with the clustered points attached inline to each - * leaf topic. When no run is specified, the most recent completed run is used. + * List LLM Observability spans matching the specified filters. * - * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse> + * @return ApiResponse<LLMObsSpansResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8456,46 +10296,54 @@ configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) * * * - * * - * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse - listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo( - String configId, ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) - throws ApiException { + public ApiResponse listLLMObsSpansWithHttpInfo( + ListLLMObsSpansOptionalParameters parameters) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; + String operationId = "listLLMObsSpans"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - - // verify the required parameter 'configId' is set - if (configId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'configId' when calling" - + " listLLMObsPatternsTopicsWithClusteredPoints"); - } - String runId = parameters.runId; - Boolean includeMetrics = parameters.includeMetrics; + String filterFrom = parameters.filterFrom; + String filterTo = parameters.filterTo; + String filterQuery = parameters.filterQuery; + String filterSpanId = parameters.filterSpanId; + String filterTraceId = parameters.filterTraceId; + String filterSpanKind = parameters.filterSpanKind; + String filterSpanName = parameters.filterSpanName; + String filterMlApp = parameters.filterMlApp; + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; + String sort = parameters.sort; + Boolean includeAttachments = parameters.includeAttachments; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; + String localVarPath = "/api/v2/llm-obs/v1/spans/events"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_id]", filterSpanId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[trace_id]", filterTraceId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_kind]", filterSpanKind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_name]", filterSpanName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[ml_app]", filterMlApp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_attachments", includeAttachments)); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", + "v2.LlmObservabilityApi.listLLMObsSpans", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8510,64 +10358,67 @@ configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List patterns topics with clustered points. + * List LLM Observability spans. * - *

See {@link #listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfo}. + *

See {@link #listLLMObsSpansWithHttpInfo}. * - * @param configId The ID of the patterns configuration. (required) * @param parameters Optional parameters for the request. - * @return - * CompletableFuture<ApiResponse<LLMObsPatternsTopicsWithClusteredPointsResponse>> + * @return CompletableFuture<ApiResponse<LLMObsSpansResponse>> */ - public CompletableFuture> - listLLMObsPatternsTopicsWithClusteredPointsWithHttpInfoAsync( - String configId, - ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters parameters) { + public CompletableFuture> listLLMObsSpansWithHttpInfoAsync( + ListLLMObsSpansOptionalParameters parameters) { // Check if unstable operation is enabled - String operationId = "listLLMObsPatternsTopicsWithClusteredPoints"; + String operationId = "listLLMObsSpans"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); - } else { - CompletableFuture> result = - new CompletableFuture<>(); + } else { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = null; - - // verify the required parameter 'configId' is set - if (configId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'configId' when calling" - + " listLLMObsPatternsTopicsWithClusteredPoints")); - return result; - } - String runId = parameters.runId; - Boolean includeMetrics = parameters.includeMetrics; + String filterFrom = parameters.filterFrom; + String filterTo = parameters.filterTo; + String filterQuery = parameters.filterQuery; + String filterSpanId = parameters.filterSpanId; + String filterTraceId = parameters.filterTraceId; + String filterSpanKind = parameters.filterSpanKind; + String filterSpanName = parameters.filterSpanName; + String filterMlApp = parameters.filterMlApp; + Long pageLimit = parameters.pageLimit; + String pageCursor = parameters.pageCursor; + String sort = parameters.sort; + Boolean includeAttachments = parameters.includeAttachments; // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points"; + String localVarPath = "/api/v2/llm-obs/v1/spans/events"; List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "config_id", configId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "run_id", runId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "include_metrics", includeMetrics)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_id]", filterSpanId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[trace_id]", filterTraceId)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_kind]", filterSpanKind)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_name]", filterSpanName)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[ml_app]", filterMlApp)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + localVarQueryParams.addAll( + apiClient.parameterToPairs("", "include_attachments", includeAttachments)); Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsPatternsTopicsWithClusteredPoints", + "v2.LlmObservabilityApi.listLLMObsSpans", localVarPath, localVarQueryParams, localVarHeaderParams, @@ -8575,8 +10426,7 @@ configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -8588,113 +10438,36 @@ configId, new ListLLMObsPatternsTopicsWithClusteredPointsOptionalParameters()) localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listLLMObsProjects. */ - public static class ListLLMObsProjectsOptionalParameters { - private String filterId; - private String filterName; - private String pageCursor; - private Long pageLimit; - - /** - * Set filterId. - * - * @param filterId Filter projects by project ID. (optional) - * @return ListLLMObsProjectsOptionalParameters - */ - public ListLLMObsProjectsOptionalParameters filterId(String filterId) { - this.filterId = filterId; - return this; - } - - /** - * Set filterName. - * - * @param filterName Filter projects by name. (optional) - * @return ListLLMObsProjectsOptionalParameters - */ - public ListLLMObsProjectsOptionalParameters filterName(String filterName) { - this.filterName = filterName; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor Use the Pagination cursor to retrieve the next page of results. (optional) - * @return ListLLMObsProjectsOptionalParameters - */ - public ListLLMObsProjectsOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of results to return per page. (optional) - * @return ListLLMObsProjectsOptionalParameters - */ - public ListLLMObsProjectsOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; - } - } - - /** - * List LLM Observability projects. - * - *

See {@link #listLLMObsProjectsWithHttpInfo}. - * - * @return LLMObsProjectsResponse - * @throws ApiException if fails to make API call - */ - public LLMObsProjectsResponse listLLMObsProjects() throws ApiException { - return listLLMObsProjectsWithHttpInfo(new ListLLMObsProjectsOptionalParameters()).getData(); - } - - /** - * List LLM Observability projects. - * - *

See {@link #listLLMObsProjectsWithHttpInfoAsync}. - * - * @return CompletableFuture<LLMObsProjectsResponse> - */ - public CompletableFuture listLLMObsProjectsAsync() { - return listLLMObsProjectsWithHttpInfoAsync(new ListLLMObsProjectsOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * List LLM Observability projects. + * Lock LLM Observability dataset draft state. * - *

See {@link #listLLMObsProjectsWithHttpInfo}. + *

See {@link #lockLLMObsDatasetDraftStateWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return LLMObsProjectsResponse + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return LLMObsDatasetDraftStateResponse * @throws ApiException if fails to make API call */ - public LLMObsProjectsResponse listLLMObsProjects(ListLLMObsProjectsOptionalParameters parameters) - throws ApiException { - return listLLMObsProjectsWithHttpInfo(parameters).getData(); + public LLMObsDatasetDraftStateResponse lockLLMObsDatasetDraftState( + String projectId, String datasetId) throws ApiException { + return lockLLMObsDatasetDraftStateWithHttpInfo(projectId, datasetId).getData(); } /** - * List LLM Observability projects. + * Lock LLM Observability dataset draft state. * - *

See {@link #listLLMObsProjectsWithHttpInfoAsync}. + *

See {@link #lockLLMObsDatasetDraftStateWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsProjectsResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<LLMObsDatasetDraftStateResponse> */ - public CompletableFuture listLLMObsProjectsAsync( - ListLLMObsProjectsOptionalParameters parameters) { - return listLLMObsProjectsWithHttpInfoAsync(parameters) + public CompletableFuture lockLLMObsDatasetDraftStateAsync( + String projectId, String datasetId) { + return lockLLMObsDatasetDraftStateWithHttpInfoAsync(projectId, datasetId) .thenApply( response -> { return response.getData(); @@ -8702,10 +10475,12 @@ public CompletableFuture listLLMObsProjectsAsync( } /** - * List all LLM Observability projects sorted by creation date, newest first. + * Acquire the draft lock on a dataset for the calling user. The lock prevents other users from + * concurrently editing the dataset draft. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsProjectsResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return ApiResponse<LLMObsDatasetDraftStateResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -8715,324 +10490,175 @@ public CompletableFuture listLLMObsProjectsAsync( * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsProjectsWithHttpInfo( - ListLLMObsProjectsOptionalParameters parameters) throws ApiException { + public ApiResponse lockLLMObsDatasetDraftStateWithHttpInfo( + String projectId, String datasetId) throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsProjects"; + String operationId = "lockLLMObsDatasetDraftState"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } Object localVarPostBody = null; - String filterId = parameters.filterId; - String filterName = parameters.filterName; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'projectId' when calling lockLLMObsDatasetDraftState"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling lockLLMObsDatasetDraftState"); + } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/projects"; + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/lock" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsProjects", + "v2.LlmObservabilityApi.lockLLMObsDatasetDraftState", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "GET", + "PATCH", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * List LLM Observability projects. + * Lock LLM Observability dataset draft state. * - *

See {@link #listLLMObsProjectsWithHttpInfo}. + *

See {@link #lockLLMObsDatasetDraftStateWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsProjectsResponse>> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<ApiResponse<LLMObsDatasetDraftStateResponse>> */ - public CompletableFuture> listLLMObsProjectsWithHttpInfoAsync( - ListLLMObsProjectsOptionalParameters parameters) { + public CompletableFuture> + lockLLMObsDatasetDraftStateWithHttpInfoAsync(String projectId, String datasetId) { // Check if unstable operation is enabled - String operationId = "listLLMObsProjects"; + String operationId = "lockLLMObsDatasetDraftState"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; - String filterId = parameters.filterId; - String filterName = parameters.filterName; - String pageCursor = parameters.pageCursor; - Long pageLimit = parameters.pageLimit; + Object localVarPostBody = null; + + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'projectId' when calling" + + " lockLLMObsDatasetDraftState")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling" + + " lockLLMObsDatasetDraftState")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/projects"; + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/lock" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[id]", filterId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[name]", filterName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsProjects", + "v2.LlmObservabilityApi.lockLLMObsDatasetDraftState", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "PATCH", builder, localVarHeaderParams, new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); - } - - /** Manage optional parameters to listLLMObsSpans. */ - public static class ListLLMObsSpansOptionalParameters { - private String filterFrom; - private String filterTo; - private String filterQuery; - private String filterSpanId; - private String filterTraceId; - private String filterSpanKind; - private String filterSpanName; - private String filterMlApp; - private Long pageLimit; - private String pageCursor; - private String sort; - private Boolean includeAttachments; - - /** - * Set filterFrom. - * - * @param filterFrom Start of the time range. Accepts ISO 8601 or relative format (e.g., - * now-15m). Defaults to now-15m. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterFrom(String filterFrom) { - this.filterFrom = filterFrom; - return this; - } - - /** - * Set filterTo. - * - * @param filterTo End of the time range. Accepts ISO 8601 or relative format. Defaults to - * now. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterTo(String filterTo) { - this.filterTo = filterTo; - return this; - } - - /** - * Set filterQuery. - * - * @param filterQuery Search query using LLM Observability query syntax. Supports attribute - * filters using the field:value syntax (e.g. session_id, trace_id, ml_app, meta.span.kind). - * When provided, structured field filters (filter[span_id], - * filter[trace_id], etc.) are ignored. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterQuery(String filterQuery) { - this.filterQuery = filterQuery; - return this; - } - - /** - * Set filterSpanId. - * - * @param filterSpanId Filter by exact span ID. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterSpanId(String filterSpanId) { - this.filterSpanId = filterSpanId; - return this; - } - - /** - * Set filterTraceId. - * - * @param filterTraceId Filter by exact trace ID. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterTraceId(String filterTraceId) { - this.filterTraceId = filterTraceId; - return this; - } - - /** - * Set filterSpanKind. - * - * @param filterSpanKind Filter by span kind (e.g., llm, agent, tool, task, workflow). - * (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterSpanKind(String filterSpanKind) { - this.filterSpanKind = filterSpanKind; - return this; - } - - /** - * Set filterSpanName. - * - * @param filterSpanName Filter by span name. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterSpanName(String filterSpanName) { - this.filterSpanName = filterSpanName; - return this; - } - - /** - * Set filterMlApp. - * - * @param filterMlApp Filter by ML application name. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters filterMlApp(String filterMlApp) { - this.filterMlApp = filterMlApp; - return this; - } - - /** - * Set pageLimit. - * - * @param pageLimit Maximum number of spans to return. Defaults to 10. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters pageLimit(Long pageLimit) { - this.pageLimit = pageLimit; - return this; - } - - /** - * Set pageCursor. - * - * @param pageCursor Cursor from the previous response to retrieve the next page. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters pageCursor(String pageCursor) { - this.pageCursor = pageCursor; - return this; - } - - /** - * Set sort. - * - * @param sort Sort order for the results. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters sort(String sort) { - this.sort = sort; - return this; - } - - /** - * Set includeAttachments. - * - * @param includeAttachments Whether to include attachment data in the response. Defaults to - * true. (optional) - * @return ListLLMObsSpansOptionalParameters - */ - public ListLLMObsSpansOptionalParameters includeAttachments(Boolean includeAttachments) { - this.includeAttachments = includeAttachments; - return this; - } - } - - /** - * List LLM Observability spans. - * - *

See {@link #listLLMObsSpansWithHttpInfo}. - * - * @return LLMObsSpansResponse - * @throws ApiException if fails to make API call - */ - public LLMObsSpansResponse listLLMObsSpans() throws ApiException { - return listLLMObsSpansWithHttpInfo(new ListLLMObsSpansOptionalParameters()).getData(); - } - - /** - * List LLM Observability spans. - * - *

See {@link #listLLMObsSpansWithHttpInfoAsync}. - * - * @return CompletableFuture<LLMObsSpansResponse> - */ - public CompletableFuture listLLMObsSpansAsync() { - return listLLMObsSpansWithHttpInfoAsync(new ListLLMObsSpansOptionalParameters()) - .thenApply( - response -> { - return response.getData(); - }); + new GenericType() {}); } /** - * List LLM Observability spans. + * Restore an LLM Observability dataset version. * - *

See {@link #listLLMObsSpansWithHttpInfo}. + *

See {@link #restoreLLMObsDatasetVersionWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return LLMObsSpansResponse + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Restore dataset version payload. (required) * @throws ApiException if fails to make API call */ - public LLMObsSpansResponse listLLMObsSpans(ListLLMObsSpansOptionalParameters parameters) + public void restoreLLMObsDatasetVersion( + String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) throws ApiException { - return listLLMObsSpansWithHttpInfo(parameters).getData(); + restoreLLMObsDatasetVersionWithHttpInfo(projectId, datasetId, body); } /** - * List LLM Observability spans. + * Restore an LLM Observability dataset version. * - *

See {@link #listLLMObsSpansWithHttpInfoAsync}. + *

See {@link #restoreLLMObsDatasetVersionWithHttpInfoAsync}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<LLMObsSpansResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Restore dataset version payload. (required) + * @return CompletableFuture */ - public CompletableFuture listLLMObsSpansAsync( - ListLLMObsSpansOptionalParameters parameters) { - return listLLMObsSpansWithHttpInfoAsync(parameters) + public CompletableFuture restoreLLMObsDatasetVersionAsync( + String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) { + return restoreLLMObsDatasetVersionWithHttpInfoAsync(projectId, datasetId, body) .thenApply( response -> { return response.getData(); @@ -9040,10 +10666,13 @@ public CompletableFuture listLLMObsSpansAsync( } /** - * List LLM Observability spans matching the specified filters. + * Restore a dataset to a previous version. The dataset's current version is bumped, and its + * records are replaced with the records from the specified prior version. * - * @param parameters Optional parameters for the request. - * @return ApiResponse<LLMObsSpansResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Restore dataset version payload. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * @@ -9053,178 +10682,185 @@ public CompletableFuture listLLMObsSpansAsync( * * * + * * + * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse listLLMObsSpansWithHttpInfo( - ListLLMObsSpansOptionalParameters parameters) throws ApiException { + public ApiResponse restoreLLMObsDatasetVersionWithHttpInfo( + String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "listLLMObsSpans"; + String operationId = "restoreLLMObsDatasetVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; - String filterFrom = parameters.filterFrom; - String filterTo = parameters.filterTo; - String filterQuery = parameters.filterQuery; - String filterSpanId = parameters.filterSpanId; - String filterTraceId = parameters.filterTraceId; - String filterSpanKind = parameters.filterSpanKind; - String filterSpanName = parameters.filterSpanName; - String filterMlApp = parameters.filterMlApp; - Long pageLimit = parameters.pageLimit; - String pageCursor = parameters.pageCursor; - String sort = parameters.sort; - Boolean includeAttachments = parameters.includeAttachments; + Object localVarPostBody = body; + + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'projectId' when calling restoreLLMObsDatasetVersion"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling restoreLLMObsDatasetVersion"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + 400, "Missing the required parameter 'body' when calling restoreLLMObsDatasetVersion"); + } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/spans/events"; + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/restore" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_id]", filterSpanId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[trace_id]", filterTraceId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_kind]", filterSpanKind)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_name]", filterSpanName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[ml_app]", filterMlApp)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_attachments", includeAttachments)); - Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsSpans", + "v2.LlmObservabilityApi.restoreLLMObsDatasetVersion", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * List LLM Observability spans. + * Restore an LLM Observability dataset version. * - *

See {@link #listLLMObsSpansWithHttpInfo}. + *

See {@link #restoreLLMObsDatasetVersionWithHttpInfo}. * - * @param parameters Optional parameters for the request. - * @return CompletableFuture<ApiResponse<LLMObsSpansResponse>> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Restore dataset version payload. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> listLLMObsSpansWithHttpInfoAsync( - ListLLMObsSpansOptionalParameters parameters) { + public CompletableFuture> restoreLLMObsDatasetVersionWithHttpInfoAsync( + String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) { // Check if unstable operation is enabled - String operationId = "listLLMObsSpans"; + String operationId = "restoreLLMObsDatasetVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; - String filterFrom = parameters.filterFrom; - String filterTo = parameters.filterTo; - String filterQuery = parameters.filterQuery; - String filterSpanId = parameters.filterSpanId; - String filterTraceId = parameters.filterTraceId; - String filterSpanKind = parameters.filterSpanKind; - String filterSpanName = parameters.filterSpanName; - String filterMlApp = parameters.filterMlApp; - Long pageLimit = parameters.pageLimit; - String pageCursor = parameters.pageCursor; - String sort = parameters.sort; - Boolean includeAttachments = parameters.includeAttachments; + Object localVarPostBody = body; + + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'projectId' when calling" + + " restoreLLMObsDatasetVersion")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling" + + " restoreLLMObsDatasetVersion")); + return result; + } + + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'body' when calling restoreLLMObsDatasetVersion")); + return result; + } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/spans/events"; + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/restore" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); - List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[from]", filterFrom)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[to]", filterTo)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[query]", filterQuery)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_id]", filterSpanId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[trace_id]", filterTraceId)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_kind]", filterSpanKind)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[span_name]", filterSpanName)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[ml_app]", filterMlApp)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor)); - localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); - localVarQueryParams.addAll( - apiClient.parameterToPairs("", "include_attachments", includeAttachments)); - Invocation.Builder builder; try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.listLLMObsSpans", + "v2.LlmObservabilityApi.restoreLLMObsDatasetVersion", localVarPath, - localVarQueryParams, + new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "GET", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Lock LLM Observability dataset draft state. + * Search LLM Observability experimentation entities. * - *

See {@link #lockLLMObsDatasetDraftStateWithHttpInfo}. + *

See {@link #searchLLMObsExperimentationWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return LLMObsDatasetDraftStateResponse + * @param body Experimentation search payload. (required) + * @return LLMObsExperimentationSearchResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetDraftStateResponse lockLLMObsDatasetDraftState( - String projectId, String datasetId) throws ApiException { - return lockLLMObsDatasetDraftStateWithHttpInfo(projectId, datasetId).getData(); + public LLMObsExperimentationSearchResponse searchLLMObsExperimentation( + LLMObsExperimentationSearchRequest body) throws ApiException { + return searchLLMObsExperimentationWithHttpInfo(body).getData(); } /** - * Lock LLM Observability dataset draft state. + * Search LLM Observability experimentation entities. * - *

See {@link #lockLLMObsDatasetDraftStateWithHttpInfoAsync}. + *

See {@link #searchLLMObsExperimentationWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<LLMObsDatasetDraftStateResponse> + * @param body Experimentation search payload. (required) + * @return CompletableFuture<LLMObsExperimentationSearchResponse> */ - public CompletableFuture lockLLMObsDatasetDraftStateAsync( - String projectId, String datasetId) { - return lockLLMObsDatasetDraftStateWithHttpInfoAsync(projectId, datasetId) + public CompletableFuture searchLLMObsExperimentationAsync( + LLMObsExperimentationSearchRequest body) { + return searchLLMObsExperimentationWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -9232,61 +10868,56 @@ public CompletableFuture lockLLMObsDatasetDraft } /** - * Acquire the draft lock on a dataset for the calling user. The lock prevents other users from - * concurrently editing the dataset draft. + * Search across LLM Observability experimentation entities — projects, datasets, dataset records, + * experiments, and experiment runs — using cursor-based pagination. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return ApiResponse<LLMObsDatasetDraftStateResponse> + *

The filter.scope field controls which entity types are returned. At least one + * valid scope must be provided. + * + *

Returns 200 OK when all results fit in a single page. Returns + * 206 Partial Content with a cursor in meta.after when additional pages are + * available. + * + * @param body Experimentation search payload. (required) + * @return ApiResponse<LLMObsExperimentationSearchResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * + * * * * - * * * *
Response details
Status Code Description Response Headers
200 OK -
200 OK — all results returned in a single page. -
206 Partial Content — more results are available. Use `meta.after` as the next `page.cursor`. -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse lockLLMObsDatasetDraftStateWithHttpInfo( - String projectId, String datasetId) throws ApiException { + public ApiResponse searchLLMObsExperimentationWithHttpInfo( + LLMObsExperimentationSearchRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "lockLLMObsDatasetDraftState"; + String operationId = "searchLLMObsExperimentation"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; - - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'projectId' when calling lockLLMObsDatasetDraftState"); - } + Object localVarPostBody = body; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling lockLLMObsDatasetDraftState"); + 400, "Missing the required parameter 'body' when calling searchLLMObsExperimentation"); } // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/lock" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/experimentation/search"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.lockLLMObsDatasetDraftState", + "v2.LlmObservabilityApi.searchLLMObsExperimentation", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9294,68 +10925,51 @@ public ApiResponse lockLLMObsDatasetDraftStateW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "PATCH", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Lock LLM Observability dataset draft state. + * Search LLM Observability experimentation entities. * - *

See {@link #lockLLMObsDatasetDraftStateWithHttpInfo}. + *

See {@link #searchLLMObsExperimentationWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<ApiResponse<LLMObsDatasetDraftStateResponse>> + * @param body Experimentation search payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentationSearchResponse>> */ - public CompletableFuture> - lockLLMObsDatasetDraftStateWithHttpInfoAsync(String projectId, String datasetId) { + public CompletableFuture> + searchLLMObsExperimentationWithHttpInfoAsync(LLMObsExperimentationSearchRequest body) { // Check if unstable operation is enabled - String operationId = "lockLLMObsDatasetDraftState"; + String operationId = "searchLLMObsExperimentation"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; - - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'projectId' when calling" - + " lockLLMObsDatasetDraftState")); - return result; - } + Object localVarPostBody = body; - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling" - + " lockLLMObsDatasetDraftState")); + "Missing the required parameter 'body' when calling searchLLMObsExperimentation")); return result; } // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/lock" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/experimentation/search"; Map localVarHeaderParams = new HashMap(); @@ -9363,7 +10977,7 @@ public ApiResponse lockLLMObsDatasetDraftStateW try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.lockLLMObsDatasetDraftState", + "v2.LlmObservabilityApi.searchLLMObsExperimentation", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9371,51 +10985,46 @@ public ApiResponse lockLLMObsDatasetDraftStateW new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "POST", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Restore an LLM Observability dataset version. + * Search LLM Observability spans. * - *

See {@link #restoreLLMObsDatasetVersionWithHttpInfo}. + *

See {@link #searchLLMObsSpansWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Restore dataset version payload. (required) + * @param body Search spans payload. (required) + * @return LLMObsSpansResponse * @throws ApiException if fails to make API call */ - public void restoreLLMObsDatasetVersion( - String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) - throws ApiException { - restoreLLMObsDatasetVersionWithHttpInfo(projectId, datasetId, body); + public LLMObsSpansResponse searchLLMObsSpans(LLMObsSearchSpansRequest body) throws ApiException { + return searchLLMObsSpansWithHttpInfo(body).getData(); } /** - * Restore an LLM Observability dataset version. + * Search LLM Observability spans. * - *

See {@link #restoreLLMObsDatasetVersionWithHttpInfoAsync}. + *

See {@link #searchLLMObsSpansWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Restore dataset version payload. (required) - * @return CompletableFuture + * @param body Search spans payload. (required) + * @return CompletableFuture<LLMObsSpansResponse> */ - public CompletableFuture restoreLLMObsDatasetVersionAsync( - String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) { - return restoreLLMObsDatasetVersionWithHttpInfoAsync(projectId, datasetId, body) + public CompletableFuture searchLLMObsSpansAsync( + LLMObsSearchSpansRequest body) { + return searchLLMObsSpansWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -9423,13 +11032,10 @@ public CompletableFuture restoreLLMObsDatasetVersionAsync( } /** - * Restore a dataset to a previous version. The dataset's current version is bumped, and its - * records are replaced with the records from the specified prior version. + * Search LLM Observability spans using structured filters in the request body. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Restore dataset version payload. (required) - * @return ApiResponse<Void> + * @param body Search spans payload. (required) + * @return ApiResponse<LLMObsSpansResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -9439,16 +11045,13 @@ public CompletableFuture restoreLLMObsDatasetVersionAsync( * * * - * * - * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse restoreLLMObsDatasetVersionWithHttpInfo( - String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) - throws ApiException { + public ApiResponse searchLLMObsSpansWithHttpInfo( + LLMObsSearchSpansRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "restoreLLMObsDatasetVersion"; + String operationId = "searchLLMObsSpans"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9456,41 +11059,24 @@ public ApiResponse restoreLLMObsDatasetVersionWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'projectId' when calling restoreLLMObsDatasetVersion"); - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling restoreLLMObsDatasetVersion"); - } - // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling restoreLLMObsDatasetVersion"); + 400, "Missing the required parameter 'body' when calling searchLLMObsSpans"); } // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/restore" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/spans/events/search"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.restoreLLMObsDatasetVersion", + "v2.LlmObservabilityApi.searchLLMObsSpans", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( "POST", @@ -9500,69 +11086,41 @@ public ApiResponse restoreLLMObsDatasetVersionWithHttpInfo( localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Restore an LLM Observability dataset version. + * Search LLM Observability spans. * - *

See {@link #restoreLLMObsDatasetVersionWithHttpInfo}. + *

See {@link #searchLLMObsSpansWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Restore dataset version payload. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param body Search spans payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsSpansResponse>> */ - public CompletableFuture> restoreLLMObsDatasetVersionWithHttpInfoAsync( - String projectId, String datasetId, LLMObsDatasetRestoreVersionRequest body) { + public CompletableFuture> searchLLMObsSpansWithHttpInfoAsync( + LLMObsSearchSpansRequest body) { // Check if unstable operation is enabled - String operationId = "restoreLLMObsDatasetVersion"; + String operationId = "searchLLMObsSpans"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'projectId' when calling" - + " restoreLLMObsDatasetVersion")); - return result; - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling" - + " restoreLLMObsDatasetVersion")); - return result; - } - // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling restoreLLMObsDatasetVersion")); + 400, "Missing the required parameter 'body' when calling searchLLMObsSpans")); return result; } // create path and map variables - String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/restore" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + String localVarPath = "/api/v2/llm-obs/v1/spans/events/search"; Map localVarHeaderParams = new HashMap(); @@ -9570,15 +11128,15 @@ public CompletableFuture> restoreLLMObsDatasetVersionWithHttpI try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.restoreLLMObsDatasetVersion", + "v2.LlmObservabilityApi.searchLLMObsSpans", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -9590,34 +11148,34 @@ public CompletableFuture> restoreLLMObsDatasetVersionWithHttpI localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Search LLM Observability experimentation entities. + * Simple search experimentation entities. * - *

See {@link #searchLLMObsExperimentationWithHttpInfo}. + *

See {@link #simpleSearchLLMObsExperimentationWithHttpInfo}. * - * @param body Experimentation search payload. (required) - * @return LLMObsExperimentationSearchResponse + * @param body Simple search payload. (required) + * @return LLMObsExperimentationSimpleSearchResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentationSearchResponse searchLLMObsExperimentation( - LLMObsExperimentationSearchRequest body) throws ApiException { - return searchLLMObsExperimentationWithHttpInfo(body).getData(); + public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentation( + LLMObsExperimentationSimpleSearchRequest body) throws ApiException { + return simpleSearchLLMObsExperimentationWithHttpInfo(body).getData(); } /** - * Search LLM Observability experimentation entities. + * Simple search experimentation entities. * - *

See {@link #searchLLMObsExperimentationWithHttpInfoAsync}. + *

See {@link #simpleSearchLLMObsExperimentationWithHttpInfoAsync}. * - * @param body Experimentation search payload. (required) - * @return CompletableFuture<LLMObsExperimentationSearchResponse> + * @param body Simple search payload. (required) + * @return CompletableFuture<LLMObsExperimentationSimpleSearchResponse> */ - public CompletableFuture searchLLMObsExperimentationAsync( - LLMObsExperimentationSearchRequest body) { - return searchLLMObsExperimentationWithHttpInfoAsync(body) + public CompletableFuture + simpleSearchLLMObsExperimentationAsync(LLMObsExperimentationSimpleSearchRequest body) { + return simpleSearchLLMObsExperimentationWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -9625,25 +11183,21 @@ public CompletableFuture searchLLMObsExperi } /** - * Search across LLM Observability experimentation entities — projects, datasets, dataset records, - * experiments, and experiment runs — using cursor-based pagination. + * Search across LLM Observability experimentation entities using offset-based (page-number) + * pagination. Use this endpoint when you need total page count or want to navigate to a specific + * page number. * *

The filter.scope field controls which entity types are returned. At least one * valid scope must be provided. * - *

Returns 200 OK when all results fit in a single page. Returns - * 206 Partial Content with a cursor in meta.after when additional pages are - * available. - * - * @param body Experimentation search payload. (required) - * @return ApiResponse<LLMObsExperimentationSearchResponse> + * @param body Simple search payload. (required) + * @return ApiResponse<LLMObsExperimentationSimpleSearchResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * - * + * * * * @@ -9651,10 +11205,11 @@ public CompletableFuture searchLLMObsExperi * *
Response details
Status Code Description Response Headers
200 OK — all results returned in a single page. -
206 Partial Content — more results are available. Use `meta.after` as the next `page.cursor`. -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
500 Internal Server Error -
*/ - public ApiResponse searchLLMObsExperimentationWithHttpInfo( - LLMObsExperimentationSearchRequest body) throws ApiException { + public ApiResponse + simpleSearchLLMObsExperimentationWithHttpInfo(LLMObsExperimentationSimpleSearchRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "searchLLMObsExperimentation"; + String operationId = "simpleSearchLLMObsExperimentation"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9665,16 +11220,17 @@ public ApiResponse searchLLMObsExperimentat // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling searchLLMObsExperimentation"); + 400, + "Missing the required parameter 'body' when calling simpleSearchLLMObsExperimentation"); } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experimentation/search"; + String localVarPath = "/api/v2/llm-obs/v1/experimentation/simple-search"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.searchLLMObsExperimentation", + "v2.LlmObservabilityApi.simpleSearchLLMObsExperimentation", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9689,25 +11245,26 @@ public ApiResponse searchLLMObsExperimentat localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Search LLM Observability experimentation entities. + * Simple search experimentation entities. * - *

See {@link #searchLLMObsExperimentationWithHttpInfo}. + *

See {@link #simpleSearchLLMObsExperimentationWithHttpInfo}. * - * @param body Experimentation search payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsExperimentationSearchResponse>> - */ - public CompletableFuture> - searchLLMObsExperimentationWithHttpInfoAsync(LLMObsExperimentationSearchRequest body) { + * @param body Simple search payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentationSimpleSearchResponse>> + */ + public CompletableFuture> + simpleSearchLLMObsExperimentationWithHttpInfoAsync( + LLMObsExperimentationSimpleSearchRequest body) { // Check if unstable operation is enabled - String operationId = "searchLLMObsExperimentation"; + String operationId = "simpleSearchLLMObsExperimentation"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -9717,16 +11274,17 @@ public ApiResponse searchLLMObsExperimentat // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling searchLLMObsExperimentation")); + "Missing the required parameter 'body' when calling" + + " simpleSearchLLMObsExperimentation")); return result; } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experimentation/search"; + String localVarPath = "/api/v2/llm-obs/v1/experimentation/simple-search"; Map localVarHeaderParams = new HashMap(); @@ -9734,7 +11292,7 @@ public ApiResponse searchLLMObsExperimentat try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.searchLLMObsExperimentation", + "v2.LlmObservabilityApi.simpleSearchLLMObsExperimentation", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9742,7 +11300,7 @@ public ApiResponse searchLLMObsExperimentat new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; @@ -9755,33 +11313,34 @@ public ApiResponse searchLLMObsExperimentat localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Search LLM Observability spans. + * Trigger a patterns run. * - *

See {@link #searchLLMObsSpansWithHttpInfo}. + *

See {@link #triggerLLMObsPatternsWithHttpInfo}. * - * @param body Search spans payload. (required) - * @return LLMObsSpansResponse + * @param body Trigger patterns payload. (required) + * @return LLMObsPatternsTriggerResponse * @throws ApiException if fails to make API call */ - public LLMObsSpansResponse searchLLMObsSpans(LLMObsSearchSpansRequest body) throws ApiException { - return searchLLMObsSpansWithHttpInfo(body).getData(); + public LLMObsPatternsTriggerResponse triggerLLMObsPatterns(LLMObsPatternsTriggerRequest body) + throws ApiException { + return triggerLLMObsPatternsWithHttpInfo(body).getData(); } /** - * Search LLM Observability spans. + * Trigger a patterns run. * - *

See {@link #searchLLMObsSpansWithHttpInfoAsync}. + *

See {@link #triggerLLMObsPatternsWithHttpInfoAsync}. * - * @param body Search spans payload. (required) - * @return CompletableFuture<LLMObsSpansResponse> + * @param body Trigger patterns payload. (required) + * @return CompletableFuture<LLMObsPatternsTriggerResponse> */ - public CompletableFuture searchLLMObsSpansAsync( - LLMObsSearchSpansRequest body) { - return searchLLMObsSpansWithHttpInfoAsync(body) + public CompletableFuture triggerLLMObsPatternsAsync( + LLMObsPatternsTriggerRequest body) { + return triggerLLMObsPatternsWithHttpInfoAsync(body) .thenApply( response -> { return response.getData(); @@ -9789,26 +11348,28 @@ public CompletableFuture searchLLMObsSpansAsync( } /** - * Search LLM Observability spans using structured filters in the request body. + * Start a patterns run for a given configuration. The run executes asynchronously. * - * @param body Search spans payload. (required) - * @return ApiResponse<LLMObsSpansResponse> + * @param body Trigger patterns payload. (required) + * @return ApiResponse<LLMObsPatternsTriggerResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * + * * + * *
Response details
Status Code Description Response Headers
200 OK -
202 Accepted -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse searchLLMObsSpansWithHttpInfo( - LLMObsSearchSpansRequest body) throws ApiException { + public ApiResponse triggerLLMObsPatternsWithHttpInfo( + LLMObsPatternsTriggerRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "searchLLMObsSpans"; + String operationId = "triggerLLMObsPatterns"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -9819,16 +11380,16 @@ public ApiResponse searchLLMObsSpansWithHttpInfo( // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling searchLLMObsSpans"); + 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns"); } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/spans/events/search"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.searchLLMObsSpans", + "v2.LlmObservabilityApi.triggerLLMObsPatterns", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9843,25 +11404,26 @@ public ApiResponse searchLLMObsSpansWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Search LLM Observability spans. + * Trigger a patterns run. * - *

See {@link #searchLLMObsSpansWithHttpInfo}. + *

See {@link #triggerLLMObsPatternsWithHttpInfo}. * - * @param body Search spans payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsSpansResponse>> + * @param body Trigger patterns payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPatternsTriggerResponse>> */ - public CompletableFuture> searchLLMObsSpansWithHttpInfoAsync( - LLMObsSearchSpansRequest body) { + public CompletableFuture> + triggerLLMObsPatternsWithHttpInfoAsync(LLMObsPatternsTriggerRequest body) { // Check if unstable operation is enabled - String operationId = "searchLLMObsSpans"; + String operationId = "triggerLLMObsPatterns"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -9870,14 +11432,15 @@ public CompletableFuture> searchLLMObsSpansWith // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling searchLLMObsSpans")); + 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns")); return result; } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/spans/events/search"; + String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; Map localVarHeaderParams = new HashMap(); @@ -9885,7 +11448,7 @@ public CompletableFuture> searchLLMObsSpansWith try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.searchLLMObsSpans", + "v2.LlmObservabilityApi.triggerLLMObsPatterns", localVarPath, new ArrayList(), localVarHeaderParams, @@ -9893,7 +11456,8 @@ public CompletableFuture> searchLLMObsSpansWith new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -9905,34 +11469,35 @@ public CompletableFuture> searchLLMObsSpansWith localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Simple search experimentation entities. + * Unlock LLM Observability dataset draft state. * - *

See {@link #simpleSearchLLMObsExperimentationWithHttpInfo}. + *

See {@link #unlockLLMObsDatasetDraftStateWithHttpInfo}. * - * @param body Simple search payload. (required) - * @return LLMObsExperimentationSimpleSearchResponse + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) * @throws ApiException if fails to make API call */ - public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentation( - LLMObsExperimentationSimpleSearchRequest body) throws ApiException { - return simpleSearchLLMObsExperimentationWithHttpInfo(body).getData(); + public void unlockLLMObsDatasetDraftState(String projectId, String datasetId) + throws ApiException { + unlockLLMObsDatasetDraftStateWithHttpInfo(projectId, datasetId); } /** - * Simple search experimentation entities. + * Unlock LLM Observability dataset draft state. * - *

See {@link #simpleSearchLLMObsExperimentationWithHttpInfoAsync}. + *

See {@link #unlockLLMObsDatasetDraftStateWithHttpInfoAsync}. * - * @param body Simple search payload. (required) - * @return CompletableFuture<LLMObsExperimentationSimpleSearchResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture */ - public CompletableFuture - simpleSearchLLMObsExperimentationAsync(LLMObsExperimentationSimpleSearchRequest body) { - return simpleSearchLLMObsExperimentationWithHttpInfoAsync(body) + public CompletableFuture unlockLLMObsDatasetDraftStateAsync( + String projectId, String datasetId) { + return unlockLLMObsDatasetDraftStateWithHttpInfoAsync(projectId, datasetId) .thenApply( response -> { return response.getData(); @@ -9940,15 +11505,12 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati } /** - * Search across LLM Observability experimentation entities using offset-based (page-number) - * pagination. Use this endpoint when you need total page count or want to navigate to a specific - * page number. - * - *

The filter.scope field controls which entity types are returned. At least one - * valid scope must be provided. + * Release the draft lock on a dataset held by the calling user, allowing other users to edit the + * dataset draft. * - * @param body Simple search payload. (required) - * @return ApiResponse<LLMObsExperimentationSimpleSearchResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * @@ -9958,90 +11520,112 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati * * * + * * * *
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse - simpleSearchLLMObsExperimentationWithHttpInfo(LLMObsExperimentationSimpleSearchRequest body) - throws ApiException { + public ApiResponse unlockLLMObsDatasetDraftStateWithHttpInfo( + String projectId, String datasetId) throws ApiException { // Check if unstable operation is enabled - String operationId = "simpleSearchLLMObsExperimentation"; + String operationId = "unlockLLMObsDatasetDraftState"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = body; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( 400, - "Missing the required parameter 'body' when calling simpleSearchLLMObsExperimentation"); + "Missing the required parameter 'projectId' when calling unlockLLMObsDatasetDraftState"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling unlockLLMObsDatasetDraftState"); } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experimentation/simple-search"; + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/unlock" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.simpleSearchLLMObsExperimentation", + "v2.LlmObservabilityApi.unlockLLMObsDatasetDraftState", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "POST", + "PATCH", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Simple search experimentation entities. + * Unlock LLM Observability dataset draft state. * - *

See {@link #simpleSearchLLMObsExperimentationWithHttpInfo}. + *

See {@link #unlockLLMObsDatasetDraftStateWithHttpInfo}. * - * @param body Simple search payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsExperimentationSimpleSearchResponse>> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - simpleSearchLLMObsExperimentationWithHttpInfoAsync( - LLMObsExperimentationSimpleSearchRequest body) { + public CompletableFuture> unlockLLMObsDatasetDraftStateWithHttpInfoAsync( + String projectId, String datasetId) { // Check if unstable operation is enabled - String operationId = "simpleSearchLLMObsExperimentation"; + String operationId = "unlockLLMObsDatasetDraftState"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = body; + Object localVarPostBody = null; - // verify the required parameter 'body' is set - if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling" - + " simpleSearchLLMObsExperimentation")); + "Missing the required parameter 'projectId' when calling" + + " unlockLLMObsDatasetDraftState")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling" + + " unlockLLMObsDatasetDraftState")); return result; } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/experimentation/simple-search"; + String localVarPath = + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/unlock" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10049,55 +11633,56 @@ public LLMObsExperimentationSimpleSearchResponse simpleSearchLLMObsExperimentati try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.simpleSearchLLMObsExperimentation", + "v2.LlmObservabilityApi.unlockLLMObsDatasetDraftState", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "PATCH", builder, localVarHeaderParams, - new String[] {"application/json"}, + new String[] {}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Trigger a patterns run. + * Update an LLM Observability annotation queue. * - *

See {@link #triggerLLMObsPatternsWithHttpInfo}. + *

See {@link #updateLLMObsAnnotationQueueWithHttpInfo}. * - * @param body Trigger patterns payload. (required) - * @return LLMObsPatternsTriggerResponse + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update annotation queue payload. (required) + * @return LLMObsAnnotationQueueResponse * @throws ApiException if fails to make API call */ - public LLMObsPatternsTriggerResponse triggerLLMObsPatterns(LLMObsPatternsTriggerRequest body) - throws ApiException { - return triggerLLMObsPatternsWithHttpInfo(body).getData(); + public LLMObsAnnotationQueueResponse updateLLMObsAnnotationQueue( + String queueId, LLMObsAnnotationQueueUpdateRequest body) throws ApiException { + return updateLLMObsAnnotationQueueWithHttpInfo(queueId, body).getData(); } /** - * Trigger a patterns run. + * Update an LLM Observability annotation queue. * - *

See {@link #triggerLLMObsPatternsWithHttpInfoAsync}. + *

See {@link #updateLLMObsAnnotationQueueWithHttpInfoAsync}. * - * @param body Trigger patterns payload. (required) - * @return CompletableFuture<LLMObsPatternsTriggerResponse> + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update annotation queue payload. (required) + * @return CompletableFuture<LLMObsAnnotationQueueResponse> */ - public CompletableFuture triggerLLMObsPatternsAsync( - LLMObsPatternsTriggerRequest body) { - return triggerLLMObsPatternsWithHttpInfoAsync(body) + public CompletableFuture updateLLMObsAnnotationQueueAsync( + String queueId, LLMObsAnnotationQueueUpdateRequest body) { + return updateLLMObsAnnotationQueueWithHttpInfoAsync(queueId, body) .thenApply( response -> { return response.getData(); @@ -10105,28 +11690,29 @@ public CompletableFuture triggerLLMObsPatternsAsy } /** - * Start a patterns run for a given configuration. The run executes asynchronously. + * Partially update an annotation queue. The name, description, and + * annotation_schema fields can be updated. * - * @param body Trigger patterns payload. (required) - * @return ApiResponse<LLMObsPatternsTriggerResponse> + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update annotation queue payload. (required) + * @return ApiResponse<LLMObsAnnotationQueueResponse> * @throws ApiException if fails to make API call * @http.response.details * * * - * + * * * * * * - * *
Response details
Status Code Description Response Headers
202 Accepted -
200 OK -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse triggerLLMObsPatternsWithHttpInfo( - LLMObsPatternsTriggerRequest body) throws ApiException { + public ApiResponse updateLLMObsAnnotationQueueWithHttpInfo( + String queueId, LLMObsAnnotationQueueUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "triggerLLMObsPatterns"; + String operationId = "updateLLMObsAnnotationQueue"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10134,19 +11720,27 @@ public ApiResponse triggerLLMObsPatternsWithHttpI } Object localVarPostBody = body; + // verify the required parameter 'queueId' is set + if (queueId == null) { + throw new ApiException( + 400, "Missing the required parameter 'queueId' when calling updateLLMObsAnnotationQueue"); + } + // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns"); + 400, "Missing the required parameter 'body' when calling updateLLMObsAnnotationQueue"); } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.triggerLLMObsPatterns", + "v2.LlmObservabilityApi.updateLLMObsAnnotationQueue", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10154,32 +11748,34 @@ public ApiResponse triggerLLMObsPatternsWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "POST", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Trigger a patterns run. + * Update an LLM Observability annotation queue. * - *

See {@link #triggerLLMObsPatternsWithHttpInfo}. + *

See {@link #updateLLMObsAnnotationQueueWithHttpInfo}. * - * @param body Trigger patterns payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsPatternsTriggerResponse>> + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update annotation queue payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueueResponse>> */ - public CompletableFuture> - triggerLLMObsPatternsWithHttpInfoAsync(LLMObsPatternsTriggerRequest body) { + public CompletableFuture> + updateLLMObsAnnotationQueueWithHttpInfoAsync( + String queueId, LLMObsAnnotationQueueUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "triggerLLMObsPatterns"; + String operationId = "updateLLMObsAnnotationQueue"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); @@ -10187,17 +11783,31 @@ public ApiResponse triggerLLMObsPatternsWithHttpI } Object localVarPostBody = body; + // verify the required parameter 'queueId' is set + if (queueId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'queueId' when calling updateLLMObsAnnotationQueue")); + return result; + } + // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling triggerLLMObsPatterns")); + 400, + "Missing the required parameter 'body' when calling updateLLMObsAnnotationQueue")); return result; } // create path and map variables - String localVarPath = "/api/v2/llm-obs/v1/topic-discovery-runs"; + String localVarPath = + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10205,7 +11815,7 @@ public ApiResponse triggerLLMObsPatternsWithHttpI try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.triggerLLMObsPatterns", + "v2.LlmObservabilityApi.updateLLMObsAnnotationQueue", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10213,48 +11823,50 @@ public ApiResponse triggerLLMObsPatternsWithHttpI new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "POST", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Unlock LLM Observability dataset draft state. + * Update annotation queue label schema. * - *

See {@link #unlockLLMObsDatasetDraftStateWithHttpInfo}. + *

See {@link #updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update label schema payload. (required) + * @return LLMObsAnnotationQueueLabelSchemaResponse * @throws ApiException if fails to make API call */ - public void unlockLLMObsDatasetDraftState(String projectId, String datasetId) - throws ApiException { - unlockLLMObsDatasetDraftStateWithHttpInfo(projectId, datasetId); + public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabelSchema( + String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) throws ApiException { + return updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo(queueId, body).getData(); } /** - * Unlock LLM Observability dataset draft state. + * Update annotation queue label schema. * - *

See {@link #unlockLLMObsDatasetDraftStateWithHttpInfoAsync}. + *

See {@link #updateLLMObsAnnotationQueueLabelSchemaWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update label schema payload. (required) + * @return CompletableFuture<LLMObsAnnotationQueueLabelSchemaResponse> */ - public CompletableFuture unlockLLMObsDatasetDraftStateAsync( - String projectId, String datasetId) { - return unlockLLMObsDatasetDraftStateWithHttpInfoAsync(projectId, datasetId) + public CompletableFuture + updateLLMObsAnnotationQueueLabelSchemaAsync( + String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) { + return updateLLMObsAnnotationQueueLabelSchemaWithHttpInfoAsync(queueId, body) .thenApply( response -> { return response.getData(); @@ -10262,12 +11874,14 @@ public CompletableFuture unlockLLMObsDatasetDraftStateAsync( } /** - * Release the draft lock on a dataset held by the calling user, allowing other users to edit the - * dataset draft. + * Create or replace the label schema for a given annotation queue. The label schema defines the + * labels annotators can apply to interactions in the queue. Label names must be unique within the + * queue and match the pattern ^[a-zA-Z0-9_-]+$. Each label must have a valid type: + * score, categorical, boolean, or text. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return ApiResponse<Void> + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update label schema payload. (required) + * @return ApiResponse<LLMObsAnnotationQueueLabelSchemaResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10282,107 +11896,112 @@ public CompletableFuture unlockLLMObsDatasetDraftStateAsync( * *
500 Internal Server Error -
*/ - public ApiResponse unlockLLMObsDatasetDraftStateWithHttpInfo( - String projectId, String datasetId) throws ApiException { + public ApiResponse + updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo( + String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "unlockLLMObsDatasetDraftState"; + String operationId = "updateLLMObsAnnotationQueueLabelSchema"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { throw new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId)); } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { + // verify the required parameter 'queueId' is set + if (queueId == null) { throw new ApiException( 400, - "Missing the required parameter 'projectId' when calling unlockLLMObsDatasetDraftState"); + "Missing the required parameter 'queueId' when calling" + + " updateLLMObsAnnotationQueueLabelSchema"); } - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( 400, - "Missing the required parameter 'datasetId' when calling unlockLLMObsDatasetDraftState"); + "Missing the required parameter 'body' when calling" + + " updateLLMObsAnnotationQueueLabelSchema"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/unlock" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.unlockLLMObsDatasetDraftState", + "v2.LlmObservabilityApi.updateLLMObsAnnotationQueueLabelSchema", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "PATCH", + "PUT", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Unlock LLM Observability dataset draft state. + * Update annotation queue label schema. * - *

See {@link #unlockLLMObsDatasetDraftStateWithHttpInfo}. + *

See {@link #updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param queueId The ID of the LLM Observability annotation queue. (required) + * @param body Update label schema payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueueLabelSchemaResponse>> */ - public CompletableFuture> unlockLLMObsDatasetDraftStateWithHttpInfoAsync( - String projectId, String datasetId) { + public CompletableFuture> + updateLLMObsAnnotationQueueLabelSchemaWithHttpInfoAsync( + String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "unlockLLMObsDatasetDraftState"; + String operationId = "updateLLMObsAnnotationQueueLabelSchema"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } - Object localVarPostBody = null; + Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'queueId' is set + if (queueId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'projectId' when calling" - + " unlockLLMObsDatasetDraftState")); + "Missing the required parameter 'queueId' when calling" + + " updateLLMObsAnnotationQueueLabelSchema")); return result; } - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'body' is set + if (body == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'datasetId' when calling" - + " unlockLLMObsDatasetDraftState")); + "Missing the required parameter 'body' when calling" + + " updateLLMObsAnnotationQueueLabelSchema")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/draft_state/unlock" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema" + .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10390,56 +12009,56 @@ public CompletableFuture> unlockLLMObsDatasetDraftStateWithHtt try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.unlockLLMObsDatasetDraftState", + "v2.LlmObservabilityApi.updateLLMObsAnnotationQueueLabelSchema", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "PUT", builder, localVarHeaderParams, - new String[] {}, + new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Update an LLM Observability annotation queue. + * Create or update a custom evaluator configuration. * - *

See {@link #updateLLMObsAnnotationQueueWithHttpInfo}. + *

See {@link #updateLLMObsCustomEvalConfigWithHttpInfo}. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update annotation queue payload. (required) - * @return LLMObsAnnotationQueueResponse + * @param evalName The name of the custom LLM Observability evaluator configuration. (required) + * @param body Custom evaluator configuration payload. (required) * @throws ApiException if fails to make API call - */ - public LLMObsAnnotationQueueResponse updateLLMObsAnnotationQueue( - String queueId, LLMObsAnnotationQueueUpdateRequest body) throws ApiException { - return updateLLMObsAnnotationQueueWithHttpInfo(queueId, body).getData(); + */ + public void updateLLMObsCustomEvalConfig( + String evalName, LLMObsCustomEvalConfigUpdateRequest body) throws ApiException { + updateLLMObsCustomEvalConfigWithHttpInfo(evalName, body); } /** - * Update an LLM Observability annotation queue. + * Create or update a custom evaluator configuration. * - *

See {@link #updateLLMObsAnnotationQueueWithHttpInfoAsync}. + *

See {@link #updateLLMObsCustomEvalConfigWithHttpInfoAsync}. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update annotation queue payload. (required) - * @return CompletableFuture<LLMObsAnnotationQueueResponse> + * @param evalName The name of the custom LLM Observability evaluator configuration. (required) + * @param body Custom evaluator configuration payload. (required) + * @return CompletableFuture */ - public CompletableFuture updateLLMObsAnnotationQueueAsync( - String queueId, LLMObsAnnotationQueueUpdateRequest body) { - return updateLLMObsAnnotationQueueWithHttpInfoAsync(queueId, body) + public CompletableFuture updateLLMObsCustomEvalConfigAsync( + String evalName, LLMObsCustomEvalConfigUpdateRequest body) { + return updateLLMObsCustomEvalConfigWithHttpInfoAsync(evalName, body) .thenApply( response -> { return response.getData(); @@ -10447,12 +12066,11 @@ public CompletableFuture updateLLMObsAnnotationQu } /** - * Partially update an annotation queue. The name, description, and - * annotation_schema fields can be updated. + * Create or update a custom LLM Observability evaluator configuration by its name. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update annotation queue payload. (required) - * @return ApiResponse<LLMObsAnnotationQueueResponse> + * @param evalName The name of the custom LLM Observability evaluator configuration. (required) + * @param body Custom evaluator configuration payload. (required) + * @return ApiResponse<Void> * @throws ApiException if fails to make API call * @http.response.details * @@ -10463,13 +12081,14 @@ public CompletableFuture updateLLMObsAnnotationQu * * * + * * *
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse updateLLMObsAnnotationQueueWithHttpInfo( - String queueId, LLMObsAnnotationQueueUpdateRequest body) throws ApiException { + public ApiResponse updateLLMObsCustomEvalConfigWithHttpInfo( + String evalName, LLMObsCustomEvalConfigUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateLLMObsAnnotationQueue"; + String operationId = "updateLLMObsCustomEvalConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10477,94 +12096,92 @@ public ApiResponse updateLLMObsAnnotationQueueWit } Object localVarPostBody = body; - // verify the required parameter 'queueId' is set - if (queueId == null) { + // verify the required parameter 'evalName' is set + if (evalName == null) { throw new ApiException( - 400, "Missing the required parameter 'queueId' when calling updateLLMObsAnnotationQueue"); + 400, + "Missing the required parameter 'evalName' when calling updateLLMObsCustomEvalConfig"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsAnnotationQueue"); + 400, "Missing the required parameter 'body' when calling updateLLMObsCustomEvalConfig"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/annotation-queues/{queue_id}" - .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + "/api/unstable/llm-obs/config/evaluators/custom/{eval_name}" + .replaceAll("\\{" + "eval_name" + "\\}", apiClient.escapeString(evalName.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsAnnotationQueue", + "v2.LlmObservabilityApi.updateLLMObsCustomEvalConfig", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Update an LLM Observability annotation queue. + * Create or update a custom evaluator configuration. * - *

See {@link #updateLLMObsAnnotationQueueWithHttpInfo}. + *

See {@link #updateLLMObsCustomEvalConfigWithHttpInfo}. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update annotation queue payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueueResponse>> + * @param evalName The name of the custom LLM Observability evaluator configuration. (required) + * @param body Custom evaluator configuration payload. (required) + * @return CompletableFuture<ApiResponse<Void>> */ - public CompletableFuture> - updateLLMObsAnnotationQueueWithHttpInfoAsync( - String queueId, LLMObsAnnotationQueueUpdateRequest body) { + public CompletableFuture> updateLLMObsCustomEvalConfigWithHttpInfoAsync( + String evalName, LLMObsCustomEvalConfigUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateLLMObsAnnotationQueue"; + String operationId = "updateLLMObsCustomEvalConfig"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'queueId' is set - if (queueId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'evalName' is set + if (evalName == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'queueId' when calling updateLLMObsAnnotationQueue")); + "Missing the required parameter 'evalName' when calling" + + " updateLLMObsCustomEvalConfig")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling updateLLMObsAnnotationQueue")); + "Missing the required parameter 'body' when calling updateLLMObsCustomEvalConfig")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/annotation-queues/{queue_id}" - .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + "/api/unstable/llm-obs/config/evaluators/custom/{eval_name}" + .replaceAll("\\{" + "eval_name" + "\\}", apiClient.escapeString(evalName.toString())); Map localVarHeaderParams = new HashMap(); @@ -10572,58 +12189,58 @@ public ApiResponse updateLLMObsAnnotationQueueWit try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsAnnotationQueue", + "v2.LlmObservabilityApi.updateLLMObsCustomEvalConfig", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"application/json"}, + new String[] {"*/*"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PATCH", + "PUT", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + null); } /** - * Update annotation queue label schema. + * Update an LLM Observability dataset. * - *

See {@link #updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo}. + *

See {@link #updateLLMObsDatasetWithHttpInfo}. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update label schema payload. (required) - * @return LLMObsAnnotationQueueLabelSchemaResponse + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update dataset payload. (required) + * @return LLMObsDatasetResponse * @throws ApiException if fails to make API call */ - public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabelSchema( - String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) throws ApiException { - return updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo(queueId, body).getData(); + public LLMObsDatasetResponse updateLLMObsDataset( + String projectId, String datasetId, LLMObsDatasetUpdateRequest body) throws ApiException { + return updateLLMObsDatasetWithHttpInfo(projectId, datasetId, body).getData(); } /** - * Update annotation queue label schema. + * Update an LLM Observability dataset. * - *

See {@link #updateLLMObsAnnotationQueueLabelSchemaWithHttpInfoAsync}. + *

See {@link #updateLLMObsDatasetWithHttpInfoAsync}. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update label schema payload. (required) - * @return CompletableFuture<LLMObsAnnotationQueueLabelSchemaResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update dataset payload. (required) + * @return CompletableFuture<LLMObsDatasetResponse> */ - public CompletableFuture - updateLLMObsAnnotationQueueLabelSchemaAsync( - String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) { - return updateLLMObsAnnotationQueueLabelSchemaWithHttpInfoAsync(queueId, body) + public CompletableFuture updateLLMObsDatasetAsync( + String projectId, String datasetId, LLMObsDatasetUpdateRequest body) { + return updateLLMObsDatasetWithHttpInfoAsync(projectId, datasetId, body) .thenApply( response -> { return response.getData(); @@ -10631,14 +12248,12 @@ public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabel } /** - * Create or replace the label schema for a given annotation queue. The label schema defines the - * labels annotators can apply to interactions in the queue. Label names must be unique within the - * queue and match the pattern ^[a-zA-Z0-9_-]+$. Each label must have a valid type: - * score, categorical, boolean, or text. + * Partially update an existing LLM Observability dataset within the specified project. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update label schema payload. (required) - * @return ApiResponse<LLMObsAnnotationQueueLabelSchemaResponse> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update dataset payload. (required) + * @return ApiResponse<LLMObsDatasetResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10650,14 +12265,12 @@ public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabel * * * - * *
403 Forbidden -
404 Not Found -
429 Too many requests -
500 Internal Server Error -
*/ - public ApiResponse - updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo( - String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) throws ApiException { + public ApiResponse updateLLMObsDatasetWithHttpInfo( + String projectId, String datasetId, LLMObsDatasetUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateLLMObsAnnotationQueueLabelSchema"; + String operationId = "updateLLMObsDataset"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10665,31 +12278,34 @@ public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabel } Object localVarPostBody = body; - // verify the required parameter 'queueId' is set - if (queueId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - 400, - "Missing the required parameter 'queueId' when calling" - + " updateLLMObsAnnotationQueueLabelSchema"); + 400, "Missing the required parameter 'projectId' when calling updateLLMObsDataset"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, "Missing the required parameter 'datasetId' when calling updateLLMObsDataset"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " updateLLMObsAnnotationQueueLabelSchema"); + 400, "Missing the required parameter 'body' when calling updateLLMObsDataset"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema" - .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsAnnotationQueueLabelSchema", + "v2.LlmObservabilityApi.updateLLMObsDataset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10697,68 +12313,71 @@ public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabel new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update annotation queue label schema. + * Update an LLM Observability dataset. * - *

See {@link #updateLLMObsAnnotationQueueLabelSchemaWithHttpInfo}. + *

See {@link #updateLLMObsDatasetWithHttpInfo}. * - * @param queueId The ID of the LLM Observability annotation queue. (required) - * @param body Update label schema payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsAnnotationQueueLabelSchemaResponse>> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update dataset payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsDatasetResponse>> */ - public CompletableFuture> - updateLLMObsAnnotationQueueLabelSchemaWithHttpInfoAsync( - String queueId, LLMObsAnnotationQueueLabelSchemaUpdateRequest body) { + public CompletableFuture> updateLLMObsDatasetWithHttpInfoAsync( + String projectId, String datasetId, LLMObsDatasetUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateLLMObsAnnotationQueueLabelSchema"; + String operationId = "updateLLMObsDataset"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'queueId' is set - if (queueId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'queueId' when calling" - + " updateLLMObsAnnotationQueueLabelSchema")); + 400, "Missing the required parameter 'projectId' when calling updateLLMObsDataset")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, "Missing the required parameter 'datasetId' when calling updateLLMObsDataset")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling" - + " updateLLMObsAnnotationQueueLabelSchema")); + 400, "Missing the required parameter 'body' when calling updateLLMObsDataset")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/annotation-queues/{queue_id}/label-schema" - .replaceAll("\\{" + "queue_id" + "\\}", apiClient.escapeString(queueId.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10766,7 +12385,7 @@ public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabel try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsAnnotationQueueLabelSchema", + "v2.LlmObservabilityApi.updateLLMObsDataset", localVarPath, new ArrayList(), localVarHeaderParams, @@ -10774,48 +12393,51 @@ public LLMObsAnnotationQueueLabelSchemaResponse updateLLMObsAnnotationQueueLabel new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Create or update a custom evaluator configuration. + * Update LLM Observability dataset records. * - *

See {@link #updateLLMObsCustomEvalConfigWithHttpInfo}. + *

See {@link #updateLLMObsDatasetRecordsWithHttpInfo}. * - * @param evalName The name of the custom LLM Observability evaluator configuration. (required) - * @param body Custom evaluator configuration payload. (required) + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update records payload. (required) + * @return LLMObsDatasetRecordsMutationResponse * @throws ApiException if fails to make API call */ - public void updateLLMObsCustomEvalConfig( - String evalName, LLMObsCustomEvalConfigUpdateRequest body) throws ApiException { - updateLLMObsCustomEvalConfigWithHttpInfo(evalName, body); + public LLMObsDatasetRecordsMutationResponse updateLLMObsDatasetRecords( + String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) + throws ApiException { + return updateLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, body).getData(); } /** - * Create or update a custom evaluator configuration. + * Update LLM Observability dataset records. * - *

See {@link #updateLLMObsCustomEvalConfigWithHttpInfoAsync}. + *

See {@link #updateLLMObsDatasetRecordsWithHttpInfoAsync}. * - * @param evalName The name of the custom LLM Observability evaluator configuration. (required) - * @param body Custom evaluator configuration payload. (required) - * @return CompletableFuture + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update records payload. (required) + * @return CompletableFuture<LLMObsDatasetRecordsMutationResponse> */ - public CompletableFuture updateLLMObsCustomEvalConfigAsync( - String evalName, LLMObsCustomEvalConfigUpdateRequest body) { - return updateLLMObsCustomEvalConfigWithHttpInfoAsync(evalName, body) + public CompletableFuture updateLLMObsDatasetRecordsAsync( + String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) { + return updateLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, body) .thenApply( response -> { return response.getData(); @@ -10823,11 +12445,12 @@ public CompletableFuture updateLLMObsCustomEvalConfigAsync( } /** - * Create or update a custom LLM Observability evaluator configuration by its name. + * Update one or more existing records in an LLM Observability dataset. * - * @param evalName The name of the custom LLM Observability evaluator configuration. (required) - * @param body Custom evaluator configuration payload. (required) - * @return ApiResponse<Void> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update records payload. (required) + * @return ApiResponse<LLMObsDatasetRecordsMutationResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -10838,14 +12461,14 @@ public CompletableFuture updateLLMObsCustomEvalConfigAsync( * * * - * * *
401 Unauthorized -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
429 Too many requests -
*/ - public ApiResponse updateLLMObsCustomEvalConfigWithHttpInfo( - String evalName, LLMObsCustomEvalConfigUpdateRequest body) throws ApiException { + public ApiResponse updateLLMObsDatasetRecordsWithHttpInfo( + String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) + throws ApiException { // Check if unstable operation is enabled - String operationId = "updateLLMObsCustomEvalConfig"; + String operationId = "updateLLMObsDatasetRecords"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -10853,92 +12476,118 @@ public ApiResponse updateLLMObsCustomEvalConfigWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'evalName' is set - if (evalName == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( 400, - "Missing the required parameter 'evalName' when calling updateLLMObsCustomEvalConfig"); + "Missing the required parameter 'projectId' when calling updateLLMObsDatasetRecords"); + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + throw new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling updateLLMObsDatasetRecords"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsCustomEvalConfig"); + 400, "Missing the required parameter 'body' when calling updateLLMObsDatasetRecords"); } // create path and map variables String localVarPath = - "/api/unstable/llm-obs/config/evaluators/custom/{eval_name}" - .replaceAll("\\{" + "eval_name" + "\\}", apiClient.escapeString(evalName.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsCustomEvalConfig", + "v2.LlmObservabilityApi.updateLLMObsDatasetRecords", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); return apiClient.invokeAPI( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Create or update a custom evaluator configuration. + * Update LLM Observability dataset records. * - *

See {@link #updateLLMObsCustomEvalConfigWithHttpInfo}. + *

See {@link #updateLLMObsDatasetRecordsWithHttpInfo}. * - * @param evalName The name of the custom LLM Observability evaluator configuration. (required) - * @param body Custom evaluator configuration payload. (required) - * @return CompletableFuture<ApiResponse<Void>> + * @param projectId The ID of the LLM Observability project. (required) + * @param datasetId The ID of the LLM Observability dataset. (required) + * @param body Update records payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsMutationResponse>> */ - public CompletableFuture> updateLLMObsCustomEvalConfigWithHttpInfoAsync( - String evalName, LLMObsCustomEvalConfigUpdateRequest body) { + public CompletableFuture> + updateLLMObsDatasetRecordsWithHttpInfoAsync( + String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateLLMObsCustomEvalConfig"; + String operationId = "updateLLMObsDatasetRecords"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'evalName' is set - if (evalName == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'projectId' is set + if (projectId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'evalName' when calling" - + " updateLLMObsCustomEvalConfig")); + "Missing the required parameter 'projectId' when calling" + + " updateLLMObsDatasetRecords")); + return result; + } + + // verify the required parameter 'datasetId' is set + if (datasetId == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'datasetId' when calling" + + " updateLLMObsDatasetRecords")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( 400, - "Missing the required parameter 'body' when calling updateLLMObsCustomEvalConfig")); + "Missing the required parameter 'body' when calling updateLLMObsDatasetRecords")); return result; } // create path and map variables String localVarPath = - "/api/unstable/llm-obs/config/evaluators/custom/{eval_name}" - .replaceAll("\\{" + "eval_name" + "\\}", apiClient.escapeString(evalName.toString())); + "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) + .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); Map localVarHeaderParams = new HashMap(); @@ -10946,58 +12595,57 @@ public CompletableFuture> updateLLMObsCustomEvalConfigWithHttp try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsCustomEvalConfig", + "v2.LlmObservabilityApi.updateLLMObsDatasetRecords", localVarPath, new ArrayList(), localVarHeaderParams, new HashMap(), - new String[] {"*/*"}, + new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } return apiClient.invokeAPIAsync( - "PUT", + "PATCH", builder, localVarHeaderParams, new String[] {"application/json"}, localVarPostBody, new HashMap(), false, - null); + new GenericType() {}); } /** - * Update an LLM Observability dataset. + * Update an LLM Observability experiment. * - *

See {@link #updateLLMObsDatasetWithHttpInfo}. + *

See {@link #updateLLMObsExperimentWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update dataset payload. (required) - * @return LLMObsDatasetResponse + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param body Update experiment payload. (required) + * @return LLMObsExperimentResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetResponse updateLLMObsDataset( - String projectId, String datasetId, LLMObsDatasetUpdateRequest body) throws ApiException { - return updateLLMObsDatasetWithHttpInfo(projectId, datasetId, body).getData(); + public LLMObsExperimentResponse updateLLMObsExperiment( + String experimentId, LLMObsExperimentUpdateRequest body) throws ApiException { + return updateLLMObsExperimentWithHttpInfo(experimentId, body).getData(); } /** - * Update an LLM Observability dataset. + * Update an LLM Observability experiment. * - *

See {@link #updateLLMObsDatasetWithHttpInfoAsync}. + *

See {@link #updateLLMObsExperimentWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update dataset payload. (required) - * @return CompletableFuture<LLMObsDatasetResponse> + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param body Update experiment payload. (required) + * @return CompletableFuture<LLMObsExperimentResponse> */ - public CompletableFuture updateLLMObsDatasetAsync( - String projectId, String datasetId, LLMObsDatasetUpdateRequest body) { - return updateLLMObsDatasetWithHttpInfoAsync(projectId, datasetId, body) + public CompletableFuture updateLLMObsExperimentAsync( + String experimentId, LLMObsExperimentUpdateRequest body) { + return updateLLMObsExperimentWithHttpInfoAsync(experimentId, body) .thenApply( response -> { return response.getData(); @@ -11005,12 +12653,11 @@ public CompletableFuture updateLLMObsDatasetAsync( } /** - * Partially update an existing LLM Observability dataset within the specified project. + * Partially update an existing LLM Observability experiment. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update dataset payload. (required) - * @return ApiResponse<LLMObsDatasetResponse> + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param body Update experiment payload. (required) + * @return ApiResponse<LLMObsExperimentResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -11024,10 +12671,10 @@ public CompletableFuture updateLLMObsDatasetAsync( * *
429 Too many requests -
*/ - public ApiResponse updateLLMObsDatasetWithHttpInfo( - String projectId, String datasetId, LLMObsDatasetUpdateRequest body) throws ApiException { + public ApiResponse updateLLMObsExperimentWithHttpInfo( + String experimentId, LLMObsExperimentUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateLLMObsDataset"; + String operationId = "updateLLMObsExperiment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -11035,34 +12682,28 @@ public ApiResponse updateLLMObsDatasetWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { - throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling updateLLMObsDataset"); - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { + // verify the required parameter 'experimentId' is set + if (experimentId == null) { throw new ApiException( - 400, "Missing the required parameter 'datasetId' when calling updateLLMObsDataset"); + 400, "Missing the required parameter 'experimentId' when calling updateLLMObsExperiment"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsDataset"); + 400, "Missing the required parameter 'body' when calling updateLLMObsExperiment"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/experiments/{experiment_id}" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsDataset", + "v2.LlmObservabilityApi.updateLLMObsExperiment", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11077,64 +12718,56 @@ public ApiResponse updateLLMObsDatasetWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an LLM Observability dataset. + * Update an LLM Observability experiment. * - *

See {@link #updateLLMObsDatasetWithHttpInfo}. + *

See {@link #updateLLMObsExperimentWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update dataset payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsDatasetResponse>> + * @param experimentId The ID of the LLM Observability experiment. (required) + * @param body Update experiment payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsExperimentResponse>> */ - public CompletableFuture> updateLLMObsDatasetWithHttpInfoAsync( - String projectId, String datasetId, LLMObsDatasetUpdateRequest body) { + public CompletableFuture> + updateLLMObsExperimentWithHttpInfoAsync( + String experimentId, LLMObsExperimentUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateLLMObsDataset"; + String operationId = "updateLLMObsExperiment"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, "Missing the required parameter 'projectId' when calling updateLLMObsDataset")); - return result; - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'experimentId' is set + if (experimentId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'datasetId' when calling updateLLMObsDataset")); + 400, + "Missing the required parameter 'experimentId' when calling updateLLMObsExperiment")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsDataset")); + 400, "Missing the required parameter 'body' when calling updateLLMObsExperiment")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/experiments/{experiment_id}" + .replaceAll( + "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); Map localVarHeaderParams = new HashMap(); @@ -11142,7 +12775,7 @@ public CompletableFuture> updateLLMObsDataset try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsDataset", + "v2.LlmObservabilityApi.updateLLMObsExperiment", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11150,7 +12783,7 @@ public CompletableFuture> updateLLMObsDataset new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -11162,39 +12795,36 @@ public CompletableFuture> updateLLMObsDataset localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update LLM Observability dataset records. + * Update an LLM Observability project. * - *

See {@link #updateLLMObsDatasetRecordsWithHttpInfo}. + *

See {@link #updateLLMObsProjectWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update records payload. (required) - * @return LLMObsDatasetRecordsMutationResponse + * @param body Update project payload. (required) + * @return LLMObsProjectResponse * @throws ApiException if fails to make API call */ - public LLMObsDatasetRecordsMutationResponse updateLLMObsDatasetRecords( - String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) - throws ApiException { - return updateLLMObsDatasetRecordsWithHttpInfo(projectId, datasetId, body).getData(); + public LLMObsProjectResponse updateLLMObsProject( + String projectId, LLMObsProjectUpdateRequest body) throws ApiException { + return updateLLMObsProjectWithHttpInfo(projectId, body).getData(); } /** - * Update LLM Observability dataset records. + * Update an LLM Observability project. * - *

See {@link #updateLLMObsDatasetRecordsWithHttpInfoAsync}. + *

See {@link #updateLLMObsProjectWithHttpInfoAsync}. * * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update records payload. (required) - * @return CompletableFuture<LLMObsDatasetRecordsMutationResponse> + * @param body Update project payload. (required) + * @return CompletableFuture<LLMObsProjectResponse> */ - public CompletableFuture updateLLMObsDatasetRecordsAsync( - String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) { - return updateLLMObsDatasetRecordsWithHttpInfoAsync(projectId, datasetId, body) + public CompletableFuture updateLLMObsProjectAsync( + String projectId, LLMObsProjectUpdateRequest body) { + return updateLLMObsProjectWithHttpInfoAsync(projectId, body) .thenApply( response -> { return response.getData(); @@ -11202,12 +12832,11 @@ public CompletableFuture updateLLMObsDatas } /** - * Update one or more existing records in an LLM Observability dataset. + * Partially update an existing LLM Observability project. * * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update records payload. (required) - * @return ApiResponse<LLMObsDatasetRecordsMutationResponse> + * @param body Update project payload. (required) + * @return ApiResponse<LLMObsProjectResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -11221,11 +12850,10 @@ public CompletableFuture updateLLMObsDatas * *
429 Too many requests -
*/ - public ApiResponse updateLLMObsDatasetRecordsWithHttpInfo( - String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) - throws ApiException { + public ApiResponse updateLLMObsProjectWithHttpInfo( + String projectId, LLMObsProjectUpdateRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateLLMObsDatasetRecords"; + String operationId = "updateLLMObsProject"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -11236,33 +12864,24 @@ public ApiResponse updateLLMObsDatasetReco // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - 400, - "Missing the required parameter 'projectId' when calling updateLLMObsDatasetRecords"); - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - throw new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling updateLLMObsDatasetRecords"); + 400, "Missing the required parameter 'projectId' when calling updateLLMObsProject"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsDatasetRecords"); + 400, "Missing the required parameter 'body' when calling updateLLMObsProject"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/projects/{project_id}" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsDatasetRecords", + "v2.LlmObservabilityApi.updateLLMObsProject", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11277,29 +12896,26 @@ public ApiResponse updateLLMObsDatasetReco localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update LLM Observability dataset records. + * Update an LLM Observability project. * - *

See {@link #updateLLMObsDatasetRecordsWithHttpInfo}. + *

See {@link #updateLLMObsProjectWithHttpInfo}. * * @param projectId The ID of the LLM Observability project. (required) - * @param datasetId The ID of the LLM Observability dataset. (required) - * @param body Update records payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsDatasetRecordsMutationResponse>> + * @param body Update project payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsProjectResponse>> */ - public CompletableFuture> - updateLLMObsDatasetRecordsWithHttpInfoAsync( - String projectId, String datasetId, LLMObsDatasetRecordsUpdateRequest body) { + public CompletableFuture> updateLLMObsProjectWithHttpInfoAsync( + String projectId, LLMObsProjectUpdateRequest body) { // Check if unstable operation is enabled - String operationId = "updateLLMObsDatasetRecords"; + String operationId = "updateLLMObsProject"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; @@ -11308,43 +12924,25 @@ public ApiResponse updateLLMObsDatasetReco // verify the required parameter 'projectId' is set if (projectId == null) { - CompletableFuture> result = - new CompletableFuture<>(); - result.completeExceptionally( - new ApiException( - 400, - "Missing the required parameter 'projectId' when calling" - + " updateLLMObsDatasetRecords")); - return result; - } - - // verify the required parameter 'datasetId' is set - if (datasetId == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'datasetId' when calling" - + " updateLLMObsDatasetRecords")); + 400, "Missing the required parameter 'projectId' when calling updateLLMObsProject")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'body' when calling updateLLMObsDatasetRecords")); + 400, "Missing the required parameter 'body' when calling updateLLMObsProject")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/{project_id}/datasets/{dataset_id}/records" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())) - .replaceAll("\\{" + "dataset_id" + "\\}", apiClient.escapeString(datasetId.toString())); + "/api/v2/llm-obs/v1/projects/{project_id}" + .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); Map localVarHeaderParams = new HashMap(); @@ -11352,7 +12950,7 @@ public ApiResponse updateLLMObsDatasetReco try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsDatasetRecords", + "v2.LlmObservabilityApi.updateLLMObsProject", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11360,8 +12958,7 @@ public ApiResponse updateLLMObsDatasetReco new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = - new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -11373,36 +12970,36 @@ public ApiResponse updateLLMObsDatasetReco localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an LLM Observability experiment. + * Update an LLM Observability prompt. * - *

See {@link #updateLLMObsExperimentWithHttpInfo}. + *

See {@link #updateLLMObsPromptWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @param body Update experiment payload. (required) - * @return LLMObsExperimentResponse + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Update prompt payload. (required) + * @return LLMObsPromptResponse * @throws ApiException if fails to make API call */ - public LLMObsExperimentResponse updateLLMObsExperiment( - String experimentId, LLMObsExperimentUpdateRequest body) throws ApiException { - return updateLLMObsExperimentWithHttpInfo(experimentId, body).getData(); + public LLMObsPromptResponse updateLLMObsPrompt(String promptId, LLMObsUpdatePromptRequest body) + throws ApiException { + return updateLLMObsPromptWithHttpInfo(promptId, body).getData(); } /** - * Update an LLM Observability experiment. + * Update an LLM Observability prompt. * - *

See {@link #updateLLMObsExperimentWithHttpInfoAsync}. + *

See {@link #updateLLMObsPromptWithHttpInfoAsync}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @param body Update experiment payload. (required) - * @return CompletableFuture<LLMObsExperimentResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Update prompt payload. (required) + * @return CompletableFuture<LLMObsPromptResponse> */ - public CompletableFuture updateLLMObsExperimentAsync( - String experimentId, LLMObsExperimentUpdateRequest body) { - return updateLLMObsExperimentWithHttpInfoAsync(experimentId, body) + public CompletableFuture updateLLMObsPromptAsync( + String promptId, LLMObsUpdatePromptRequest body) { + return updateLLMObsPromptWithHttpInfoAsync(promptId, body) .thenApply( response -> { return response.getData(); @@ -11410,11 +13007,11 @@ public CompletableFuture updateLLMObsExperimentAsync( } /** - * Partially update an existing LLM Observability experiment. + * Update the title, the description, or both, for an LLM Observability prompt. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @param body Update experiment payload. (required) - * @return ApiResponse<LLMObsExperimentResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Update prompt payload. (required) + * @return ApiResponse<LLMObsPromptResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -11428,10 +13025,10 @@ public CompletableFuture updateLLMObsExperimentAsync( * *
429 Too many requests -
*/ - public ApiResponse updateLLMObsExperimentWithHttpInfo( - String experimentId, LLMObsExperimentUpdateRequest body) throws ApiException { + public ApiResponse updateLLMObsPromptWithHttpInfo( + String promptId, LLMObsUpdatePromptRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateLLMObsExperiment"; + String operationId = "updateLLMObsPrompt"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -11439,28 +13036,27 @@ public ApiResponse updateLLMObsExperimentWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { + // verify the required parameter 'promptId' is set + if (promptId == null) { throw new ApiException( - 400, "Missing the required parameter 'experimentId' when calling updateLLMObsExperiment"); + 400, "Missing the required parameter 'promptId' when calling updateLLMObsPrompt"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsExperiment"); + 400, "Missing the required parameter 'body' when calling updateLLMObsPrompt"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/experiments/{experiment_id}" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/prompts/{prompt_id}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsExperiment", + "v2.LlmObservabilityApi.updateLLMObsPrompt", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11475,56 +13071,53 @@ public ApiResponse updateLLMObsExperimentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an LLM Observability experiment. + * Update an LLM Observability prompt. * - *

See {@link #updateLLMObsExperimentWithHttpInfo}. + *

See {@link #updateLLMObsPromptWithHttpInfo}. * - * @param experimentId The ID of the LLM Observability experiment. (required) - * @param body Update experiment payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsExperimentResponse>> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param body Update prompt payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPromptResponse>> */ - public CompletableFuture> - updateLLMObsExperimentWithHttpInfoAsync( - String experimentId, LLMObsExperimentUpdateRequest body) { + public CompletableFuture> updateLLMObsPromptWithHttpInfoAsync( + String promptId, LLMObsUpdatePromptRequest body) { // Check if unstable operation is enabled - String operationId = "updateLLMObsExperiment"; + String operationId = "updateLLMObsPrompt"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'experimentId' is set - if (experimentId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'promptId' is set + if (promptId == null) { + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, - "Missing the required parameter 'experimentId' when calling updateLLMObsExperiment")); + 400, "Missing the required parameter 'promptId' when calling updateLLMObsPrompt")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsExperiment")); + 400, "Missing the required parameter 'body' when calling updateLLMObsPrompt")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/experiments/{experiment_id}" - .replaceAll( - "\\{" + "experiment_id" + "\\}", apiClient.escapeString(experimentId.toString())); + "/api/v2/llm-obs/v1/prompts/{prompt_id}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())); Map localVarHeaderParams = new HashMap(); @@ -11532,7 +13125,7 @@ public ApiResponse updateLLMObsExperimentWithHttpInfo( try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsExperiment", + "v2.LlmObservabilityApi.updateLLMObsPrompt", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11540,7 +13133,7 @@ public ApiResponse updateLLMObsExperimentWithHttpInfo( new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -11552,36 +13145,38 @@ public ApiResponse updateLLMObsExperimentWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an LLM Observability project. + * Update a specific LLM Observability prompt version. * - *

See {@link #updateLLMObsProjectWithHttpInfo}. + *

See {@link #updateLLMObsPromptVersionWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param body Update project payload. (required) - * @return LLMObsProjectResponse + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @param body Update prompt version payload. (required) + * @return LLMObsPromptVersionResponse * @throws ApiException if fails to make API call */ - public LLMObsProjectResponse updateLLMObsProject( - String projectId, LLMObsProjectUpdateRequest body) throws ApiException { - return updateLLMObsProjectWithHttpInfo(projectId, body).getData(); + public LLMObsPromptVersionResponse updateLLMObsPromptVersion( + String promptId, Long version, LLMObsUpdatePromptVersionRequest body) throws ApiException { + return updateLLMObsPromptVersionWithHttpInfo(promptId, version, body).getData(); } /** - * Update an LLM Observability project. + * Update a specific LLM Observability prompt version. * - *

See {@link #updateLLMObsProjectWithHttpInfoAsync}. + *

See {@link #updateLLMObsPromptVersionWithHttpInfoAsync}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param body Update project payload. (required) - * @return CompletableFuture<LLMObsProjectResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @param body Update prompt version payload. (required) + * @return CompletableFuture<LLMObsPromptVersionResponse> */ - public CompletableFuture updateLLMObsProjectAsync( - String projectId, LLMObsProjectUpdateRequest body) { - return updateLLMObsProjectWithHttpInfoAsync(projectId, body) + public CompletableFuture updateLLMObsPromptVersionAsync( + String promptId, Long version, LLMObsUpdatePromptVersionRequest body) { + return updateLLMObsPromptVersionWithHttpInfoAsync(promptId, version, body) .thenApply( response -> { return response.getData(); @@ -11589,11 +13184,13 @@ public CompletableFuture updateLLMObsProjectAsync( } /** - * Partially update an existing LLM Observability project. + * Update the description, the feature-flag environments, or both, for a specific version of an + * LLM Observability prompt. * - * @param projectId The ID of the LLM Observability project. (required) - * @param body Update project payload. (required) - * @return ApiResponse<LLMObsProjectResponse> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @param body Update prompt version payload. (required) + * @return ApiResponse<LLMObsPromptVersionResponse> * @throws ApiException if fails to make API call * @http.response.details * @@ -11607,10 +13204,10 @@ public CompletableFuture updateLLMObsProjectAsync( * *
429 Too many requests -
*/ - public ApiResponse updateLLMObsProjectWithHttpInfo( - String projectId, LLMObsProjectUpdateRequest body) throws ApiException { + public ApiResponse updateLLMObsPromptVersionWithHttpInfo( + String promptId, Long version, LLMObsUpdatePromptVersionRequest body) throws ApiException { // Check if unstable operation is enabled - String operationId = "updateLLMObsProject"; + String operationId = "updateLLMObsPromptVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { @@ -11618,27 +13215,34 @@ public ApiResponse updateLLMObsProjectWithHttpInfo( } Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { + // verify the required parameter 'promptId' is set + if (promptId == null) { throw new ApiException( - 400, "Missing the required parameter 'projectId' when calling updateLLMObsProject"); + 400, "Missing the required parameter 'promptId' when calling updateLLMObsPromptVersion"); + } + + // verify the required parameter 'version' is set + if (version == null) { + throw new ApiException( + 400, "Missing the required parameter 'version' when calling updateLLMObsPromptVersion"); } // verify the required parameter 'body' is set if (body == null) { throw new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsProject"); + 400, "Missing the required parameter 'body' when calling updateLLMObsPromptVersion"); } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/projects/{project_id}" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); Invocation.Builder builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsProject", + "v2.LlmObservabilityApi.updateLLMObsPromptVersion", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11653,53 +13257,71 @@ public ApiResponse updateLLMObsProjectWithHttpInfo( localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** - * Update an LLM Observability project. + * Update a specific LLM Observability prompt version. * - *

See {@link #updateLLMObsProjectWithHttpInfo}. + *

See {@link #updateLLMObsPromptVersionWithHttpInfo}. * - * @param projectId The ID of the LLM Observability project. (required) - * @param body Update project payload. (required) - * @return CompletableFuture<ApiResponse<LLMObsProjectResponse>> + * @param promptId The customer-provided identifier of the LLM Observability prompt. (required) + * @param version The version number of the LLM Observability prompt. (required) + * @param body Update prompt version payload. (required) + * @return CompletableFuture<ApiResponse<LLMObsPromptVersionResponse>> */ - public CompletableFuture> updateLLMObsProjectWithHttpInfoAsync( - String projectId, LLMObsProjectUpdateRequest body) { + public CompletableFuture> + updateLLMObsPromptVersionWithHttpInfoAsync( + String promptId, Long version, LLMObsUpdatePromptVersionRequest body) { // Check if unstable operation is enabled - String operationId = "updateLLMObsProject"; + String operationId = "updateLLMObsPromptVersion"; if (apiClient.isUnstableOperationEnabled("v2." + operationId)) { apiClient.getLogger().warning(String.format("Using unstable operation '%s'", operationId)); } else { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException(0, String.format("Unstable operation '%s' is disabled", operationId))); return result; } Object localVarPostBody = body; - // verify the required parameter 'projectId' is set - if (projectId == null) { - CompletableFuture> result = new CompletableFuture<>(); + // verify the required parameter 'promptId' is set + if (promptId == null) { + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'projectId' when calling updateLLMObsProject")); + 400, + "Missing the required parameter 'promptId' when calling updateLLMObsPromptVersion")); + return result; + } + + // verify the required parameter 'version' is set + if (version == null) { + CompletableFuture> result = + new CompletableFuture<>(); + result.completeExceptionally( + new ApiException( + 400, + "Missing the required parameter 'version' when calling updateLLMObsPromptVersion")); return result; } // verify the required parameter 'body' is set if (body == null) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally( new ApiException( - 400, "Missing the required parameter 'body' when calling updateLLMObsProject")); + 400, "Missing the required parameter 'body' when calling updateLLMObsPromptVersion")); return result; } // create path and map variables String localVarPath = - "/api/v2/llm-obs/v1/projects/{project_id}" - .replaceAll("\\{" + "project_id" + "\\}", apiClient.escapeString(projectId.toString())); + "/api/v2/llm-obs/v1/prompts/{prompt_id}/versions/{version}" + .replaceAll("\\{" + "prompt_id" + "\\}", apiClient.escapeString(promptId.toString())) + .replaceAll("\\{" + "version" + "\\}", apiClient.escapeString(version.toString())); Map localVarHeaderParams = new HashMap(); @@ -11707,7 +13329,7 @@ public CompletableFuture> updateLLMObsProject try { builder = apiClient.createBuilder( - "v2.LlmObservabilityApi.updateLLMObsProject", + "v2.LlmObservabilityApi.updateLLMObsPromptVersion", localVarPath, new ArrayList(), localVarHeaderParams, @@ -11715,7 +13337,8 @@ public CompletableFuture> updateLLMObsProject new String[] {"application/json"}, new String[] {"apiKeyAuth", "appKeyAuth"}); } catch (ApiException ex) { - CompletableFuture> result = new CompletableFuture<>(); + CompletableFuture> result = + new CompletableFuture<>(); result.completeExceptionally(ex); return result; } @@ -11727,7 +13350,7 @@ public CompletableFuture> updateLLMObsProject localVarPostBody, new HashMap(), false, - new GenericType() {}); + new GenericType() {}); } /** Manage optional parameters to uploadLLMObsDatasetRecordsFile. */ diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptData.java new file mode 100644 index 00000000000..3770e7ff7e1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for creating an LLM Observability prompt. */ +@JsonPropertyOrder({ + LLMObsCreatePromptData.JSON_PROPERTY_ATTRIBUTES, + LLMObsCreatePromptData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsCreatePromptDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptType type; + + public LLMObsCreatePromptData() {} + + @JsonCreator + public LLMObsCreatePromptData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsCreatePromptDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsCreatePromptData attributes(LLMObsCreatePromptDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating an LLM Observability prompt and its first version. prompt_id + * and template are required; all other attributes are optional. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsCreatePromptDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsCreatePromptDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsCreatePromptData type(LLMObsPromptType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptType getType() { + return type; + } + + public void setType(LLMObsPromptType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsCreatePromptData + */ + @JsonAnySetter + public LLMObsCreatePromptData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsCreatePromptData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptData llmObsCreatePromptData = (LLMObsCreatePromptData) o; + return Objects.equals(this.attributes, llmObsCreatePromptData.attributes) + && Objects.equals(this.type, llmObsCreatePromptData.type) + && Objects.equals(this.additionalProperties, llmObsCreatePromptData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java new file mode 100644 index 00000000000..4e82d53e6eb --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptDataAttributes.java @@ -0,0 +1,343 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Attributes for creating an LLM Observability prompt and its first version. prompt_id + * and template are required; all other attributes are optional. + */ +@JsonPropertyOrder({ + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_ENV_IDS, + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_LABELS, + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_PROMPT_ID, + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_TEMPLATE, + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_TITLE, + LLMObsCreatePromptDataAttributes.JSON_PROPERTY_USER_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ENV_IDS = "env_ids"; + private List envIds = null; + + public static final String JSON_PROPERTY_LABELS = "labels"; + private List labels = null; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private String promptId; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private LLMObsPromptTemplate template; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public static final String JSON_PROPERTY_USER_VERSION = "user_version"; + private String userVersion; + + public LLMObsCreatePromptDataAttributes() {} + + @JsonCreator + public LLMObsCreatePromptDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_ID) String promptId, + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE) + LLMObsPromptTemplate template) { + this.promptId = promptId; + this.template = template; + this.unparsed |= template.unparsed; + } + + public LLMObsCreatePromptDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Optional description of the prompt. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsCreatePromptDataAttributes envIds(List envIds) { + this.envIds = envIds; + return this; + } + + public LLMObsCreatePromptDataAttributes addEnvIdsItem(String envIdsItem) { + if (this.envIds == null) { + this.envIds = new ArrayList<>(); + } + this.envIds.add(envIdsItem); + return this; + } + + /** + * Optional feature-flag environment UUIDs the service attempts to enable and configure to use the + * first version as their default after creation. + * + * @return envIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnvIds() { + return envIds; + } + + public void setEnvIds(List envIds) { + this.envIds = envIds; + } + + public LLMObsCreatePromptDataAttributes labels(List labels) { + this.labels = labels; + return this; + } + + public LLMObsCreatePromptDataAttributes addLabelsItem(LLMObsPromptVersionLabel labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + this.unparsed |= !labelsItem.isValid(); + return this; + } + + /** + * Optional labels to attach to the first version. Do not use this attribute for new integrations. + * + * @return labels + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + @Deprecated + public void setLabels(List labels) { + this.labels = labels; + } + + public LLMObsCreatePromptDataAttributes promptId(String promptId) { + this.promptId = promptId; + return this; + } + + /** + * Customer-provided identifier for the new prompt. + * + * @return promptId + */ + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptId() { + return promptId; + } + + public void setPromptId(String promptId) { + this.promptId = promptId; + } + + public LLMObsCreatePromptDataAttributes template(LLMObsPromptTemplate template) { + this.template = template; + this.unparsed |= template.unparsed; + return this; + } + + /** + * A text template or a list of chat messages. + * + * @return template + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptTemplate getTemplate() { + return template; + } + + public void setTemplate(LLMObsPromptTemplate template) { + this.template = template; + if (template != null) { + this.unparsed |= template.unparsed; + } + } + + public LLMObsCreatePromptDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Optional title of the prompt. + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public LLMObsCreatePromptDataAttributes userVersion(String userVersion) { + this.userVersion = userVersion; + return this; + } + + /** + * Optional user-supplied version identifier for the first version. + * + * @return userVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserVersion() { + return userVersion; + } + + public void setUserVersion(String userVersion) { + this.userVersion = userVersion; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsCreatePromptDataAttributes + */ + @JsonAnySetter + public LLMObsCreatePromptDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsCreatePromptDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptDataAttributes llmObsCreatePromptDataAttributes = + (LLMObsCreatePromptDataAttributes) o; + return Objects.equals(this.description, llmObsCreatePromptDataAttributes.description) + && Objects.equals(this.envIds, llmObsCreatePromptDataAttributes.envIds) + && Objects.equals(this.labels, llmObsCreatePromptDataAttributes.labels) + && Objects.equals(this.promptId, llmObsCreatePromptDataAttributes.promptId) + && Objects.equals(this.template, llmObsCreatePromptDataAttributes.template) + && Objects.equals(this.title, llmObsCreatePromptDataAttributes.title) + && Objects.equals(this.userVersion, llmObsCreatePromptDataAttributes.userVersion) + && Objects.equals( + this.additionalProperties, llmObsCreatePromptDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + description, envIds, labels, promptId, template, title, userVersion, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptDataAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" envIds: ").append(toIndentedString(envIds)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" userVersion: ").append(toIndentedString(userVersion)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptRequest.java new file mode 100644 index 00000000000..8ea027047ca --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create an LLM Observability prompt. */ +@JsonPropertyOrder({LLMObsCreatePromptRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsCreatePromptData data; + + public LLMObsCreatePromptRequest() {} + + @JsonCreator + public LLMObsCreatePromptRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LLMObsCreatePromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsCreatePromptRequest data(LLMObsCreatePromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for creating an LLM Observability prompt. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsCreatePromptData getData() { + return data; + } + + public void setData(LLMObsCreatePromptData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsCreatePromptRequest + */ + @JsonAnySetter + public LLMObsCreatePromptRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsCreatePromptRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptRequest llmObsCreatePromptRequest = (LLMObsCreatePromptRequest) o; + return Objects.equals(this.data, llmObsCreatePromptRequest.data) + && Objects.equals( + this.additionalProperties, llmObsCreatePromptRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java new file mode 100644 index 00000000000..b1c592f76da --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionData.java @@ -0,0 +1,187 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for creating an LLM Observability prompt version. */ +@JsonPropertyOrder({ + LLMObsCreatePromptVersionData.JSON_PROPERTY_ATTRIBUTES, + LLMObsCreatePromptVersionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptVersionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsCreatePromptVersionDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptVersionType type; + + public LLMObsCreatePromptVersionData() {} + + @JsonCreator + public LLMObsCreatePromptVersionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsCreatePromptVersionDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptVersionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsCreatePromptVersionData attributes( + LLMObsCreatePromptVersionDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for creating a new version of an LLM Observability prompt. template is + * required; all other attributes are optional. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsCreatePromptVersionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsCreatePromptVersionDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsCreatePromptVersionData type(LLMObsPromptVersionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt version. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptVersionType getType() { + return type; + } + + public void setType(LLMObsPromptVersionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsCreatePromptVersionData + */ + @JsonAnySetter + public LLMObsCreatePromptVersionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsCreatePromptVersionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptVersionData llmObsCreatePromptVersionData = (LLMObsCreatePromptVersionData) o; + return Objects.equals(this.attributes, llmObsCreatePromptVersionData.attributes) + && Objects.equals(this.type, llmObsCreatePromptVersionData.type) + && Objects.equals( + this.additionalProperties, llmObsCreatePromptVersionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptVersionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java new file mode 100644 index 00000000000..16d0383bcf3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionDataAttributes.java @@ -0,0 +1,289 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Attributes for creating a new version of an LLM Observability prompt. template is + * required; all other attributes are optional. + */ +@JsonPropertyOrder({ + LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_ENV_IDS, + LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_LABELS, + LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_TEMPLATE, + LLMObsCreatePromptVersionDataAttributes.JSON_PROPERTY_USER_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptVersionDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ENV_IDS = "env_ids"; + private List envIds = null; + + public static final String JSON_PROPERTY_LABELS = "labels"; + private List labels = null; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private LLMObsPromptTemplate template; + + public static final String JSON_PROPERTY_USER_VERSION = "user_version"; + private String userVersion; + + public LLMObsCreatePromptVersionDataAttributes() {} + + @JsonCreator + public LLMObsCreatePromptVersionDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE) + LLMObsPromptTemplate template) { + this.template = template; + this.unparsed |= template.unparsed; + } + + public LLMObsCreatePromptVersionDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Optional description of this version. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsCreatePromptVersionDataAttributes envIds(List envIds) { + this.envIds = envIds; + return this; + } + + public LLMObsCreatePromptVersionDataAttributes addEnvIdsItem(String envIdsItem) { + if (this.envIds == null) { + this.envIds = new ArrayList<>(); + } + this.envIds.add(envIdsItem); + return this; + } + + /** + * Optional feature-flag environment UUIDs the service attempts to enable and configure to use + * this version as their default after creation. + * + * @return envIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnvIds() { + return envIds; + } + + public void setEnvIds(List envIds) { + this.envIds = envIds; + } + + public LLMObsCreatePromptVersionDataAttributes labels(List labels) { + this.labels = labels; + return this; + } + + public LLMObsCreatePromptVersionDataAttributes addLabelsItem( + LLMObsPromptVersionLabel labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + this.unparsed |= !labelsItem.isValid(); + return this; + } + + /** + * Optional labels to attach to this version. Do not use this attribute for new integrations. + * + * @return labels + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + @Deprecated + public void setLabels(List labels) { + this.labels = labels; + } + + public LLMObsCreatePromptVersionDataAttributes template(LLMObsPromptTemplate template) { + this.template = template; + this.unparsed |= template.unparsed; + return this; + } + + /** + * A text template or a list of chat messages. + * + * @return template + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptTemplate getTemplate() { + return template; + } + + public void setTemplate(LLMObsPromptTemplate template) { + this.template = template; + if (template != null) { + this.unparsed |= template.unparsed; + } + } + + public LLMObsCreatePromptVersionDataAttributes userVersion(String userVersion) { + this.userVersion = userVersion; + return this; + } + + /** + * Optional user-supplied version identifier for this version. + * + * @return userVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserVersion() { + return userVersion; + } + + public void setUserVersion(String userVersion) { + this.userVersion = userVersion; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsCreatePromptVersionDataAttributes + */ + @JsonAnySetter + public LLMObsCreatePromptVersionDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsCreatePromptVersionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptVersionDataAttributes llmObsCreatePromptVersionDataAttributes = + (LLMObsCreatePromptVersionDataAttributes) o; + return Objects.equals(this.description, llmObsCreatePromptVersionDataAttributes.description) + && Objects.equals(this.envIds, llmObsCreatePromptVersionDataAttributes.envIds) + && Objects.equals(this.labels, llmObsCreatePromptVersionDataAttributes.labels) + && Objects.equals(this.template, llmObsCreatePromptVersionDataAttributes.template) + && Objects.equals(this.userVersion, llmObsCreatePromptVersionDataAttributes.userVersion) + && Objects.equals( + this.additionalProperties, + llmObsCreatePromptVersionDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, envIds, labels, template, userVersion, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptVersionDataAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" envIds: ").append(toIndentedString(envIds)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" userVersion: ").append(toIndentedString(userVersion)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionRequest.java new file mode 100644 index 00000000000..3d722a5240e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsCreatePromptVersionRequest.java @@ -0,0 +1,151 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to create a new version of an LLM Observability prompt. */ +@JsonPropertyOrder({LLMObsCreatePromptVersionRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsCreatePromptVersionRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsCreatePromptVersionData data; + + public LLMObsCreatePromptVersionRequest() {} + + @JsonCreator + public LLMObsCreatePromptVersionRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsCreatePromptVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsCreatePromptVersionRequest data(LLMObsCreatePromptVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for creating an LLM Observability prompt version. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsCreatePromptVersionData getData() { + return data; + } + + public void setData(LLMObsCreatePromptVersionData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsCreatePromptVersionRequest + */ + @JsonAnySetter + public LLMObsCreatePromptVersionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsCreatePromptVersionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsCreatePromptVersionRequest llmObsCreatePromptVersionRequest = + (LLMObsCreatePromptVersionRequest) o; + return Objects.equals(this.data, llmObsCreatePromptVersionRequest.data) + && Objects.equals( + this.additionalProperties, llmObsCreatePromptVersionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsCreatePromptVersionRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptData.java new file mode 100644 index 00000000000..31928273c9d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object confirming that an LLM Observability prompt was deleted. */ +@JsonPropertyOrder({ + LLMObsDeletedPromptData.JSON_PROPERTY_ATTRIBUTES, + LLMObsDeletedPromptData.JSON_PROPERTY_ID, + LLMObsDeletedPromptData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeletedPromptData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsDeletedPromptDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptType type; + + public LLMObsDeletedPromptData() {} + + @JsonCreator + public LLMObsDeletedPromptData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsDeletedPromptDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsDeletedPromptData attributes(LLMObsDeletedPromptDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes confirming that an LLM Observability prompt was deleted. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsDeletedPromptDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsDeletedPromptDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsDeletedPromptData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the deleted prompt. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsDeletedPromptData type(LLMObsPromptType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptType getType() { + return type; + } + + public void setType(LLMObsPromptType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeletedPromptData + */ + @JsonAnySetter + public LLMObsDeletedPromptData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeletedPromptData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeletedPromptData llmObsDeletedPromptData = (LLMObsDeletedPromptData) o; + return Objects.equals(this.attributes, llmObsDeletedPromptData.attributes) + && Objects.equals(this.id, llmObsDeletedPromptData.id) + && Objects.equals(this.type, llmObsDeletedPromptData.type) + && Objects.equals(this.additionalProperties, llmObsDeletedPromptData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeletedPromptData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptDataAttributes.java new file mode 100644 index 00000000000..a51eb6443e0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptDataAttributes.java @@ -0,0 +1,176 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Attributes confirming that an LLM Observability prompt was deleted. */ +@JsonPropertyOrder({ + LLMObsDeletedPromptDataAttributes.JSON_PROPERTY_DELETED_AT, + LLMObsDeletedPromptDataAttributes.JSON_PROPERTY_PROMPT_ID +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeletedPromptDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DELETED_AT = "deleted_at"; + private OffsetDateTime deletedAt; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private String promptId; + + public LLMObsDeletedPromptDataAttributes() {} + + @JsonCreator + public LLMObsDeletedPromptDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_DELETED_AT) OffsetDateTime deletedAt, + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_ID) String promptId) { + this.deletedAt = deletedAt; + this.promptId = promptId; + } + + public LLMObsDeletedPromptDataAttributes deletedAt(OffsetDateTime deletedAt) { + this.deletedAt = deletedAt; + return this; + } + + /** + * Timestamp when the prompt was deleted. + * + * @return deletedAt + */ + @JsonProperty(JSON_PROPERTY_DELETED_AT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public OffsetDateTime getDeletedAt() { + return deletedAt; + } + + public void setDeletedAt(OffsetDateTime deletedAt) { + this.deletedAt = deletedAt; + } + + public LLMObsDeletedPromptDataAttributes promptId(String promptId) { + this.promptId = promptId; + return this; + } + + /** + * Customer-provided identifier of the deleted prompt. + * + * @return promptId + */ + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptId() { + return promptId; + } + + public void setPromptId(String promptId) { + this.promptId = promptId; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeletedPromptDataAttributes + */ + @JsonAnySetter + public LLMObsDeletedPromptDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeletedPromptDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeletedPromptDataAttributes llmObsDeletedPromptDataAttributes = + (LLMObsDeletedPromptDataAttributes) o; + return Objects.equals(this.deletedAt, llmObsDeletedPromptDataAttributes.deletedAt) + && Objects.equals(this.promptId, llmObsDeletedPromptDataAttributes.promptId) + && Objects.equals( + this.additionalProperties, llmObsDeletedPromptDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(deletedAt, promptId, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeletedPromptDataAttributes {\n"); + sb.append(" deletedAt: ").append(toIndentedString(deletedAt)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptResponse.java new file mode 100644 index 00000000000..a2b48ca197c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsDeletedPromptResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response confirming that an LLM Observability prompt was deleted. */ +@JsonPropertyOrder({LLMObsDeletedPromptResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsDeletedPromptResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsDeletedPromptData data; + + public LLMObsDeletedPromptResponse() {} + + @JsonCreator + public LLMObsDeletedPromptResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LLMObsDeletedPromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsDeletedPromptResponse data(LLMObsDeletedPromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object confirming that an LLM Observability prompt was deleted. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsDeletedPromptData getData() { + return data; + } + + public void setData(LLMObsDeletedPromptData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsDeletedPromptResponse + */ + @JsonAnySetter + public LLMObsDeletedPromptResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsDeletedPromptResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsDeletedPromptResponse llmObsDeletedPromptResponse = (LLMObsDeletedPromptResponse) o; + return Objects.equals(this.data, llmObsDeletedPromptResponse.data) + && Objects.equals( + this.additionalProperties, llmObsDeletedPromptResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsDeletedPromptResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatMessage.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatMessage.java new file mode 100644 index 00000000000..65e255fe622 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatMessage.java @@ -0,0 +1,174 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A single chat message in a prompt template. */ +@JsonPropertyOrder({ + LLMObsPromptChatMessage.JSON_PROPERTY_CONTENT, + LLMObsPromptChatMessage.JSON_PROPERTY_ROLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptChatMessage { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CONTENT = "content"; + private String content; + + public static final String JSON_PROPERTY_ROLE = "role"; + private String role; + + public LLMObsPromptChatMessage() {} + + @JsonCreator + public LLMObsPromptChatMessage( + @JsonProperty(required = true, value = JSON_PROPERTY_CONTENT) String content, + @JsonProperty(required = true, value = JSON_PROPERTY_ROLE) String role) { + this.content = content; + this.role = role; + } + + public LLMObsPromptChatMessage content(String content) { + this.content = content; + return this; + } + + /** + * Content of the message. + * + * @return content + */ + @JsonProperty(JSON_PROPERTY_CONTENT) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public LLMObsPromptChatMessage role(String role) { + this.role = role; + return this; + } + + /** + * Role of the message (for example system, user, or assistant + * ). + * + * @return role + */ + @JsonProperty(JSON_PROPERTY_ROLE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptChatMessage + */ + @JsonAnySetter + public LLMObsPromptChatMessage putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptChatMessage object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptChatMessage llmObsPromptChatMessage = (LLMObsPromptChatMessage) o; + return Objects.equals(this.content, llmObsPromptChatMessage.content) + && Objects.equals(this.role, llmObsPromptChatMessage.role) + && Objects.equals(this.additionalProperties, llmObsPromptChatMessage.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(content, role, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptChatMessage {\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" role: ").append(toIndentedString(role)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java new file mode 100644 index 00000000000..d8ee9040a93 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptChatTemplate.java @@ -0,0 +1,109 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A chat prompt template. */ +@JsonPropertyOrder({}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptChatTemplate extends ArrayList { + @JsonIgnore public boolean unparsed = false; + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptChatTemplate + */ + @JsonAnySetter + public LLMObsPromptChatTemplate putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptChatTemplate object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return super.equals(o); + } + + @Override + public int hashCode() { + return Objects.hash(additionalProperties, super.hashCode()); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptChatTemplate {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java new file mode 100644 index 00000000000..ab3a6472d4d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for an LLM Observability prompt. */ +@JsonPropertyOrder({ + LLMObsPromptData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPromptData.JSON_PROPERTY_ID, + LLMObsPromptData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPromptDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptType type; + + public LLMObsPromptData() {} + + @JsonCreator + public LLMObsPromptData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPromptDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPromptData attributes(LLMObsPromptDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of an LLM Observability prompt registry entry. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPromptDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsPromptData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the prompt. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPromptData type(LLMObsPromptType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptType getType() { + return type; + } + + public void setType(LLMObsPromptType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptData + */ + @JsonAnySetter + public LLMObsPromptData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptData llmObsPromptData = (LLMObsPromptData) o; + return Objects.equals(this.attributes, llmObsPromptData.attributes) + && Objects.equals(this.id, llmObsPromptData.id) + && Objects.equals(this.type, llmObsPromptData.type) + && Objects.equals(this.additionalProperties, llmObsPromptData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java new file mode 100644 index 00000000000..6579d3a55af --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataAttributes.java @@ -0,0 +1,620 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of an LLM Observability prompt registry entry. */ +@JsonPropertyOrder({ + LLMObsPromptDataAttributes.JSON_PROPERTY_AUTHOR, + LLMObsPromptDataAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPromptDataAttributes.JSON_PROPERTY_CREATED_FROM, + LLMObsPromptDataAttributes.JSON_PROPERTY_DATASETS, + LLMObsPromptDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsPromptDataAttributes.JSON_PROPERTY_EXTRACTED_FROM, + LLMObsPromptDataAttributes.JSON_PROPERTY_IN_REGISTRY, + LLMObsPromptDataAttributes.JSON_PROPERTY_LAST_SEEN_AT, + LLMObsPromptDataAttributes.JSON_PROPERTY_LAST_VERSION_CREATED_AT, + LLMObsPromptDataAttributes.JSON_PROPERTY_ML_APP, + LLMObsPromptDataAttributes.JSON_PROPERTY_ML_APPS, + LLMObsPromptDataAttributes.JSON_PROPERTY_NUM_VERSIONS, + LLMObsPromptDataAttributes.JSON_PROPERTY_PROMPT_ID, + LLMObsPromptDataAttributes.JSON_PROPERTY_SOURCE, + LLMObsPromptDataAttributes.JSON_PROPERTY_TAGS, + LLMObsPromptDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHOR = "author"; + private String author; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_CREATED_FROM = "created_from"; + private String createdFrom; + + public static final String JSON_PROPERTY_DATASETS = "datasets"; + private List datasets = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_EXTRACTED_FROM = "extracted_from"; + private String extractedFrom; + + public static final String JSON_PROPERTY_IN_REGISTRY = "in_registry"; + private Boolean inRegistry; + + public static final String JSON_PROPERTY_LAST_SEEN_AT = "last_seen_at"; + private OffsetDateTime lastSeenAt; + + public static final String JSON_PROPERTY_LAST_VERSION_CREATED_AT = "last_version_created_at"; + private OffsetDateTime lastVersionCreatedAt; + + public static final String JSON_PROPERTY_ML_APP = "ml_app"; + private String mlApp; + + public static final String JSON_PROPERTY_ML_APPS = "ml_apps"; + private List mlApps = null; + + public static final String JSON_PROPERTY_NUM_VERSIONS = "num_versions"; + private Long numVersions; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private String promptId; + + public static final String JSON_PROPERTY_SOURCE = "source"; + private LLMObsPromptResponseSource source; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public LLMObsPromptDataAttributes() {} + + @JsonCreator + public LLMObsPromptDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_CREATED_FROM) String createdFrom, + @JsonProperty(required = true, value = JSON_PROPERTY_IN_REGISTRY) Boolean inRegistry, + @JsonProperty(required = true, value = JSON_PROPERTY_NUM_VERSIONS) Long numVersions, + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_ID) String promptId, + @JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) + LLMObsPromptResponseSource source) { + this.createdFrom = createdFrom; + this.inRegistry = inRegistry; + this.numVersions = numVersions; + this.promptId = promptId; + this.source = source; + this.unparsed |= !source.isValid(); + } + + public LLMObsPromptDataAttributes author(String author) { + this.author = author; + return this; + } + + /** + * UUID of the user who authored the prompt. + * + * @return author + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public LLMObsPromptDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp when the prompt was created. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPromptDataAttributes createdFrom(String createdFrom) { + this.createdFrom = createdFrom; + return this; + } + + /** + * Source that created the prompt, such as ui-registry, sdk-registry, or + * sdk-instrumentation. + * + * @return createdFrom + */ + @JsonProperty(JSON_PROPERTY_CREATED_FROM) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getCreatedFrom() { + return createdFrom; + } + + public void setCreatedFrom(String createdFrom) { + this.createdFrom = createdFrom; + } + + public LLMObsPromptDataAttributes datasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public LLMObsPromptDataAttributes addDatasetsItem(LLMObsPromptDataset datasetsItem) { + if (this.datasets == null) { + this.datasets = new ArrayList<>(); + } + this.datasets.add(datasetsItem); + this.unparsed |= datasetsItem.unparsed; + return this; + } + + /** + * Datasets observed in runs associated with this prompt. + * + * @return datasets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasets() { + return datasets; + } + + public void setDatasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + } + + public LLMObsPromptDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Description of the prompt. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsPromptDataAttributes extractedFrom(String extractedFrom) { + this.extractedFrom = extractedFrom; + return this; + } + + /** + * Source prompt from which this prompt was extracted, when applicable. + * + * @return extractedFrom + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_EXTRACTED_FROM) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getExtractedFrom() { + return extractedFrom; + } + + public void setExtractedFrom(String extractedFrom) { + this.extractedFrom = extractedFrom; + } + + public LLMObsPromptDataAttributes inRegistry(Boolean inRegistry) { + this.inRegistry = inRegistry; + return this; + } + + /** + * Whether the prompt is a registry entry (as opposed to a code-discovered prompt). + * + * @return inRegistry + */ + @JsonProperty(JSON_PROPERTY_IN_REGISTRY) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Boolean getInRegistry() { + return inRegistry; + } + + public void setInRegistry(Boolean inRegistry) { + this.inRegistry = inRegistry; + } + + public LLMObsPromptDataAttributes lastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + return this; + } + + /** + * Timestamp of the most recent observed run of this prompt. + * + * @return lastSeenAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastSeenAt() { + return lastSeenAt; + } + + public void setLastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + } + + public LLMObsPromptDataAttributes lastVersionCreatedAt(OffsetDateTime lastVersionCreatedAt) { + this.lastVersionCreatedAt = lastVersionCreatedAt; + return this; + } + + /** + * Timestamp when the most recent version of the prompt was created. + * + * @return lastVersionCreatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_VERSION_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastVersionCreatedAt() { + return lastVersionCreatedAt; + } + + public void setLastVersionCreatedAt(OffsetDateTime lastVersionCreatedAt) { + this.lastVersionCreatedAt = lastVersionCreatedAt; + } + + public LLMObsPromptDataAttributes mlApp(String mlApp) { + this.mlApp = mlApp; + return this; + } + + /** + * The ML application this prompt is associated with. + * + * @return mlApp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMlApp() { + return mlApp; + } + + public void setMlApp(String mlApp) { + this.mlApp = mlApp; + } + + public LLMObsPromptDataAttributes mlApps(List mlApps) { + this.mlApps = mlApps; + return this; + } + + public LLMObsPromptDataAttributes addMlAppsItem(String mlAppsItem) { + if (this.mlApps == null) { + this.mlApps = new ArrayList<>(); + } + this.mlApps.add(mlAppsItem); + return this; + } + + /** + * ML applications observed running this prompt. + * + * @return mlApps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMlApps() { + return mlApps; + } + + public void setMlApps(List mlApps) { + this.mlApps = mlApps; + } + + public LLMObsPromptDataAttributes numVersions(Long numVersions) { + this.numVersions = numVersions; + return this; + } + + /** + * Number of versions of the prompt. + * + * @return numVersions + */ + @JsonProperty(JSON_PROPERTY_NUM_VERSIONS) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getNumVersions() { + return numVersions; + } + + public void setNumVersions(Long numVersions) { + this.numVersions = numVersions; + } + + public LLMObsPromptDataAttributes promptId(String promptId) { + this.promptId = promptId; + return this; + } + + /** + * Customer-provided identifier of the prompt. + * + * @return promptId + */ + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptId() { + return promptId; + } + + public void setPromptId(String promptId) { + this.promptId = promptId; + } + + public LLMObsPromptDataAttributes source(LLMObsPromptResponseSource source) { + this.source = source; + this.unparsed |= !source.isValid(); + return this; + } + + /** + * Whether the prompt was created from the registry or discovered from observed LLM calls. + * + * @return source + */ + @JsonProperty(JSON_PROPERTY_SOURCE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptResponseSource getSource() { + return source; + } + + public void setSource(LLMObsPromptResponseSource source) { + if (!source.isValid()) { + this.unparsed = true; + } + this.source = source; + } + + public LLMObsPromptDataAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public LLMObsPromptDataAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags observed on runs of this prompt. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public LLMObsPromptDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Title of the prompt. + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptDataAttributes + */ + @JsonAnySetter + public LLMObsPromptDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptDataAttributes llmObsPromptDataAttributes = (LLMObsPromptDataAttributes) o; + return Objects.equals(this.author, llmObsPromptDataAttributes.author) + && Objects.equals(this.createdAt, llmObsPromptDataAttributes.createdAt) + && Objects.equals(this.createdFrom, llmObsPromptDataAttributes.createdFrom) + && Objects.equals(this.datasets, llmObsPromptDataAttributes.datasets) + && Objects.equals(this.description, llmObsPromptDataAttributes.description) + && Objects.equals(this.extractedFrom, llmObsPromptDataAttributes.extractedFrom) + && Objects.equals(this.inRegistry, llmObsPromptDataAttributes.inRegistry) + && Objects.equals(this.lastSeenAt, llmObsPromptDataAttributes.lastSeenAt) + && Objects.equals( + this.lastVersionCreatedAt, llmObsPromptDataAttributes.lastVersionCreatedAt) + && Objects.equals(this.mlApp, llmObsPromptDataAttributes.mlApp) + && Objects.equals(this.mlApps, llmObsPromptDataAttributes.mlApps) + && Objects.equals(this.numVersions, llmObsPromptDataAttributes.numVersions) + && Objects.equals(this.promptId, llmObsPromptDataAttributes.promptId) + && Objects.equals(this.source, llmObsPromptDataAttributes.source) + && Objects.equals(this.tags, llmObsPromptDataAttributes.tags) + && Objects.equals(this.title, llmObsPromptDataAttributes.title) + && Objects.equals( + this.additionalProperties, llmObsPromptDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + author, + createdAt, + createdFrom, + datasets, + description, + extractedFrom, + inRegistry, + lastSeenAt, + lastVersionCreatedAt, + mlApp, + mlApps, + numVersions, + promptId, + source, + tags, + title, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptDataAttributes {\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" createdFrom: ").append(toIndentedString(createdFrom)).append("\n"); + sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" extractedFrom: ").append(toIndentedString(extractedFrom)).append("\n"); + sb.append(" inRegistry: ").append(toIndentedString(inRegistry)).append("\n"); + sb.append(" lastSeenAt: ").append(toIndentedString(lastSeenAt)).append("\n"); + sb.append(" lastVersionCreatedAt: ") + .append(toIndentedString(lastVersionCreatedAt)) + .append("\n"); + sb.append(" mlApp: ").append(toIndentedString(mlApp)).append("\n"); + sb.append(" mlApps: ").append(toIndentedString(mlApps)).append("\n"); + sb.append(" numVersions: ").append(toIndentedString(numVersions)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataset.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataset.java new file mode 100644 index 00000000000..ba890af6451 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptDataset.java @@ -0,0 +1,168 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** A dataset observed in runs associated with a prompt or prompt version. */ +@JsonPropertyOrder({LLMObsPromptDataset.JSON_PROPERTY_ID, LLMObsPromptDataset.JSON_PROPERTY_NAME}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptDataset { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public LLMObsPromptDataset() {} + + @JsonCreator + public LLMObsPromptDataset(@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) { + this.id = id; + } + + public LLMObsPromptDataset id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the dataset. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPromptDataset name(String name) { + this.name = name; + return this; + } + + /** + * Name of the dataset. + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptDataset + */ + @JsonAnySetter + public LLMObsPromptDataset putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptDataset object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptDataset llmObsPromptDataset = (LLMObsPromptDataset) o; + return Objects.equals(this.id, llmObsPromptDataset.id) + && Objects.equals(this.name, llmObsPromptDataset.name) + && Objects.equals(this.additionalProperties, llmObsPromptDataset.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptDataset {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponse.java new file mode 100644 index 00000000000..00942a75d2c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a single LLM Observability prompt. */ +@JsonPropertyOrder({LLMObsPromptResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPromptData data; + + public LLMObsPromptResponse() {} + + @JsonCreator + public LLMObsPromptResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LLMObsPromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPromptResponse data(LLMObsPromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for an LLM Observability prompt. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptData getData() { + return data; + } + + public void setData(LLMObsPromptData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptResponse + */ + @JsonAnySetter + public LLMObsPromptResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptResponse llmObsPromptResponse = (LLMObsPromptResponse) o; + return Objects.equals(this.data, llmObsPromptResponse.data) + && Objects.equals(this.additionalProperties, llmObsPromptResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponseSource.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponseSource.java new file mode 100644 index 00000000000..c9d20d4736d --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptResponseSource.java @@ -0,0 +1,58 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Whether the prompt was created from the registry or discovered from observed LLM calls. */ +@JsonSerialize(using = LLMObsPromptResponseSource.LLMObsPromptResponseSourceSerializer.class) +public class LLMObsPromptResponseSource extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("registry", "code")); + + public static final LLMObsPromptResponseSource REGISTRY = + new LLMObsPromptResponseSource("registry"); + public static final LLMObsPromptResponseSource CODE = new LLMObsPromptResponseSource("code"); + + LLMObsPromptResponseSource(String value) { + super(value, allowedValues); + } + + public static class LLMObsPromptResponseSourceSerializer + extends StdSerializer { + public LLMObsPromptResponseSourceSerializer(Class t) { + super(t); + } + + public LLMObsPromptResponseSourceSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPromptResponseSource value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPromptResponseSource fromValue(String value) { + return new LLMObsPromptResponseSource(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java new file mode 100644 index 00000000000..f5c6e00a5a2 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for a flattened LLM Observability prompt version returned for SDK consumption. */ +@JsonPropertyOrder({ + LLMObsPromptSDKData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPromptSDKData.JSON_PROPERTY_ID, + LLMObsPromptSDKData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptSDKData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPromptSDKDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptType type; + + public LLMObsPromptSDKData() {} + + @JsonCreator + public LLMObsPromptSDKData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPromptSDKDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPromptSDKData attributes(LLMObsPromptSDKDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a flattened prompt version returned for SDK consumption. Exactly one of + * template and chat_template is returned. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptSDKDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPromptSDKDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsPromptSDKData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the prompt. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPromptSDKData type(LLMObsPromptType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptType getType() { + return type; + } + + public void setType(LLMObsPromptType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptSDKData + */ + @JsonAnySetter + public LLMObsPromptSDKData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptSDKData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptSDKData llmObsPromptSdkData = (LLMObsPromptSDKData) o; + return Objects.equals(this.attributes, llmObsPromptSdkData.attributes) + && Objects.equals(this.id, llmObsPromptSdkData.id) + && Objects.equals(this.type, llmObsPromptSdkData.type) + && Objects.equals(this.additionalProperties, llmObsPromptSdkData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptSDKData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java new file mode 100644 index 00000000000..d71b6c2db1c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKDataAttributes.java @@ -0,0 +1,312 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Attributes of a flattened prompt version returned for SDK consumption. Exactly one of + * template and chat_template is returned. + */ +@JsonPropertyOrder({ + LLMObsPromptSDKDataAttributes.JSON_PROPERTY_CHAT_TEMPLATE, + LLMObsPromptSDKDataAttributes.JSON_PROPERTY_LABELS, + LLMObsPromptSDKDataAttributes.JSON_PROPERTY_PROMPT_ID, + LLMObsPromptSDKDataAttributes.JSON_PROPERTY_PROMPT_VERSION_UUID, + LLMObsPromptSDKDataAttributes.JSON_PROPERTY_TEMPLATE, + LLMObsPromptSDKDataAttributes.JSON_PROPERTY_VERSION +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptSDKDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_CHAT_TEMPLATE = "chat_template"; + private List chatTemplate = null; + + public static final String JSON_PROPERTY_LABELS = "labels"; + private List labels = null; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private String promptId; + + public static final String JSON_PROPERTY_PROMPT_VERSION_UUID = "prompt_version_uuid"; + private String promptVersionUuid; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private String template; + + public static final String JSON_PROPERTY_VERSION = "version"; + private String version; + + public LLMObsPromptSDKDataAttributes chatTemplate(List chatTemplate) { + this.chatTemplate = chatTemplate; + if (chatTemplate != null) { + for (LLMObsPromptChatMessage item : chatTemplate) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public LLMObsPromptSDKDataAttributes addChatTemplateItem( + LLMObsPromptChatMessage chatTemplateItem) { + if (this.chatTemplate == null) { + this.chatTemplate = new ArrayList<>(); + } + this.chatTemplate.add(chatTemplateItem); + this.unparsed |= chatTemplateItem.unparsed; + return this; + } + + /** + * Chat template for this prompt version, as a list of role and content messages. Omitted for text + * templates. + * + * @return chatTemplate + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CHAT_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getChatTemplate() { + return chatTemplate; + } + + public void setChatTemplate(List chatTemplate) { + this.chatTemplate = chatTemplate; + if (chatTemplate != null) { + for (LLMObsPromptChatMessage item : chatTemplate) { + this.unparsed |= item.unparsed; + } + } + } + + public LLMObsPromptSDKDataAttributes labels(List labels) { + this.labels = labels; + return this; + } + + public LLMObsPromptSDKDataAttributes addLabelsItem(String labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Labels attached to the selected version. + * + * @return labels + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + @Deprecated + public void setLabels(List labels) { + this.labels = labels; + } + + public LLMObsPromptSDKDataAttributes promptId(String promptId) { + this.promptId = promptId; + return this; + } + + /** + * Customer-provided identifier of the prompt. + * + * @return promptId + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPromptId() { + return promptId; + } + + public void setPromptId(String promptId) { + this.promptId = promptId; + } + + public LLMObsPromptSDKDataAttributes promptVersionUuid(String promptVersionUuid) { + this.promptVersionUuid = promptVersionUuid; + return this; + } + + /** + * Unique identifier of this prompt version. + * + * @return promptVersionUuid + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROMPT_VERSION_UUID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getPromptVersionUuid() { + return promptVersionUuid; + } + + public void setPromptVersionUuid(String promptVersionUuid) { + this.promptVersionUuid = promptVersionUuid; + } + + public LLMObsPromptSDKDataAttributes template(String template) { + this.template = template; + return this; + } + + /** + * Text template for this prompt version. Omitted for chat templates. + * + * @return template + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTemplate() { + return template; + } + + public void setTemplate(String template) { + this.template = template; + } + + public LLMObsPromptSDKDataAttributes version(String version) { + this.version = version; + return this; + } + + /** + * 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. + * + * @return version + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptSDKDataAttributes + */ + @JsonAnySetter + public LLMObsPromptSDKDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptSDKDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptSDKDataAttributes llmObsPromptSdkDataAttributes = (LLMObsPromptSDKDataAttributes) o; + return Objects.equals(this.chatTemplate, llmObsPromptSdkDataAttributes.chatTemplate) + && Objects.equals(this.labels, llmObsPromptSdkDataAttributes.labels) + && Objects.equals(this.promptId, llmObsPromptSdkDataAttributes.promptId) + && Objects.equals(this.promptVersionUuid, llmObsPromptSdkDataAttributes.promptVersionUuid) + && Objects.equals(this.template, llmObsPromptSdkDataAttributes.template) + && Objects.equals(this.version, llmObsPromptSdkDataAttributes.version) + && Objects.equals( + this.additionalProperties, llmObsPromptSdkDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + chatTemplate, labels, promptId, promptVersionUuid, template, version, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptSDKDataAttributes {\n"); + sb.append(" chatTemplate: ").append(toIndentedString(chatTemplate)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" promptVersionUuid: ").append(toIndentedString(promptVersionUuid)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKResponse.java new file mode 100644 index 00000000000..9ed12b72be5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptSDKResponse.java @@ -0,0 +1,148 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a flattened LLM Observability prompt version for SDK consumption. */ +@JsonPropertyOrder({LLMObsPromptSDKResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptSDKResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPromptSDKData data; + + public LLMObsPromptSDKResponse() {} + + @JsonCreator + public LLMObsPromptSDKResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LLMObsPromptSDKData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPromptSDKResponse data(LLMObsPromptSDKData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a flattened LLM Observability prompt version returned for SDK consumption. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptSDKData getData() { + return data; + } + + public void setData(LLMObsPromptSDKData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptSDKResponse + */ + @JsonAnySetter + public LLMObsPromptSDKResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptSDKResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptSDKResponse llmObsPromptSdkResponse = (LLMObsPromptSDKResponse) o; + return Objects.equals(this.data, llmObsPromptSdkResponse.data) + && Objects.equals(this.additionalProperties, llmObsPromptSdkResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptSDKResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptTemplate.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptTemplate.java new file mode 100644 index 00000000000..0e56f225b62 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptTemplate.java @@ -0,0 +1,279 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.AbstractOpenApiSchema; +import com.datadog.api.client.JSON; +import com.datadog.api.client.UnparsedObject; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.core.JsonToken; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.MapperFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import jakarta.ws.rs.core.GenericType; +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +@JsonDeserialize(using = LLMObsPromptTemplate.LLMObsPromptTemplateDeserializer.class) +@JsonSerialize(using = LLMObsPromptTemplate.LLMObsPromptTemplateSerializer.class) +public class LLMObsPromptTemplate extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(LLMObsPromptTemplate.class.getName()); + + @JsonIgnore public boolean unparsed = false; + + public static class LLMObsPromptTemplateSerializer extends StdSerializer { + public LLMObsPromptTemplateSerializer(Class t) { + super(t); + } + + public LLMObsPromptTemplateSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPromptTemplate value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.getActualInstance()); + } + } + + public static class LLMObsPromptTemplateDeserializer + extends StdDeserializer { + public LLMObsPromptTemplateDeserializer() { + this(LLMObsPromptTemplate.class); + } + + public LLMObsPromptTemplateDeserializer(Class vc) { + super(vc); + } + + @Override + public LLMObsPromptTemplate deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException, JsonProcessingException { + JsonNode tree = jp.readValueAsTree(); + Object deserialized = null; + Object tmp = null; + boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS); + int match = 0; + Object deserializedUnparsed = null; + int matchUnparsed = 0; + JsonToken token = tree.traverse(jp.getCodec()).nextToken(); + // deserialize String + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (String.class.equals(Integer.class) + || String.class.equals(Long.class) + || String.class.equals(Float.class) + || String.class.equals(Double.class) + || String.class.equals(Boolean.class) + || String.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((String.class.equals(Integer.class) || String.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((String.class.equals(Float.class) || String.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (String.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (String.class.equals(String.class) && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(String.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + deserialized = tmp; + match++; + + log.log(Level.FINER, "Input data matches schema 'String'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'String'", e); + } + + // deserialize LLMObsPromptChatTemplate + try { + boolean attemptParsing = true; + // ensure that we respect type coercion as set on the client ObjectMapper + if (LLMObsPromptChatTemplate.class.equals(Integer.class) + || LLMObsPromptChatTemplate.class.equals(Long.class) + || LLMObsPromptChatTemplate.class.equals(Float.class) + || LLMObsPromptChatTemplate.class.equals(Double.class) + || LLMObsPromptChatTemplate.class.equals(Boolean.class) + || LLMObsPromptChatTemplate.class.equals(String.class)) { + attemptParsing = typeCoercion; + if (!attemptParsing) { + attemptParsing |= + ((LLMObsPromptChatTemplate.class.equals(Integer.class) + || LLMObsPromptChatTemplate.class.equals(Long.class)) + && token == JsonToken.VALUE_NUMBER_INT); + attemptParsing |= + ((LLMObsPromptChatTemplate.class.equals(Float.class) + || LLMObsPromptChatTemplate.class.equals(Double.class)) + && (token == JsonToken.VALUE_NUMBER_FLOAT + || token == JsonToken.VALUE_NUMBER_INT)); + attemptParsing |= + (LLMObsPromptChatTemplate.class.equals(Boolean.class) + && (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE)); + attemptParsing |= + (LLMObsPromptChatTemplate.class.equals(String.class) + && token == JsonToken.VALUE_STRING); + } + } + if (attemptParsing) { + tmp = tree.traverse(jp.getCodec()).readValueAs(LLMObsPromptChatTemplate.class); + // TODO: there is no validation against JSON schema constraints + // (min, max, enum, pattern...), this does not perform a strict JSON + // validation, which means the 'match' count may be higher than it should be. + if (!((LLMObsPromptChatTemplate) tmp).unparsed) { + deserialized = tmp; + match++; + } + log.log(Level.FINER, "Input data matches schema 'LLMObsPromptChatTemplate'"); + } + } catch (Exception e) { + // deserialization failed, continue + log.log(Level.FINER, "Input data does not match schema 'LLMObsPromptChatTemplate'", e); + } + + LLMObsPromptTemplate ret = new LLMObsPromptTemplate(); + if (match == 1) { + ret.setActualInstance(deserialized); + } else if (match == 0 && matchUnparsed == 1) { + ret.setActualInstance(deserializedUnparsed); + ret.unparsed = true; + } else { + Map res = + new ObjectMapper() + .readValue( + tree.traverse(jp.getCodec()).readValueAsTree().toString(), + new TypeReference>() {}); + ret.setActualInstance(new UnparsedObject(res)); + } + return ret; + } + + /** Handle deserialization of the 'null' value. */ + @Override + public LLMObsPromptTemplate getNullValue(DeserializationContext ctxt) + throws JsonMappingException { + throw new JsonMappingException(ctxt.getParser(), "LLMObsPromptTemplate cannot be null"); + } + } + + // store a list of schema names defined in oneOf + public static final Map schemas = new HashMap(); + + public LLMObsPromptTemplate() { + super("oneOf", Boolean.FALSE); + } + + public LLMObsPromptTemplate(String o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + public LLMObsPromptTemplate(LLMObsPromptChatTemplate o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("String", new GenericType() {}); + schemas.put("LLMObsPromptChatTemplate", new GenericType() {}); + JSON.registerDescendants(LLMObsPromptTemplate.class, Collections.unmodifiableMap(schemas)); + } + + @Override + public Map getSchemas() { + return LLMObsPromptTemplate.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: String, LLMObsPromptChatTemplate + * + *

It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a + * composed schema (allOf, anyOf, oneOf). + */ + @Override + public void setActualInstance(Object instance) { + if (JSON.isInstanceOf(String.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + if (JSON.isInstanceOf(LLMObsPromptChatTemplate.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + + if (JSON.isInstanceOf(UnparsedObject.class, instance, new HashSet>())) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException("Invalid instance type. Must be String, LLMObsPromptChatTemplate"); + } + + /** + * Get the actual instance, which can be the following: String, LLMObsPromptChatTemplate + * + * @return The actual instance (String, LLMObsPromptChatTemplate) + */ + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `String`. If the actual instance is not `String`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `String` + * @throws ClassCastException if the instance is not `String` + */ + public String getString() throws ClassCastException { + return (String) super.getActualInstance(); + } + + /** + * Get the actual instance of `LLMObsPromptChatTemplate`. If the actual instance is not + * `LLMObsPromptChatTemplate`, the ClassCastException will be thrown. + * + * @return The actual instance of `LLMObsPromptChatTemplate` + * @throws ClassCastException if the instance is not `LLMObsPromptChatTemplate` + */ + public LLMObsPromptChatTemplate getLLMObsPromptChatTemplate() throws ClassCastException { + return (LLMObsPromptChatTemplate) super.getActualInstance(); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptType.java new file mode 100644 index 00000000000..407d8bfbd33 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptType.java @@ -0,0 +1,54 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability prompt. */ +@JsonSerialize(using = LLMObsPromptType.LLMObsPromptTypeSerializer.class) +public class LLMObsPromptType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("prompt-templates")); + + public static final LLMObsPromptType PROMPT_TEMPLATES = new LLMObsPromptType("prompt-templates"); + + LLMObsPromptType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPromptTypeSerializer extends StdSerializer { + public LLMObsPromptTypeSerializer(Class t) { + super(t); + } + + public LLMObsPromptTypeSerializer() { + this(null); + } + + @Override + public void serialize(LLMObsPromptType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPromptType fromValue(String value) { + return new LLMObsPromptType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java new file mode 100644 index 00000000000..eb0721e393c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionData.java @@ -0,0 +1,212 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for a specific version of an LLM Observability prompt. */ +@JsonPropertyOrder({ + LLMObsPromptVersionData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPromptVersionData.JSON_PROPERTY_ID, + LLMObsPromptVersionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptVersionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPromptVersionDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptVersionType type; + + public LLMObsPromptVersionData() {} + + @JsonCreator + public LLMObsPromptVersionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPromptVersionDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptVersionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPromptVersionData attributes(LLMObsPromptVersionDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a specific version of an LLM Observability prompt. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptVersionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPromptVersionDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsPromptVersionData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the prompt version. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPromptVersionData type(LLMObsPromptVersionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt version. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptVersionType getType() { + return type; + } + + public void setType(LLMObsPromptVersionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptVersionData + */ + @JsonAnySetter + public LLMObsPromptVersionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptVersionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptVersionData llmObsPromptVersionData = (LLMObsPromptVersionData) o; + return Objects.equals(this.attributes, llmObsPromptVersionData.attributes) + && Objects.equals(this.id, llmObsPromptVersionData.id) + && Objects.equals(this.type, llmObsPromptVersionData.type) + && Objects.equals(this.additionalProperties, llmObsPromptVersionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptVersionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java new file mode 100644 index 00000000000..d98812d2800 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionDataAttributes.java @@ -0,0 +1,599 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a specific version of an LLM Observability prompt. */ +@JsonPropertyOrder({ + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_AUTHOR, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_DATASETS, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_LABELS, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_LAST_SEEN_AT, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_ML_APP, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_ML_APPS, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_PROMPT_ID, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_PROMPT_UUID, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_TAGS, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_TEMPLATE, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_USER_VERSION, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_VERSION, + LLMObsPromptVersionDataAttributes.JSON_PROPERTY_VERSION_CREATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptVersionDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHOR = "author"; + private String author; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DATASETS = "datasets"; + private List datasets = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_LABELS = "labels"; + private List labels = null; + + public static final String JSON_PROPERTY_LAST_SEEN_AT = "last_seen_at"; + private OffsetDateTime lastSeenAt; + + public static final String JSON_PROPERTY_ML_APP = "ml_app"; + private String mlApp; + + public static final String JSON_PROPERTY_ML_APPS = "ml_apps"; + private List mlApps = null; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private String promptId; + + public static final String JSON_PROPERTY_PROMPT_UUID = "prompt_uuid"; + private String promptUuid; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_TEMPLATE = "template"; + private LLMObsPromptTemplate template; + + public static final String JSON_PROPERTY_USER_VERSION = "user_version"; + private String userVersion; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public static final String JSON_PROPERTY_VERSION_CREATED_AT = "version_created_at"; + private OffsetDateTime versionCreatedAt; + + public LLMObsPromptVersionDataAttributes() {} + + @JsonCreator + public LLMObsPromptVersionDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_ID) String promptId, + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_UUID) String promptUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_TEMPLATE) LLMObsPromptTemplate template, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.promptId = promptId; + this.promptUuid = promptUuid; + this.template = template; + this.unparsed |= template.unparsed; + this.version = version; + } + + public LLMObsPromptVersionDataAttributes author(String author) { + this.author = author; + return this; + } + + /** + * UUID of the user who authored this version. + * + * @return author + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public LLMObsPromptVersionDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp stored on this prompt version. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPromptVersionDataAttributes datasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public LLMObsPromptVersionDataAttributes addDatasetsItem(LLMObsPromptDataset datasetsItem) { + if (this.datasets == null) { + this.datasets = new ArrayList<>(); + } + this.datasets.add(datasetsItem); + this.unparsed |= datasetsItem.unparsed; + return this; + } + + /** + * Datasets observed in runs associated with this prompt version. + * + * @return datasets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasets() { + return datasets; + } + + public void setDatasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + } + + public LLMObsPromptVersionDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Description of this version. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsPromptVersionDataAttributes labels(List labels) { + this.labels = labels; + return this; + } + + public LLMObsPromptVersionDataAttributes addLabelsItem(String labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Labels attached to this version (for example development, staging, + * production). + * + * @return labels + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + @Deprecated + public void setLabels(List labels) { + this.labels = labels; + } + + public LLMObsPromptVersionDataAttributes lastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + return this; + } + + /** + * Timestamp of the most recent observed run of this prompt version. + * + * @return lastSeenAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastSeenAt() { + return lastSeenAt; + } + + public void setLastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + } + + public LLMObsPromptVersionDataAttributes mlApp(String mlApp) { + this.mlApp = mlApp; + return this; + } + + /** + * The ML application this prompt is associated with. + * + * @return mlApp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMlApp() { + return mlApp; + } + + public void setMlApp(String mlApp) { + this.mlApp = mlApp; + } + + public LLMObsPromptVersionDataAttributes mlApps(List mlApps) { + this.mlApps = mlApps; + return this; + } + + public LLMObsPromptVersionDataAttributes addMlAppsItem(String mlAppsItem) { + if (this.mlApps == null) { + this.mlApps = new ArrayList<>(); + } + this.mlApps.add(mlAppsItem); + return this; + } + + /** + * ML applications observed running this prompt version. + * + * @return mlApps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMlApps() { + return mlApps; + } + + public void setMlApps(List mlApps) { + this.mlApps = mlApps; + } + + public LLMObsPromptVersionDataAttributes promptId(String promptId) { + this.promptId = promptId; + return this; + } + + /** + * Customer-provided identifier of the parent prompt. + * + * @return promptId + */ + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptId() { + return promptId; + } + + public void setPromptId(String promptId) { + this.promptId = promptId; + } + + public LLMObsPromptVersionDataAttributes promptUuid(String promptUuid) { + this.promptUuid = promptUuid; + return this; + } + + /** + * Unique identifier of the parent prompt. + * + * @return promptUuid + */ + @JsonProperty(JSON_PROPERTY_PROMPT_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptUuid() { + return promptUuid; + } + + public void setPromptUuid(String promptUuid) { + this.promptUuid = promptUuid; + } + + public LLMObsPromptVersionDataAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public LLMObsPromptVersionDataAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags observed on runs of this prompt version. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public LLMObsPromptVersionDataAttributes template(LLMObsPromptTemplate template) { + this.template = template; + this.unparsed |= template.unparsed; + return this; + } + + /** + * A text template or a list of chat messages. + * + * @return template + */ + @JsonProperty(JSON_PROPERTY_TEMPLATE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptTemplate getTemplate() { + return template; + } + + public void setTemplate(LLMObsPromptTemplate template) { + this.template = template; + if (template != null) { + this.unparsed |= template.unparsed; + } + } + + public LLMObsPromptVersionDataAttributes userVersion(String userVersion) { + this.userVersion = userVersion; + return this; + } + + /** + * User-supplied identifier for this version. + * + * @return userVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserVersion() { + return userVersion; + } + + public void setUserVersion(String userVersion) { + this.userVersion = userVersion; + } + + public LLMObsPromptVersionDataAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * Sequential version number. minimum: 1 + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + public LLMObsPromptVersionDataAttributes versionCreatedAt(OffsetDateTime versionCreatedAt) { + this.versionCreatedAt = versionCreatedAt; + return this; + } + + /** + * Timestamp when this version was created. + * + * @return versionCreatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getVersionCreatedAt() { + return versionCreatedAt; + } + + public void setVersionCreatedAt(OffsetDateTime versionCreatedAt) { + this.versionCreatedAt = versionCreatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptVersionDataAttributes + */ + @JsonAnySetter + public LLMObsPromptVersionDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptVersionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptVersionDataAttributes llmObsPromptVersionDataAttributes = + (LLMObsPromptVersionDataAttributes) o; + return Objects.equals(this.author, llmObsPromptVersionDataAttributes.author) + && Objects.equals(this.createdAt, llmObsPromptVersionDataAttributes.createdAt) + && Objects.equals(this.datasets, llmObsPromptVersionDataAttributes.datasets) + && Objects.equals(this.description, llmObsPromptVersionDataAttributes.description) + && Objects.equals(this.labels, llmObsPromptVersionDataAttributes.labels) + && Objects.equals(this.lastSeenAt, llmObsPromptVersionDataAttributes.lastSeenAt) + && Objects.equals(this.mlApp, llmObsPromptVersionDataAttributes.mlApp) + && Objects.equals(this.mlApps, llmObsPromptVersionDataAttributes.mlApps) + && Objects.equals(this.promptId, llmObsPromptVersionDataAttributes.promptId) + && Objects.equals(this.promptUuid, llmObsPromptVersionDataAttributes.promptUuid) + && Objects.equals(this.tags, llmObsPromptVersionDataAttributes.tags) + && Objects.equals(this.template, llmObsPromptVersionDataAttributes.template) + && Objects.equals(this.userVersion, llmObsPromptVersionDataAttributes.userVersion) + && Objects.equals(this.version, llmObsPromptVersionDataAttributes.version) + && Objects.equals(this.versionCreatedAt, llmObsPromptVersionDataAttributes.versionCreatedAt) + && Objects.equals( + this.additionalProperties, llmObsPromptVersionDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + author, + createdAt, + datasets, + description, + labels, + lastSeenAt, + mlApp, + mlApps, + promptId, + promptUuid, + tags, + template, + userVersion, + version, + versionCreatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptVersionDataAttributes {\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" lastSeenAt: ").append(toIndentedString(lastSeenAt)).append("\n"); + sb.append(" mlApp: ").append(toIndentedString(mlApp)).append("\n"); + sb.append(" mlApps: ").append(toIndentedString(mlApps)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" promptUuid: ").append(toIndentedString(promptUuid)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" template: ").append(toIndentedString(template)).append("\n"); + sb.append(" userVersion: ").append(toIndentedString(userVersion)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" versionCreatedAt: ").append(toIndentedString(versionCreatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionLabel.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionLabel.java new file mode 100644 index 00000000000..e762befdc31 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionLabel.java @@ -0,0 +1,59 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** A label attached to an LLM Observability prompt version. */ +@JsonSerialize(using = LLMObsPromptVersionLabel.LLMObsPromptVersionLabelSerializer.class) +public class LLMObsPromptVersionLabel extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("production", "development")); + + public static final LLMObsPromptVersionLabel PRODUCTION = + new LLMObsPromptVersionLabel("production"); + public static final LLMObsPromptVersionLabel DEVELOPMENT = + new LLMObsPromptVersionLabel("development"); + + LLMObsPromptVersionLabel(String value) { + super(value, allowedValues); + } + + public static class LLMObsPromptVersionLabelSerializer + extends StdSerializer { + public LLMObsPromptVersionLabelSerializer(Class t) { + super(t); + } + + public LLMObsPromptVersionLabelSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPromptVersionLabel value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPromptVersionLabel fromValue(String value) { + return new LLMObsPromptVersionLabel(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListData.java new file mode 100644 index 00000000000..e829c7253ae --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListData.java @@ -0,0 +1,213 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for a prompt version returned in a list. */ +@JsonPropertyOrder({ + LLMObsPromptVersionListData.JSON_PROPERTY_ATTRIBUTES, + LLMObsPromptVersionListData.JSON_PROPERTY_ID, + LLMObsPromptVersionListData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptVersionListData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsPromptVersionListDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptVersionType type; + + public LLMObsPromptVersionListData() {} + + @JsonCreator + public LLMObsPromptVersionListData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsPromptVersionListDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptVersionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsPromptVersionListData attributes(LLMObsPromptVersionListDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes of a prompt version returned in a list, excluding its template. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptVersionListDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsPromptVersionListDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsPromptVersionListData id(String id) { + this.id = id; + return this; + } + + /** + * Unique identifier of the prompt version. + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public LLMObsPromptVersionListData type(LLMObsPromptVersionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt version. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptVersionType getType() { + return type; + } + + public void setType(LLMObsPromptVersionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptVersionListData + */ + @JsonAnySetter + public LLMObsPromptVersionListData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptVersionListData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptVersionListData llmObsPromptVersionListData = (LLMObsPromptVersionListData) o; + return Objects.equals(this.attributes, llmObsPromptVersionListData.attributes) + && Objects.equals(this.id, llmObsPromptVersionListData.id) + && Objects.equals(this.type, llmObsPromptVersionListData.type) + && Objects.equals( + this.additionalProperties, llmObsPromptVersionListData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptVersionListData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListDataAttributes.java new file mode 100644 index 00000000000..3308f93d103 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionListDataAttributes.java @@ -0,0 +1,566 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.time.OffsetDateTime; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Attributes of a prompt version returned in a list, excluding its template. */ +@JsonPropertyOrder({ + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_AUTHOR, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_CREATED_AT, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_DATASETS, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_LABELS, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_LAST_SEEN_AT, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_ML_APP, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_ML_APPS, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_PROMPT_ID, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_PROMPT_UUID, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_TAGS, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_USER_VERSION, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_VERSION, + LLMObsPromptVersionListDataAttributes.JSON_PROPERTY_VERSION_CREATED_AT +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptVersionListDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_AUTHOR = "author"; + private String author; + + public static final String JSON_PROPERTY_CREATED_AT = "created_at"; + private OffsetDateTime createdAt; + + public static final String JSON_PROPERTY_DATASETS = "datasets"; + private List datasets = null; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_LABELS = "labels"; + private List labels = null; + + public static final String JSON_PROPERTY_LAST_SEEN_AT = "last_seen_at"; + private OffsetDateTime lastSeenAt; + + public static final String JSON_PROPERTY_ML_APP = "ml_app"; + private String mlApp; + + public static final String JSON_PROPERTY_ML_APPS = "ml_apps"; + private List mlApps = null; + + public static final String JSON_PROPERTY_PROMPT_ID = "prompt_id"; + private String promptId; + + public static final String JSON_PROPERTY_PROMPT_UUID = "prompt_uuid"; + private String promptUuid; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public static final String JSON_PROPERTY_USER_VERSION = "user_version"; + private String userVersion; + + public static final String JSON_PROPERTY_VERSION = "version"; + private Long version; + + public static final String JSON_PROPERTY_VERSION_CREATED_AT = "version_created_at"; + private OffsetDateTime versionCreatedAt; + + public LLMObsPromptVersionListDataAttributes() {} + + @JsonCreator + public LLMObsPromptVersionListDataAttributes( + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_ID) String promptId, + @JsonProperty(required = true, value = JSON_PROPERTY_PROMPT_UUID) String promptUuid, + @JsonProperty(required = true, value = JSON_PROPERTY_VERSION) Long version) { + this.promptId = promptId; + this.promptUuid = promptUuid; + this.version = version; + } + + public LLMObsPromptVersionListDataAttributes author(String author) { + this.author = author; + return this; + } + + /** + * UUID of the user who authored this version. + * + * @return author + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_AUTHOR) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getAuthor() { + return author; + } + + public void setAuthor(String author) { + this.author = author; + } + + public LLMObsPromptVersionListDataAttributes createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Timestamp stored on this prompt version. + * + * @return createdAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public LLMObsPromptVersionListDataAttributes datasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + return this; + } + + public LLMObsPromptVersionListDataAttributes addDatasetsItem(LLMObsPromptDataset datasetsItem) { + if (this.datasets == null) { + this.datasets = new ArrayList<>(); + } + this.datasets.add(datasetsItem); + this.unparsed |= datasetsItem.unparsed; + return this; + } + + /** + * Datasets observed in runs associated with this prompt version. + * + * @return datasets + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATASETS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getDatasets() { + return datasets; + } + + public void setDatasets(List datasets) { + this.datasets = datasets; + if (datasets != null) { + for (LLMObsPromptDataset item : datasets) { + this.unparsed |= item.unparsed; + } + } + } + + public LLMObsPromptVersionListDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Description of this version. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsPromptVersionListDataAttributes labels(List labels) { + this.labels = labels; + return this; + } + + public LLMObsPromptVersionListDataAttributes addLabelsItem(String labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + return this; + } + + /** + * Labels attached to this version (for example development, staging, + * production). + * + * @return labels + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + @Deprecated + public void setLabels(List labels) { + this.labels = labels; + } + + public LLMObsPromptVersionListDataAttributes lastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + return this; + } + + /** + * Timestamp of the most recent observed run of this prompt version. + * + * @return lastSeenAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LAST_SEEN_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getLastSeenAt() { + return lastSeenAt; + } + + public void setLastSeenAt(OffsetDateTime lastSeenAt) { + this.lastSeenAt = lastSeenAt; + } + + public LLMObsPromptVersionListDataAttributes mlApp(String mlApp) { + this.mlApp = mlApp; + return this; + } + + /** + * The ML application this prompt is associated with. + * + * @return mlApp + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APP) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getMlApp() { + return mlApp; + } + + public void setMlApp(String mlApp) { + this.mlApp = mlApp; + } + + public LLMObsPromptVersionListDataAttributes mlApps(List mlApps) { + this.mlApps = mlApps; + return this; + } + + public LLMObsPromptVersionListDataAttributes addMlAppsItem(String mlAppsItem) { + if (this.mlApps == null) { + this.mlApps = new ArrayList<>(); + } + this.mlApps.add(mlAppsItem); + return this; + } + + /** + * ML applications observed running this prompt version. + * + * @return mlApps + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ML_APPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMlApps() { + return mlApps; + } + + public void setMlApps(List mlApps) { + this.mlApps = mlApps; + } + + public LLMObsPromptVersionListDataAttributes promptId(String promptId) { + this.promptId = promptId; + return this; + } + + /** + * Customer-provided identifier of the parent prompt. + * + * @return promptId + */ + @JsonProperty(JSON_PROPERTY_PROMPT_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptId() { + return promptId; + } + + public void setPromptId(String promptId) { + this.promptId = promptId; + } + + public LLMObsPromptVersionListDataAttributes promptUuid(String promptUuid) { + this.promptUuid = promptUuid; + return this; + } + + /** + * Unique identifier of the parent prompt. + * + * @return promptUuid + */ + @JsonProperty(JSON_PROPERTY_PROMPT_UUID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getPromptUuid() { + return promptUuid; + } + + public void setPromptUuid(String promptUuid) { + this.promptUuid = promptUuid; + } + + public LLMObsPromptVersionListDataAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public LLMObsPromptVersionListDataAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Tags observed on runs of this prompt version. + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + public LLMObsPromptVersionListDataAttributes userVersion(String userVersion) { + this.userVersion = userVersion; + return this; + } + + /** + * User-supplied identifier for this version. + * + * @return userVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_USER_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getUserVersion() { + return userVersion; + } + + public void setUserVersion(String userVersion) { + this.userVersion = userVersion; + } + + public LLMObsPromptVersionListDataAttributes version(Long version) { + this.version = version; + return this; + } + + /** + * Sequential version number. minimum: 1 + * + * @return version + */ + @JsonProperty(JSON_PROPERTY_VERSION) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getVersion() { + return version; + } + + public void setVersion(Long version) { + this.version = version; + } + + public LLMObsPromptVersionListDataAttributes versionCreatedAt(OffsetDateTime versionCreatedAt) { + this.versionCreatedAt = versionCreatedAt; + return this; + } + + /** + * Timestamp when this version was created. + * + * @return versionCreatedAt + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_VERSION_CREATED_AT) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public OffsetDateTime getVersionCreatedAt() { + return versionCreatedAt; + } + + public void setVersionCreatedAt(OffsetDateTime versionCreatedAt) { + this.versionCreatedAt = versionCreatedAt; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptVersionListDataAttributes + */ + @JsonAnySetter + public LLMObsPromptVersionListDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptVersionListDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptVersionListDataAttributes llmObsPromptVersionListDataAttributes = + (LLMObsPromptVersionListDataAttributes) o; + return Objects.equals(this.author, llmObsPromptVersionListDataAttributes.author) + && Objects.equals(this.createdAt, llmObsPromptVersionListDataAttributes.createdAt) + && Objects.equals(this.datasets, llmObsPromptVersionListDataAttributes.datasets) + && Objects.equals(this.description, llmObsPromptVersionListDataAttributes.description) + && Objects.equals(this.labels, llmObsPromptVersionListDataAttributes.labels) + && Objects.equals(this.lastSeenAt, llmObsPromptVersionListDataAttributes.lastSeenAt) + && Objects.equals(this.mlApp, llmObsPromptVersionListDataAttributes.mlApp) + && Objects.equals(this.mlApps, llmObsPromptVersionListDataAttributes.mlApps) + && Objects.equals(this.promptId, llmObsPromptVersionListDataAttributes.promptId) + && Objects.equals(this.promptUuid, llmObsPromptVersionListDataAttributes.promptUuid) + && Objects.equals(this.tags, llmObsPromptVersionListDataAttributes.tags) + && Objects.equals(this.userVersion, llmObsPromptVersionListDataAttributes.userVersion) + && Objects.equals(this.version, llmObsPromptVersionListDataAttributes.version) + && Objects.equals( + this.versionCreatedAt, llmObsPromptVersionListDataAttributes.versionCreatedAt) + && Objects.equals( + this.additionalProperties, llmObsPromptVersionListDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + author, + createdAt, + datasets, + description, + labels, + lastSeenAt, + mlApp, + mlApps, + promptId, + promptUuid, + tags, + userVersion, + version, + versionCreatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptVersionListDataAttributes {\n"); + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" datasets: ").append(toIndentedString(datasets)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" lastSeenAt: ").append(toIndentedString(lastSeenAt)).append("\n"); + sb.append(" mlApp: ").append(toIndentedString(mlApp)).append("\n"); + sb.append(" mlApps: ").append(toIndentedString(mlApps)).append("\n"); + sb.append(" promptId: ").append(toIndentedString(promptId)).append("\n"); + sb.append(" promptUuid: ").append(toIndentedString(promptUuid)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" userVersion: ").append(toIndentedString(userVersion)).append("\n"); + sb.append(" version: ").append(toIndentedString(version)).append("\n"); + sb.append(" versionCreatedAt: ").append(toIndentedString(versionCreatedAt)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionResponse.java new file mode 100644 index 00000000000..afb30044ab1 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionResponse.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Response containing a specific version of an LLM Observability prompt. */ +@JsonPropertyOrder({LLMObsPromptVersionResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptVersionResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsPromptVersionData data; + + public LLMObsPromptVersionResponse() {} + + @JsonCreator + public LLMObsPromptVersionResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LLMObsPromptVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsPromptVersionResponse data(LLMObsPromptVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for a specific version of an LLM Observability prompt. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptVersionData getData() { + return data; + } + + public void setData(LLMObsPromptVersionData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptVersionResponse + */ + @JsonAnySetter + public LLMObsPromptVersionResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptVersionResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptVersionResponse llmObsPromptVersionResponse = (LLMObsPromptVersionResponse) o; + return Objects.equals(this.data, llmObsPromptVersionResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPromptVersionResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptVersionResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionType.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionType.java new file mode 100644 index 00000000000..717afca1c91 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionType.java @@ -0,0 +1,57 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Resource type of an LLM Observability prompt version. */ +@JsonSerialize(using = LLMObsPromptVersionType.LLMObsPromptVersionTypeSerializer.class) +public class LLMObsPromptVersionType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("prompt-template-versions")); + + public static final LLMObsPromptVersionType PROMPT_TEMPLATE_VERSIONS = + new LLMObsPromptVersionType("prompt-template-versions"); + + LLMObsPromptVersionType(String value) { + super(value, allowedValues); + } + + public static class LLMObsPromptVersionTypeSerializer + extends StdSerializer { + public LLMObsPromptVersionTypeSerializer(Class t) { + super(t); + } + + public LLMObsPromptVersionTypeSerializer() { + this(null); + } + + @Override + public void serialize( + LLMObsPromptVersionType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static LLMObsPromptVersionType fromValue(String value) { + return new LLMObsPromptVersionType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionsResponse.java new file mode 100644 index 00000000000..9d621855f1e --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptVersionsResponse.java @@ -0,0 +1,164 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing the versions of an LLM Observability prompt. */ +@JsonPropertyOrder({LLMObsPromptVersionsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptVersionsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public LLMObsPromptVersionsResponse() {} + + @JsonCreator + public LLMObsPromptVersionsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + for (LLMObsPromptVersionListData item : data) { + this.unparsed |= item.unparsed; + } + } + + public LLMObsPromptVersionsResponse data(List data) { + this.data = data; + for (LLMObsPromptVersionListData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPromptVersionsResponse addDataItem(LLMObsPromptVersionListData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Prompt versions ordered from newest to oldest. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (LLMObsPromptVersionListData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptVersionsResponse + */ + @JsonAnySetter + public LLMObsPromptVersionsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptVersionsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptVersionsResponse llmObsPromptVersionsResponse = (LLMObsPromptVersionsResponse) o; + return Objects.equals(this.data, llmObsPromptVersionsResponse.data) + && Objects.equals( + this.additionalProperties, llmObsPromptVersionsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptVersionsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptsResponse.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptsResponse.java new file mode 100644 index 00000000000..f112958f1db --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsPromptsResponse.java @@ -0,0 +1,162 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Response containing a list of LLM Observability prompts. */ +@JsonPropertyOrder({LLMObsPromptsResponse.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsPromptsResponse { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public LLMObsPromptsResponse() {} + + @JsonCreator + public LLMObsPromptsResponse( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) List data) { + this.data = data; + for (LLMObsPromptData item : data) { + this.unparsed |= item.unparsed; + } + } + + public LLMObsPromptsResponse data(List data) { + this.data = data; + for (LLMObsPromptData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public LLMObsPromptsResponse addDataItem(LLMObsPromptData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * List of LLM Observability prompts. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + if (data != null) { + for (LLMObsPromptData item : data) { + this.unparsed |= item.unparsed; + } + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsPromptsResponse + */ + @JsonAnySetter + public LLMObsPromptsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsPromptsResponse object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsPromptsResponse llmObsPromptsResponse = (LLMObsPromptsResponse) o; + return Objects.equals(this.data, llmObsPromptsResponse.data) + && Objects.equals(this.additionalProperties, llmObsPromptsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsPromptsResponse {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptData.java new file mode 100644 index 00000000000..784ce096b98 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for updating an LLM Observability prompt. */ +@JsonPropertyOrder({ + LLMObsUpdatePromptData.JSON_PROPERTY_ATTRIBUTES, + LLMObsUpdatePromptData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsUpdatePromptData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsUpdatePromptDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptType type; + + public LLMObsUpdatePromptData() {} + + @JsonCreator + public LLMObsUpdatePromptData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsUpdatePromptDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsUpdatePromptData attributes(LLMObsUpdatePromptDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Attributes for updating an LLM Observability prompt. At least one of title or + * description must be provided; both attributes are optional individually. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsUpdatePromptDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsUpdatePromptDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsUpdatePromptData type(LLMObsPromptType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptType getType() { + return type; + } + + public void setType(LLMObsPromptType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsUpdatePromptData + */ + @JsonAnySetter + public LLMObsUpdatePromptData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsUpdatePromptData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsUpdatePromptData llmObsUpdatePromptData = (LLMObsUpdatePromptData) o; + return Objects.equals(this.attributes, llmObsUpdatePromptData.attributes) + && Objects.equals(this.type, llmObsUpdatePromptData.type) + && Objects.equals(this.additionalProperties, llmObsUpdatePromptData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsUpdatePromptData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptDataAttributes.java new file mode 100644 index 00000000000..8462fc8a2d9 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptDataAttributes.java @@ -0,0 +1,114 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.Objects; + +/** + * Attributes for updating an LLM Observability prompt. At least one of title or + * description must be provided; both attributes are optional individually. + */ +@JsonPropertyOrder({ + LLMObsUpdatePromptDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsUpdatePromptDataAttributes.JSON_PROPERTY_TITLE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsUpdatePromptDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_TITLE = "title"; + private String title; + + public LLMObsUpdatePromptDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Optional new description for the prompt. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsUpdatePromptDataAttributes title(String title) { + this.title = title; + return this; + } + + /** + * Optional new title for the prompt. + * + * @return title + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TITLE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + /** Return true if this LLMObsUpdatePromptDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsUpdatePromptDataAttributes llmObsUpdatePromptDataAttributes = + (LLMObsUpdatePromptDataAttributes) o; + return Objects.equals(this.description, llmObsUpdatePromptDataAttributes.description) + && Objects.equals(this.title, llmObsUpdatePromptDataAttributes.title); + } + + @Override + public int hashCode() { + return Objects.hash(description, title); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsUpdatePromptDataAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" title: ").append(toIndentedString(title)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptRequest.java new file mode 100644 index 00000000000..4b0f0f4adda --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptRequest.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Request to update an LLM Observability prompt's metadata. */ +@JsonPropertyOrder({LLMObsUpdatePromptRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsUpdatePromptRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsUpdatePromptData data; + + public LLMObsUpdatePromptRequest() {} + + @JsonCreator + public LLMObsUpdatePromptRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) LLMObsUpdatePromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsUpdatePromptRequest data(LLMObsUpdatePromptData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for updating an LLM Observability prompt. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsUpdatePromptData getData() { + return data; + } + + public void setData(LLMObsUpdatePromptData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsUpdatePromptRequest + */ + @JsonAnySetter + public LLMObsUpdatePromptRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsUpdatePromptRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsUpdatePromptRequest llmObsUpdatePromptRequest = (LLMObsUpdatePromptRequest) o; + return Objects.equals(this.data, llmObsUpdatePromptRequest.data) + && Objects.equals( + this.additionalProperties, llmObsUpdatePromptRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsUpdatePromptRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionData.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionData.java new file mode 100644 index 00000000000..586877e11be --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionData.java @@ -0,0 +1,188 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** Data object for updating an LLM Observability prompt version. */ +@JsonPropertyOrder({ + LLMObsUpdatePromptVersionData.JSON_PROPERTY_ATTRIBUTES, + LLMObsUpdatePromptVersionData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsUpdatePromptVersionData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private LLMObsUpdatePromptVersionDataAttributes attributes; + + public static final String JSON_PROPERTY_TYPE = "type"; + private LLMObsPromptVersionType type; + + public LLMObsUpdatePromptVersionData() {} + + @JsonCreator + public LLMObsUpdatePromptVersionData( + @JsonProperty(required = true, value = JSON_PROPERTY_ATTRIBUTES) + LLMObsUpdatePromptVersionDataAttributes attributes, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) LLMObsPromptVersionType type) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public LLMObsUpdatePromptVersionData attributes( + LLMObsUpdatePromptVersionDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * 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. + * + * @return attributes + */ + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsUpdatePromptVersionDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(LLMObsUpdatePromptVersionDataAttributes attributes) { + this.attributes = attributes; + if (attributes != null) { + this.unparsed |= attributes.unparsed; + } + } + + public LLMObsUpdatePromptVersionData type(LLMObsPromptVersionType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Resource type of an LLM Observability prompt version. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsPromptVersionType getType() { + return type; + } + + public void setType(LLMObsPromptVersionType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsUpdatePromptVersionData + */ + @JsonAnySetter + public LLMObsUpdatePromptVersionData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsUpdatePromptVersionData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsUpdatePromptVersionData llmObsUpdatePromptVersionData = (LLMObsUpdatePromptVersionData) o; + return Objects.equals(this.attributes, llmObsUpdatePromptVersionData.attributes) + && Objects.equals(this.type, llmObsUpdatePromptVersionData.type) + && Objects.equals( + this.additionalProperties, llmObsUpdatePromptVersionData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsUpdatePromptVersionData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionDataAttributes.java new file mode 100644 index 00000000000..820c6132cad --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionDataAttributes.java @@ -0,0 +1,166 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +/** + * 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. + */ +@JsonPropertyOrder({ + LLMObsUpdatePromptVersionDataAttributes.JSON_PROPERTY_DESCRIPTION, + LLMObsUpdatePromptVersionDataAttributes.JSON_PROPERTY_ENV_IDS, + LLMObsUpdatePromptVersionDataAttributes.JSON_PROPERTY_LABELS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsUpdatePromptVersionDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_ENV_IDS = "env_ids"; + private List envIds = null; + + public static final String JSON_PROPERTY_LABELS = "labels"; + private List labels = null; + + public LLMObsUpdatePromptVersionDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Optional new description for this version. + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LLMObsUpdatePromptVersionDataAttributes envIds(List envIds) { + this.envIds = envIds; + return this; + } + + public LLMObsUpdatePromptVersionDataAttributes addEnvIdsItem(String envIdsItem) { + if (this.envIds == null) { + this.envIds = new ArrayList<>(); + } + this.envIds.add(envIdsItem); + return this; + } + + /** + * Optional feature-flag environment UUIDs the service attempts to enable and configure to use + * this version as their default. + * + * @return envIds + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ENV_IDS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnvIds() { + return envIds; + } + + public void setEnvIds(List envIds) { + this.envIds = envIds; + } + + public LLMObsUpdatePromptVersionDataAttributes labels(List labels) { + this.labels = labels; + return this; + } + + public LLMObsUpdatePromptVersionDataAttributes addLabelsItem( + LLMObsPromptVersionLabel labelsItem) { + if (this.labels == null) { + this.labels = new ArrayList<>(); + } + this.labels.add(labelsItem); + this.unparsed |= !labelsItem.isValid(); + return this; + } + + /** + * Optional new labels for this version. Do not use this attribute for new integrations. + * + * @return labels + * @deprecated + */ + @Deprecated + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LABELS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLabels() { + return labels; + } + + @Deprecated + public void setLabels(List labels) { + this.labels = labels; + } + + /** Return true if this LLMObsUpdatePromptVersionDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsUpdatePromptVersionDataAttributes llmObsUpdatePromptVersionDataAttributes = + (LLMObsUpdatePromptVersionDataAttributes) o; + return Objects.equals(this.description, llmObsUpdatePromptVersionDataAttributes.description) + && Objects.equals(this.envIds, llmObsUpdatePromptVersionDataAttributes.envIds) + && Objects.equals(this.labels, llmObsUpdatePromptVersionDataAttributes.labels); + } + + @Override + public int hashCode() { + return Objects.hash(description, envIds, labels); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsUpdatePromptVersionDataAttributes {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" envIds: ").append(toIndentedString(envIds)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionRequest.java b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionRequest.java new file mode 100644 index 00000000000..7d97e1c124a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/LLMObsUpdatePromptVersionRequest.java @@ -0,0 +1,153 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** + * Request to update an LLM Observability prompt version's metadata or feature-flag environments. + */ +@JsonPropertyOrder({LLMObsUpdatePromptVersionRequest.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class LLMObsUpdatePromptVersionRequest { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private LLMObsUpdatePromptVersionData data; + + public LLMObsUpdatePromptVersionRequest() {} + + @JsonCreator + public LLMObsUpdatePromptVersionRequest( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + LLMObsUpdatePromptVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public LLMObsUpdatePromptVersionRequest data(LLMObsUpdatePromptVersionData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Data object for updating an LLM Observability prompt version. + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public LLMObsUpdatePromptVersionData getData() { + return data; + } + + public void setData(LLMObsUpdatePromptVersionData data) { + this.data = data; + if (data != null) { + this.unparsed |= data.unparsed; + } + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return LLMObsUpdatePromptVersionRequest + */ + @JsonAnySetter + public LLMObsUpdatePromptVersionRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this LLMObsUpdatePromptVersionRequest object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LLMObsUpdatePromptVersionRequest llmObsUpdatePromptVersionRequest = + (LLMObsUpdatePromptVersionRequest) o; + return Objects.equals(this.data, llmObsUpdatePromptVersionRequest.data) + && Objects.equals( + this.additionalProperties, llmObsUpdatePromptVersionRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LLMObsUpdatePromptVersionRequest {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append('}'); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..c9cc8bd3d81 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-07-20T10:28:03.829Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.json new file mode 100644 index 00000000000..b668fc568cb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"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\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "90f27a31-2900-5344-8bcc-0e54a8c53bc4" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"template\":\" \"},\"type\":\"prompt-template-versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response-1784543283/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid prompt template\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a29b15a2-0dfa-dcd1-5224-d0a44aa89a9d" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_Bad_Request_response-1784543283", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "79ed63f7-31f4-a945-ee25-f3674b36e849" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..953941fa662 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:19:57.708Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.json new file mode 100644 index 00000000000..588a848d295 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"env_ids\":[],\"labels\":[],\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}]},\"type\":\"prompt-template-versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts/nonexistent-prompt/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "266e03cb-541a-f896-d7f3-729307c6eb4f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.freeze new file mode 100644 index 00000000000..4407bab7f40 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T15:43:06.878Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.json new file mode 100644 index 00000000000..8410cc90507 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_a_new_LLM_Observability_prompt_version_returns_OK_response.json @@ -0,0 +1,114 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"35fdaa67-acf0-536e-b3ce-293217edd15d\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:43:07.278009677Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T15:43:07.278009677Z\",\"num_versions\":1,\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186\",\"source\":\"registry\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ad058cc9-ce1d-a2f6-87bc-164bec0c76c4" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"template\":\"You are a concise customer support assistant for {{company_name}}. Answer {{customer_name}}'s question: {{question}}\"},\"type\":\"prompt-template-versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"65c5ada2-230a-5fc5-bdd6-c8e162bf2e30\",\"type\":\"prompt-template-versions\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:43:09.752343537Z\",\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186\",\"prompt_uuid\":\"35fdaa67-acf0-536e-b3ce-293217edd15d\",\"template\":\"You are a concise customer support assistant for {{company_name}}. Answer {{customer_name}}'s question: {{question}}\",\"version\":2,\"version_created_at\":\"2026-07-20T15:43:09.752343537Z\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "98f256c4-af5b-4511-5e38-87298058a330" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"35fdaa67-acf0-536e-b3ce-293217edd15d\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T15:43:10.417698Z\",\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fa68b35c-8026-31a8-03d3-79f27d6b465a" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"35fdaa67-acf0-536e-b3ce-293217edd15d\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T15:43:10.728735Z\",\"prompt_id\":\"Test-Create_a_new_LLM_Observability_prompt_version_returns_OK_response-1784562186\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fa68b35c-8026-31a8-03d3-79f27d6b465b" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..3cfa6ea0206 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-07-20T10:28:19.611Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.json new file mode 100644 index 00000000000..27c67cc38ad --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_Bad_Request_response-1784543299\",\"template\":\" \"},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid prompt template\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b9aa0cdd-01ec-92ea-001e-2eed81de780e" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.freeze b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.freeze new file mode 100644 index 00000000000..869e5fe283c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:19:59.888Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.json b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.json new file mode 100644 index 00000000000..3ecc52d4be7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_Conflict_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_Conflict_response-1784539199\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c3ac68bb-ac5c-4ff2-d5ab-63ec454ea97e" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"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\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template already exists\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 409, + "reasonPhrase": "Conflict" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d88bb4e0-3daa-45ed-faf4-e3207164e178" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Create_an_LLM_Observability_prompt_returns_Conflict_response-1784539199", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fd872fba-3981-7c53-0151-d241258d0718" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.freeze new file mode 100644 index 00000000000..b7c3cd08cdb --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T15:42:44.322Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.json new file mode 100644 index 00000000000..7da1828ebbe --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_an_LLM_Observability_prompt_returns_OK_response.json @@ -0,0 +1,58 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784562164\",\"template\":\"You are a helpful customer support assistant for {{company_name}}. Help {{customer_name}} with this question: {{question}}\",\"title\":\"Customer Support Assistant\"},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"730fb9e3-ef62-5835-b1cf-1212f92563d0\",\"type\":\"prompt-templates\",\"attributes\":{\"author\":\"c5e19e5a-ad6b-11ed-ab4f-927130d31ef9\",\"created_at\":\"2026-07-20T15:42:45.030698244Z\",\"created_from\":\"sdk-registry\",\"in_registry\":true,\"last_version_created_at\":\"2026-07-20T15:42:45.030698244Z\",\"num_versions\":1,\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784562164\",\"source\":\"registry\",\"title\":\"Customer Support Assistant\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b0295bf9-578b-1382-d065-0ac6c9291be2" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784562164", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"data\":{\"id\":\"730fb9e3-ef62-5835-b1cf-1212f92563d0\",\"type\":\"prompt-templates\",\"attributes\":{\"deleted_at\":\"2026-07-20T15:42:46.114233Z\",\"prompt_id\":\"Test-Create_an_LLM_Observability_prompt_returns_OK_response-1784562164\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e83ddf14-b8a7-4241-de61-fb907f3c0c0f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..aa624718a82 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:20:02.116Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.json new file mode 100644 index 00000000000..2a67971df4c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/nonexistent-prompt", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5d103955-379a-ae57-3930-d19bcb586215" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.freeze new file mode 100644 index 00000000000..710a0192eb1 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:20:02.406Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.json new file mode 100644 index 00000000000..fcbc2bdb7d4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_an_LLM_Observability_prompt_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "eda0090b-de31-e95b-0566-c68280b79d19" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c793b789-7a60-9ac1-3116-975bc1544766" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Delete_an_LLM_Observability_prompt_returns_OK_response-1784539202", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c793b789-7a60-9ac1-3116-975bc1544767" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..4ccdfe43053 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-07-20T10:29:01.052Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json new file mode 100644 index 00000000000..f5aa2093e1c --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/llm-obs/v1/prompts/nonexistent-prompt/versions/1", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d4047aac-d83b-7fe8-16b2-36fd78a9197e" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze new file mode 100644 index 00000000000..51fcc5fc072 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T12:24:45.688Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.json new file mode 100644 index 00000000000..d1249750320 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_a_specific_LLM_Observability_prompt_version_returns_OK_response.json @@ -0,0 +1,140 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "d2e40232-6a9c-11b7-9cae-9105fc718822" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}]},\"type\":\"prompt-template-versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "dcd83842-4723-6580-d888-145e8c864180" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285/versions/2", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "0ae2533e-a721-e8b3-4845-858cf9e60da6" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e98cb8fe-7cef-a49c-e959-871739cdfac6" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Get_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784550285", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "e98cb8fe-7cef-a49c-e959-871739cdfac7" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..3c46437a842 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:20:08.586Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.json new file mode 100644 index 00000000000..bfe5effec95 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/llm-obs/v1/prompts/nonexistent-prompt", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt with id 'nonexistent-prompt' not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "4de338bc-e1b0-d211-4eae-8e3b518c1240" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.freeze new file mode 100644 index 00000000000..cbbdf891024 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:20:08.880Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.json new file mode 100644 index 00000000000..04b0a51049f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_an_LLM_Observability_prompt_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "856e0990-2d3a-bb22-8870-8711d796b80a" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/llm-obs/v1/prompts/Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "79311cc8-039b-6e82-6c92-ef6178e72767" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Get_an_LLM_Observability_prompt_returns_OK_response-1784539208", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "9bf6e593-3fdd-6c8f-ec69-d3db131d76a5" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.freeze new file mode 100644 index 00000000000..9a473ba7155 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:30:04.586Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.json new file mode 100644 index 00000000000..ca37fa4ffc2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_LLM_Observability_prompts_returns_OK_response.json @@ -0,0 +1,89 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-List_LLM_Observability_prompts_returns_OK_response-1784539804\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "34a78994-3030-3ac6-a051-512e481f0491" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/llm-obs/v1/prompts", + "queryStringParameters": { + "filter[prompt_id]": [ + "Test-List_LLM_Observability_prompts_returns_OK_response-1784539804" + ] + }, + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "1d206097-bf69-4f21-3dad-0725925318b5" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-List_LLM_Observability_prompts_returns_OK_response-1784539804", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5561132b-c4c3-6263-8884-b96ebb98304f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.freeze new file mode 100644 index 00000000000..5cbb96b9837 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:20:12.882Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.json new file mode 100644 index 00000000000..ed34ef17ef3 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_versions_of_an_LLM_Observability_prompt_returns_OK_response.json @@ -0,0 +1,84 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "4631cbf1-f9e3-7868-b286-b46d59adfa5b" + }, + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/llm-obs/v1/prompts/Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3710bf28-51d6-6899-24d7-6deae756c34a" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-List_versions_of_an_LLM_Observability_prompt_returns_OK_response-1784539212", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "aeb88b87-5db2-4fcf-c2bc-88bcdfc81fb0" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..43f402180a4 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-07-20T10:29:38.039Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json new file mode 100644 index 00000000000..7b0e7a71ea7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"env_ids\":[],\"labels\":[]},\"type\":\"prompt-template-versions\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/llm-obs/v1/prompts/nonexistent-prompt/versions/1", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template version not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "5d775e24-9e74-f9b6-5954-7388337ad941" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze new file mode 100644 index 00000000000..c0ae65a3ec7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T15:43:10.740Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.json new file mode 100644 index 00000000000..0fdb902fd9f --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_a_specific_LLM_Observability_prompt_version_returns_OK_response.json @@ -0,0 +1,144 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "a8fccc94-1bf3-307a-fd90-45b864a2340a" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"template\":[{\"content\":\"Hello v2\",\"role\":\"user\"}]},\"type\":\"prompt-template-versions\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190/versions", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "c3e9563b-5710-e6f1-d2f6-829a48f13c94" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"description\":\"Give concise answers and cite relevant help-center articles.\"},\"type\":\"prompt-template-versions\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190/versions/2", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "95e1fe95-9e0a-ecae-ba91-c8726d5efe19" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ba1ddfac-c807-9ebb-4b81-64fbbd1e5a1a" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_a_specific_LLM_Observability_prompt_version_returns_OK_response-1784562190", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "ba1ddfac-c807-9ebb-4b81-64fbbd1e5a1b" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..30ae36893a3 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:20:18.946Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.json new file mode 100644 index 00000000000..430e37f16e6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Bad_Request_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "75e0607b-f971-f86a-b3a2-62e04bb88856" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"at least one of title or description must be provided\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "3b4551b1-21ca-3868-c34d-2f7f239c354b" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_Bad_Request_response-1784539218", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b6884ef2-26ac-4ba4-db7c-61594b0cfa1f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..989a21d45ca --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2026-07-20T09:20:20.319Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.json new file mode 100644 index 00000000000..12ac56c19a5 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_Not_Found_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"title\":\"New title\"},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/llm-obs/v1/prompts/nonexistent-prompt", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"prompt template not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "1a509daf-ad9d-d1a2-0f59-090ba74bf89a" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.freeze b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.freeze new file mode 100644 index 00000000000..9eed997d0fd --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.freeze @@ -0,0 +1 @@ +2026-07-20T15:43:14.374Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.json new file mode 100644 index 00000000000..575240c2d7d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Update_an_LLM_Observability_prompt_returns_OK_response.json @@ -0,0 +1,88 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"prompt_id\":\"Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194\",\"template\":[{\"content\":\"Hello\",\"role\":\"user\"}]},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/llm-obs/v1/prompts", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "38ff8857-64ed-29b6-b024-8b2da0948f28" + }, + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"title\":\"Customer Support Assistant\"},\"type\":\"prompt-templates\"}}" + }, + "headers": {}, + "method": "PATCH", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "fd24dfa9-6a05-c34f-5fda-c07022f11787" + }, + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/llm-obs/v1/prompts/Test-Update_an_LLM_Observability_prompt_returns_OK_response-1784562194", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"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\"}}}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 200, + "reasonPhrase": "OK" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "be99c933-e8d9-31d4-aa8c-9ef38ef958e7" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/given.json b/src/test/resources/com/datadog/api/client/v2/api/given.json index 75fa924ff16..6f57cbefde8 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/given.json +++ b/src/test/resources/com/datadog/api/client/v2/api/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/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature b/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature index 35e9592fa0a..5029439b310 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/llm_observability.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/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": "You are a concise customer support assistant for {{ '{{company_name}}' }}. Answer {{ '{{customer_name}}' }}'s question: {{ '{{question}}' }}"}, "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": "You are a helpful customer support assistant for {{ '{{company_name}}' }}. Help {{ '{{customer_name}}' }} with this question: {{ '{{question}}' }}"}, "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/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index f7316aecda2..e72767d8e0d 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/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": {