diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index ce0ea5b844..8cbb58c6f0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -944,6 +944,58 @@ components: required: true schema: $ref: "#/components/schemas/LLMObsIntegrationName" + LLMObsPatternsConfigIDPathParameter: + description: The ID of the patterns configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + in: path + name: config_id + required: true + schema: + type: string + LLMObsPatternsConfigIDQueryParameter: + description: The ID of the patterns configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + in: query + name: config_id + required: true + schema: + type: string + LLMObsPatternsIncludeMetricsQueryParameter: + description: |- + When true, enrich each clustered point with span metrics such as status, + duration, token counts, estimated cost, and evaluations. + in: query + name: include_metrics + schema: + type: boolean + LLMObsPatternsPageSizeQueryParameter: + description: Maximum number of clustered points to return per page. + in: query + name: page_size + schema: + format: int64 + type: integer + LLMObsPatternsPageTokenQueryParameter: + description: Pagination token to retrieve the next page of clustered points. + in: query + name: page_token + schema: + type: string + LLMObsPatternsRunIDQueryParameter: + description: The ID of a specific patterns run. Defaults to the most recent completed run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + in: query + name: run_id + schema: + type: string + LLMObsPatternsTopicIDQueryParameter: + description: The ID of the topic to retrieve clustered points for. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + in: query + name: topic_id + required: true + schema: + type: string LLMObsProjectIDPathParameter: description: The ID of the LLM Observability project. example: "a33671aa-24fd-4dcd-9b33-a8ec7dde7751" @@ -51646,6 +51698,1029 @@ components: - AUTO - CONCISE - DETAILED + LLMObsPatternsActivityProgress: + description: Progress information for a single step of a patterns run. + properties: + name: + description: Name of the step. + example: generate_topics + type: string + started_at: + description: Timestamp when the step started. Null if the step has not started. + example: "2024-01-15T10:30:00Z" + format: date-time + nullable: true + type: string + status: + description: Status of the step. + example: completed + type: string + required: + - name + - status + type: object + LLMObsPatternsClusteredPoint: + description: A single data point grouped into a topic. + properties: + event_id: + description: Identifier of the source event. + example: "AAAAAYabc123" + type: string + id: + description: Unique identifier of the clustered point. + example: "9b0c1d2e-3f40-5a61-b728-c9d0e1f2a3b4" + type: string + input: + description: Input text of the source span. + example: "How do I get a refund?" + type: string + is_included: + description: Whether the point is included in the patterns dataset. + example: false + type: boolean + is_suggested: + description: Whether the point is suggested for inclusion in the patterns dataset. + example: true + type: boolean + session_id: + description: Identifier of the source session. + example: "session-7c3f5a1b" + type: string + span_id: + description: Identifier of the source span. + example: "1234567890123456789" + type: string + topic_id: + description: Identifier of the topic the point belongs to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + required: + - id + - event_id + - topic_id + - span_id + - session_id + - input + - is_suggested + - is_included + type: object + LLMObsPatternsClusteredPointRef: + description: |- + A clustered point attached inline to a topic. The metric fields are populated + only when the request includes `include_metrics=true`. + properties: + duration: + description: Duration of the source span in nanoseconds. Included only when metrics are requested. + example: 1500000 + format: double + type: number + estimated_total_cost: + description: Estimated total cost of the source span. Included only when metrics are requested. + example: 0.0021 + format: double + type: number + evaluation: + additionalProperties: {} + description: |- + Evaluation results for the source span keyed by evaluation name. Included + only when metrics are requested. + type: object + input_tokens: + description: Number of input tokens of the source span. Included only when metrics are requested. + example: 128 + format: double + type: number + output_tokens: + description: Number of output tokens of the source span. Included only when metrics are requested. + example: 64 + format: double + type: number + span_id: + description: Identifier of the source span. + example: "1234567890123456789" + type: string + status: + description: Status of the source span. Included only when metrics are requested. + example: ok + type: string + total_tokens: + description: Total number of tokens of the source span. Included only when metrics are requested. + example: 192 + format: double + type: number + required: + - span_id + type: object + LLMObsPatternsClusteredPointRefsList: + description: List of clustered points attached to a topic. + items: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointRef" + type: array + LLMObsPatternsClusteredPointsList: + description: List of clustered points. + items: + $ref: "#/components/schemas/LLMObsPatternsClusteredPoint" + type: array + LLMObsPatternsClusteredPointsResponse: + description: Response containing the clustered points of an LLM Observability topic. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponseData" + required: + - data + type: object + LLMObsPatternsClusteredPointsResponseAttributes: + description: Attributes of an LLM Observability patterns clustered points response. + properties: + next_page_token: + description: Pagination token for the next page of points. Null if there are no more pages. + example: "eyJvZmZzZXQiOjUwfQ==" + nullable: true + type: string + points: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsList" + topic_id: + description: Identifier of the topic the points belong to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + required: + - topic_id + - next_page_token + - points + type: object + LLMObsPatternsClusteredPointsResponseData: + description: Data object of an LLM Observability patterns clustered points response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponseAttributes" + id: + description: Identifier of the topic the points belong to. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsClusteredPointsType: + description: Resource type of an LLM Observability patterns clustered points response. + enum: + - clustered_points_response + example: clustered_points_response + type: string + x-enum-varnames: + - CLUSTERED_POINTS_RESPONSE + LLMObsPatternsConfigAttributes: + description: Attributes of an LLM Observability patterns configuration. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + nullable: true + type: string + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + nullable: true + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + nullable: true + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + nullable: true + type: string + updated_at: + description: Timestamp when the configuration was last updated. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + required: + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + - scope + - created_at + - updated_at + type: object + LLMObsPatternsConfigItem: + description: A single LLM Observability patterns configuration in a list response. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + nullable: true + type: string + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + id: + description: Unique identifier of the configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + nullable: true + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + nullable: true + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + nullable: true + type: string + updated_at: + description: Timestamp when the configuration was last updated. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + required: + - id + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + - scope + - created_at + - updated_at + type: object + LLMObsPatternsConfigItemsList: + description: List of patterns configurations. + items: + $ref: "#/components/schemas/LLMObsPatternsConfigItem" + type: array + LLMObsPatternsConfigResponse: + description: Response containing a single LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigResponseData" + required: + - data + type: object + LLMObsPatternsConfigResponseData: + description: Data object of an LLM Observability patterns configuration. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigAttributes" + id: + description: Unique identifier of the configuration. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsConfigType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsConfigSnapshot: + description: Snapshot of the configuration used for a patterns run. + properties: + account_id: + description: Integration account ID used for a bring-your-own-model run. + example: "1000000001" + type: string + evp_query: + description: Query that selected the spans for the run. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy generated. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider used for a bring-your-own-model run. + example: openai + type: string + model_name: + description: Model name used for a bring-your-own-model run. + example: gpt-4o + type: string + num_records: + description: Maximum number of records processed for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans sampled for the run. + example: 0.1 + format: double + type: number + type: object + LLMObsPatternsConfigType: + description: Resource type of an LLM Observability patterns configuration. + enum: + - topic_discovery_configs + example: topic_discovery_configs + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_CONFIGS + LLMObsPatternsConfigUpsertRequest: + description: Request to create or update an LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequestData" + required: + - data + type: object + LLMObsPatternsConfigUpsertRequestAttributes: + description: Attributes for creating or updating an LLM Observability patterns configuration. + properties: + account_id: + description: Integration account ID for a bring-your-own-model configuration. + example: "1000000001" + type: string + config_id: + description: The ID of an existing configuration to update. If omitted, a new configuration is created. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + evp_query: + description: Query that selects the spans the patterns run analyzes. + example: "@ml_app:support-bot" + type: string + hierarchy_depth: + description: Depth of the topic hierarchy to generate. + example: 2 + format: int32 + maximum: 2147483647 + type: integer + integration_provider: + description: Integration provider for a bring-your-own-model configuration. + example: openai + type: string + model_name: + description: Model name for a bring-your-own-model configuration. + example: gpt-4o + type: string + name: + description: Name of the configuration. + example: "Support chatbot topics" + type: string + num_records: + description: Maximum number of records to process for the run. + example: 1000 + format: int32 + maximum: 2147483647 + type: integer + sampling_ratio: + description: Fraction of matching spans to sample for the run. + example: 0.1 + format: double + type: number + scope: + description: Scope of the configuration. + example: "" + type: string + template: + description: Template used to guide topic generation. + example: "" + type: string + required: + - name + - evp_query + - sampling_ratio + - num_records + - hierarchy_depth + type: object + LLMObsPatternsConfigUpsertRequestData: + description: Data object for creating or updating an LLM Observability patterns configuration. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequestAttributes" + type: + $ref: "#/components/schemas/LLMObsPatternsConfigType" + required: + - type + - attributes + type: object + LLMObsPatternsConfigsListType: + description: Resource type of a list of LLM Observability patterns configurations. + enum: + - list_topic_discovery_configs_response + example: list_topic_discovery_configs_response + type: string + x-enum-varnames: + - LIST_TOPIC_DISCOVERY_CONFIGS_RESPONSE + LLMObsPatternsConfigsResponse: + description: Response containing a list of LLM Observability patterns configurations. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponseData" + required: + - data + type: object + LLMObsPatternsConfigsResponseAttributes: + description: Attributes of a list of LLM Observability patterns configurations. + properties: + configs: + $ref: "#/components/schemas/LLMObsPatternsConfigItemsList" + required: + - configs + type: object + LLMObsPatternsConfigsResponseData: + description: Data object of a list of LLM Observability patterns configurations. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponseAttributes" + id: + description: Identifier of the list response. + example: "1000000001" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsConfigsListType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsProgressList: + description: List of step-by-step progress entries for a patterns run. + items: + $ref: "#/components/schemas/LLMObsPatternsActivityProgress" + type: array + LLMObsPatternsRequestType: + description: Resource type for triggering an LLM Observability patterns run. + enum: + - topic_discovery + example: topic_discovery + type: string + x-enum-varnames: + - TOPIC_DISCOVERY + LLMObsPatternsRunStatusResponse: + description: Response containing the status of an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponseData" + required: + - data + type: object + LLMObsPatternsRunStatusResponseAttributes: + description: Attributes of an LLM Observability patterns run status. + properties: + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + progress: + $ref: "#/components/schemas/LLMObsPatternsProgressList" + status: + description: Overall status of the run. + example: running + type: string + step: + description: The current step of the run. + example: generate_topics + type: string + required: + - created_at + - status + - step + - progress + type: object + LLMObsPatternsRunStatusResponseData: + description: Data object of an LLM Observability patterns run status response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponseAttributes" + id: + description: The ID of the patterns run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsRunStatusType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsRunStatusType: + description: Resource type of an LLM Observability patterns run status. + enum: + - topic_discovery_run_status + example: topic_discovery_run_status + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_RUN_STATUS + LLMObsPatternsRunSummary: + description: Summary of an LLM Observability patterns run. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + id: + description: Unique identifier of the run. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + status: + description: Status of the run. + example: completed + type: string + required: + - id + - status + - created_at + type: object + LLMObsPatternsRunsList: + description: List of patterns runs. + items: + $ref: "#/components/schemas/LLMObsPatternsRunSummary" + type: array + LLMObsPatternsRunsListType: + description: Resource type of a list of LLM Observability patterns runs. + enum: + - list_topic_discovery_runs_response + example: list_topic_discovery_runs_response + type: string + x-enum-varnames: + - LIST_TOPIC_DISCOVERY_RUNS_RESPONSE + LLMObsPatternsRunsResponse: + description: Response containing the completed runs of an LLM Observability patterns configuration. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsRunsResponseData" + required: + - data + type: object + LLMObsPatternsRunsResponseAttributes: + description: Attributes of an LLM Observability patterns runs response. + properties: + runs: + $ref: "#/components/schemas/LLMObsPatternsRunsList" + required: + - runs + type: object + LLMObsPatternsRunsResponseData: + description: Data object of an LLM Observability patterns runs response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsRunsResponseAttributes" + id: + description: Identifier of the configuration the runs belong to. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsRunsListType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopic: + description: A topic discovered by an LLM Observability patterns run. + properties: + coherence_score: + description: Coherence score of the topic. + example: 0.82 + format: double + type: number + created_at: + description: Timestamp when the topic was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + description: + description: Description of the topic. + example: "Questions about invoices, charges, and refunds." + type: string + first_seen_at: + description: Timestamp when the topic was first seen. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + hierarchy_level: + description: Level of the topic in the hierarchy. Level 0 is a leaf topic. + example: 0 + format: int64 + type: integer + id: + description: Unique identifier of the topic. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + is_validated: + description: Whether the topic has been validated. + example: true + type: boolean + name: + description: Name of the topic. + example: "Billing questions" + type: string + parent_topic_id: + description: Identifier of the parent topic. Empty for top-level topics. + example: "" + type: string + point_count: + description: Number of data points assigned to the topic. + example: 125 + format: int64 + type: integer + run_id: + description: Identifier of the run that produced the topic. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - id + - run_id + - parent_topic_id + - hierarchy_level + - name + - description + - coherence_score + - is_validated + - created_at + - point_count + - first_seen_at + type: object + LLMObsPatternsTopicWithClusteredPoints: + description: |- + A topic discovered by an LLM Observability patterns run, including the + clustered points attached to leaf topics. + properties: + cluster_points: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointRefsList" + coherence_score: + description: Coherence score of the topic. + example: 0.82 + format: double + type: number + created_at: + description: Timestamp when the topic was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + description: + description: Description of the topic. + example: "Questions about invoices, charges, and refunds." + type: string + first_seen_at: + description: Timestamp when the topic was first seen. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + hierarchy_level: + description: Level of the topic in the hierarchy. Level 0 is a leaf topic. + example: 0 + format: int64 + type: integer + id: + description: Unique identifier of the topic. + example: "5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21" + type: string + is_validated: + description: Whether the topic has been validated. + example: true + type: boolean + name: + description: Name of the topic. + example: "Billing questions" + type: string + parent_topic_id: + description: Identifier of the parent topic. Empty for top-level topics. + example: "" + type: string + point_count: + description: Number of data points assigned to the topic. + example: 125 + format: int64 + type: integer + run_id: + description: Identifier of the run that produced the topic. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + required: + - id + - run_id + - parent_topic_id + - hierarchy_level + - name + - description + - coherence_score + - is_validated + - created_at + - point_count + - first_seen_at + type: object + LLMObsPatternsTopicsList: + description: List of discovered topics. + items: + $ref: "#/components/schemas/LLMObsPatternsTopic" + type: array + LLMObsPatternsTopicsResponse: + description: Response containing the topics discovered by an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponseData" + required: + - data + type: object + LLMObsPatternsTopicsResponseAttributes: + description: Attributes of an LLM Observability patterns topics response. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_id: + description: Identifier of the configuration that produced the run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + previous_run_id: + description: Identifier of the run that completed immediately before this one. Empty if none. + example: "" + type: string + run_id: + description: Identifier of the run that produced the topics. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + topics: + $ref: "#/components/schemas/LLMObsPatternsTopicsList" + required: + - run_id + - config_id + - previous_run_id + - created_at + - topics + type: object + LLMObsPatternsTopicsResponseData: + description: Data object of an LLM Observability patterns topics response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponseAttributes" + id: + description: Identifier of the run the topics belong to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTopicsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopicsType: + description: Resource type of an LLM Observability patterns topics response. + enum: + - get_topics_response + example: get_topics_response + type: string + x-enum-varnames: + - GET_TOPICS_RESPONSE + LLMObsPatternsTopicsWithClusteredPointsList: + description: List of discovered topics with their clustered points. + items: + $ref: "#/components/schemas/LLMObsPatternsTopicWithClusteredPoints" + type: array + LLMObsPatternsTopicsWithClusteredPointsResponse: + description: |- + Response containing the topics, and the clustered points of their leaf topics, + discovered by an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponseData" + required: + - data + type: object + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes: + description: Attributes of an LLM Observability patterns topics-with-clustered-points response. + properties: + completed_at: + description: Timestamp when the run completed. Null if the run has not completed. + example: "2024-01-15T10:45:00Z" + format: date-time + nullable: true + type: string + config_id: + description: Identifier of the configuration that produced the run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + config_snapshot: + $ref: "#/components/schemas/LLMObsPatternsConfigSnapshot" + created_at: + description: Timestamp when the run was created. + example: "2024-01-15T10:30:00Z" + format: date-time + type: string + previous_run_id: + description: Identifier of the run that completed immediately before this one. Empty if none. + example: "" + type: string + run_id: + description: Identifier of the run that produced the topics. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + topics: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsList" + required: + - run_id + - config_id + - previous_run_id + - created_at + - topics + type: object + LLMObsPatternsTopicsWithClusteredPointsResponseData: + description: Data object of an LLM Observability patterns topics-with-clustered-points response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponseAttributes" + id: + description: Identifier of the run the topics belong to. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTopicsWithClusteredPointsType: + description: Resource type of an LLM Observability patterns topics-with-clustered-points response. + enum: + - get_topics_with_cluster_points_response + example: get_topics_with_cluster_points_response + type: string + x-enum-varnames: + - GET_TOPICS_WITH_CLUSTER_POINTS_RESPONSE + LLMObsPatternsTriggerRequest: + description: Request to trigger an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequestData" + required: + - data + type: object + LLMObsPatternsTriggerRequestAttributes: + description: Attributes for triggering an LLM Observability patterns run. + properties: + config_id: + description: The ID of the patterns configuration to run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + required: + - config_id + type: object + LLMObsPatternsTriggerRequestData: + description: Data object for triggering an LLM Observability patterns run. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequestAttributes" + type: + $ref: "#/components/schemas/LLMObsPatternsRequestType" + required: + - type + - attributes + type: object + LLMObsPatternsTriggerResponse: + description: Response after triggering an LLM Observability patterns run. + properties: + data: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseData" + required: + - data + type: object + LLMObsPatternsTriggerResponseAttributes: + description: Attributes of an LLM Observability patterns trigger response. + properties: + config_id: + description: The ID of the patterns configuration that was run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + run_id: + description: The ID of the patterns run that was started. + example: "3fd6b5e0-8910-4b1c-a7d0-5b84de329012" + type: string + status: + description: Status of the patterns run. + example: started + type: string + required: + - run_id + - config_id + - status + type: object + LLMObsPatternsTriggerResponseData: + description: Data object of an LLM Observability patterns trigger response. + properties: + attributes: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseAttributes" + id: + description: The ID of the patterns configuration that was run. + example: "a7c8d9e0-1234-5678-9abc-def012345678" + type: string + type: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponseType" + required: + - id + - type + - attributes + type: object + LLMObsPatternsTriggerResponseType: + description: Resource type of an LLM Observability patterns trigger response. + enum: + - topic_discovery_run + example: topic_discovery_run + type: string + x-enum-varnames: + - TOPIC_DISCOVERY_RUN LLMObsProjectDataAttributesRequest: description: Attributes for creating an LLM Observability project. properties: @@ -141636,6 +142711,734 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/llm-obs/v1/topic-discovery-clustered-points: + get: + description: |- + List the data points grouped into a topic. For a parent topic, points from all + of its leaf topics are returned. + operationId: ListLLMObsPatternsClusteredPoints + parameters: + - $ref: "#/components/parameters/LLMObsPatternsTopicIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsPageSizeQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsPageTokenQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + next_page_token: "eyJvZmZzZXQiOjUwfQ==" + points: + - event_id: AAAAAYabc123 + id: 9b0c1d2e-3f40-5a61-b728-c9d0e1f2a3b4 + input: "How do I get a refund?" + is_included: false + is_suggested: true + session_id: session-7c3f5a1b + span_id: "1234567890123456789" + topic_id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + topic_id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + type: clustered_points_response + schema: + $ref: "#/components/schemas/LLMObsPatternsClusteredPointsResponse" + 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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns clustered points + 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/topic-discovery-configs: + get: + description: List all patterns configurations for the organization. + operationId: ListLLMObsPatternsConfigs + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + configs: + - created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + id: a7c8d9e0-1234-5678-9abc-def012345678 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: "1000000001" + type: list_topic_discovery_configs_response + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigsResponse" + 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: List patterns configurations + 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/). + put: + description: Create a new patterns configuration, or update an existing one when a configuration ID is provided. + operationId: UpsertLLMObsPatternsConfig + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigUpsertRequest" + description: Patterns configuration payload. + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigResponse" + 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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Create or update a patterns configuration + 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/topic-discovery-configs/latest: + get: + description: Retrieve the patterns configuration for the organization. + operationId: GetLLMObsPatternsConfig + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + evp_query: "@ml_app:support-bot" + hierarchy_depth: 2 + name: Support chatbot topics + num_records: 1000 + sampling_ratio: 0.1 + scope: "" + updated_at: "2024-01-15T10:30:00Z" + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_configs + schema: + $ref: "#/components/schemas/LLMObsPatternsConfigResponse" + 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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get a patterns configuration + 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/topic-discovery-configs/{config_id}: + delete: + description: Delete a patterns configuration by its ID. + operationId: DeleteLLMObsPatternsConfig + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDPathParameter" + 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 + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Delete a patterns configuration + 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/topic-discovery-runs: + get: + description: List the completed patterns runs for a configuration. + operationId: ListLLMObsPatternsRuns + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + runs: + - completed_at: "2024-01-15T10:45:00Z" + created_at: "2024-01-15T10:30:00Z" + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + status: completed + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: list_topic_discovery_runs_response + schema: + $ref: "#/components/schemas/LLMObsPatternsRunsResponse" + 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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns runs + 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: Start a patterns run for a given configuration. The run executes asynchronously. + operationId: TriggerLLMObsPatterns + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery + schema: + $ref: "#/components/schemas/LLMObsPatternsTriggerRequest" + description: Trigger patterns payload. + required: true + responses: + "202": + content: + application/json: + examples: + default: + value: + data: + attributes: + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + status: started + id: a7c8d9e0-1234-5678-9abc-def012345678 + type: topic_discovery_run + schema: + $ref: "#/components/schemas/LLMObsPatternsTriggerResponse" + description: Accepted + "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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Trigger a patterns run + 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/topic-discovery-runs/status: + get: + description: |- + Retrieve the status and step-by-step progress of the current or most recent + patterns run for a configuration. + operationId: GetLLMObsPatternsRunStatus + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-15T10:30:00Z" + progress: + - name: query_evp + started_at: "2024-01-15T10:30:05Z" + status: completed + - name: generate_topics + started_at: "2024-01-15T10:32:00Z" + status: running + status: running + step: generate_topics + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: topic_discovery_run_status + schema: + $ref: "#/components/schemas/LLMObsPatternsRunStatusResponse" + 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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get patterns run status + 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/topic-discovery-topics: + get: + description: |- + List the topics discovered by a patterns run. When no run is specified, + the most recent completed run is used. + operationId: ListLLMObsPatternsTopics + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsRunIDQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + completed_at: "2024-01-15T10:45:00Z" + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + created_at: "2024-01-15T10:30:00Z" + previous_run_id: "" + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + topics: + - coherence_score: 0.82 + created_at: "2024-01-15T10:44:00Z" + description: "Questions about invoices, charges, and refunds." + first_seen_at: "2024-01-15T10:44:00Z" + hierarchy_level: 0 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + is_validated: true + name: Billing questions + parent_topic_id: "" + point_count: 125 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: get_topics_response + schema: + $ref: "#/components/schemas/LLMObsPatternsTopicsResponse" + 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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns topics + 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/topic-discovery-topics/with-cluster-points: + get: + description: |- + 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. + operationId: ListLLMObsPatternsTopicsWithClusteredPoints + parameters: + - $ref: "#/components/parameters/LLMObsPatternsConfigIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsRunIDQueryParameter" + - $ref: "#/components/parameters/LLMObsPatternsIncludeMetricsQueryParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + completed_at: "2024-01-15T10:45:00Z" + config_id: a7c8d9e0-1234-5678-9abc-def012345678 + created_at: "2024-01-15T10:30:00Z" + previous_run_id: "" + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + topics: + - cluster_points: + - duration: 1500000 + estimated_total_cost: 0.0021 + evaluation: + sentiment: positive + input_tokens: 128 + output_tokens: 64 + span_id: "1234567890123456789" + status: ok + total_tokens: 192 + coherence_score: 0.82 + created_at: "2024-01-15T10:44:00Z" + description: "Questions about invoices, charges, and refunds." + first_seen_at: "2024-01-15T10:44:00Z" + hierarchy_level: 0 + id: 5c1fae90-2b6d-4e3a-9f12-7a0c4d8e6b21 + is_validated: true + name: Billing questions + parent_topic_id: "" + point_count: 125 + run_id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + id: 3fd6b5e0-8910-4b1c-a7d0-5b84de329012 + type: get_topics_with_cluster_points_response + schema: + $ref: "#/components/schemas/LLMObsPatternsTopicsWithClusteredPointsResponse" + 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" + "500": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Internal Server Error + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: List patterns topics with clustered points + 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/{project_id}/datasets: get: description: List all LLM Observability datasets for a project, sorted by creation date, newest first. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index b1da8ec6fc..e30da03192 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -22061,6 +22061,335 @@ datadog\_api\_client.v2.model.llm\_obs\_open\_ai\_reasoning\_summary module :members: :show-inheritance: +datadog\_api\_client.v2.model.llm\_obs\_patterns\_activity\_progress module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_activity_progress + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_clustered\_point module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_clustered_point + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_clustered\_point\_ref module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_clustered_point_ref + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_clustered\_points\_response module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_clustered\_points\_response\_attributes module +------------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_clustered\_points\_response\_data module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_clustered\_points\_type module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_clustered_points_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_attributes module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_item module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_response\_data module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_snapshot module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_snapshot + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_type module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_upsert\_request module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_upsert\_request\_attributes module +-------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_config\_upsert\_request\_data module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_configs\_list\_type module +---------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_configs_list_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_configs\_response module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_configs_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_configs\_response\_attributes module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_configs_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_configs\_response\_data module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_configs_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_request\_type module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_request_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_run\_status\_response module +------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_run_status_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_run\_status\_response\_attributes module +------------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_run_status_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_run\_status\_response\_data module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_run_status_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_run\_status\_type module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_run_status_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_run\_summary module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_run_summary + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_runs\_list\_type module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_runs_list_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_runs\_response module +----------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_runs_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_runs\_response\_attributes module +----------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_runs_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_runs\_response\_data module +----------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_runs_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topic module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topic + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topic\_with\_clustered\_points module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topic_with_clustered_points + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_response module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_response\_attributes module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_response\_data module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_type module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_with\_clustered\_points\_response module +-------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_with\_clustered\_points\_response\_attributes module +-------------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_with\_clustered\_points\_response\_data module +-------------------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_topics\_with\_clustered\_points\_type module +---------------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_type + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_trigger\_request module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_trigger_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_trigger\_request\_attributes module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_trigger_request_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_trigger\_request\_data module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_trigger_request_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_trigger\_response module +-------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_trigger_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_trigger\_response\_attributes module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_trigger_response_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_trigger\_response\_data module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_trigger_response_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.llm\_obs\_patterns\_trigger\_response\_type module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.llm_obs_patterns_trigger_response_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.llm\_obs\_project\_data\_attributes\_request module --------------------------------------------------------------------------------- diff --git a/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.py b/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.py new file mode 100644 index 0000000000..fc94642ff2 --- /dev/null +++ b/examples/v2/llm-observability/DeleteLLMObsPatternsConfig.py @@ -0,0 +1,14 @@ +""" +Delete a patterns configuration returns "No Content" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["delete_llm_obs_patterns_config"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + api_instance.delete_llm_obs_patterns_config( + config_id="config_id", + ) diff --git a/examples/v2/llm-observability/GetLLMObsPatternsConfig.py b/examples/v2/llm-observability/GetLLMObsPatternsConfig.py new file mode 100644 index 0000000000..3c9ac87ad5 --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPatternsConfig.py @@ -0,0 +1,14 @@ +""" +Get a patterns configuration returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["get_llm_obs_patterns_config"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.get_llm_obs_patterns_config() + + print(response) diff --git a/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.py b/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.py new file mode 100644 index 0000000000..fad239522c --- /dev/null +++ b/examples/v2/llm-observability/GetLLMObsPatternsRunStatus.py @@ -0,0 +1,16 @@ +""" +Get patterns run status returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["get_llm_obs_patterns_run_status"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.get_llm_obs_patterns_run_status( + config_id="config_id", + ) + + print(response) diff --git a/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.py b/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.py new file mode 100644 index 0000000000..5b9174b7a6 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsClusteredPoints.py @@ -0,0 +1,16 @@ +""" +List patterns clustered points returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["list_llm_obs_patterns_clustered_points"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.list_llm_obs_patterns_clustered_points( + topic_id="topic_id", + ) + + print(response) diff --git a/examples/v2/llm-observability/ListLLMObsPatternsConfigs.py b/examples/v2/llm-observability/ListLLMObsPatternsConfigs.py new file mode 100644 index 0000000000..161feea78c --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsConfigs.py @@ -0,0 +1,14 @@ +""" +List patterns configurations returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["list_llm_obs_patterns_configs"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.list_llm_obs_patterns_configs() + + print(response) diff --git a/examples/v2/llm-observability/ListLLMObsPatternsRuns.py b/examples/v2/llm-observability/ListLLMObsPatternsRuns.py new file mode 100644 index 0000000000..9eb0d769d4 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsRuns.py @@ -0,0 +1,16 @@ +""" +List patterns runs returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["list_llm_obs_patterns_runs"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.list_llm_obs_patterns_runs( + config_id="config_id", + ) + + print(response) diff --git a/examples/v2/llm-observability/ListLLMObsPatternsTopics.py b/examples/v2/llm-observability/ListLLMObsPatternsTopics.py new file mode 100644 index 0000000000..d14f6a5241 --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsTopics.py @@ -0,0 +1,16 @@ +""" +List patterns topics returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["list_llm_obs_patterns_topics"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.list_llm_obs_patterns_topics( + config_id="config_id", + ) + + print(response) diff --git a/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.py b/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.py new file mode 100644 index 0000000000..633ef0e56b --- /dev/null +++ b/examples/v2/llm-observability/ListLLMObsPatternsTopicsWithClusteredPoints.py @@ -0,0 +1,16 @@ +""" +List patterns topics with clustered points returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi + +configuration = Configuration() +configuration.unstable_operations["list_llm_obs_patterns_topics_with_clustered_points"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.list_llm_obs_patterns_topics_with_clustered_points( + config_id="config_id", + ) + + print(response) diff --git a/examples/v2/llm-observability/TriggerLLMObsPatterns.py b/examples/v2/llm-observability/TriggerLLMObsPatterns.py new file mode 100644 index 0000000000..577e20f221 --- /dev/null +++ b/examples/v2/llm-observability/TriggerLLMObsPatterns.py @@ -0,0 +1,29 @@ +""" +Trigger a patterns run returns "Accepted" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi +from datadog_api_client.v2.model.llm_obs_patterns_request_type import LLMObsPatternsRequestType +from datadog_api_client.v2.model.llm_obs_patterns_trigger_request import LLMObsPatternsTriggerRequest +from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_attributes import ( + LLMObsPatternsTriggerRequestAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_data import LLMObsPatternsTriggerRequestData + +body = LLMObsPatternsTriggerRequest( + data=LLMObsPatternsTriggerRequestData( + attributes=LLMObsPatternsTriggerRequestAttributes( + config_id="a7c8d9e0-1234-5678-9abc-def012345678", + ), + type=LLMObsPatternsRequestType.TOPIC_DISCOVERY, + ), +) + +configuration = Configuration() +configuration.unstable_operations["trigger_llm_obs_patterns"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.trigger_llm_obs_patterns(body=body) + + print(response) diff --git a/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.py b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.py new file mode 100644 index 0000000000..9598d569f4 --- /dev/null +++ b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.py @@ -0,0 +1,41 @@ +""" +Create or update a patterns configuration returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.llm_observability_api import LLMObservabilityApi +from datadog_api_client.v2.model.llm_obs_patterns_config_type import LLMObsPatternsConfigType +from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request import LLMObsPatternsConfigUpsertRequest +from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_attributes import ( + LLMObsPatternsConfigUpsertRequestAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_data import ( + LLMObsPatternsConfigUpsertRequestData, +) + +body = LLMObsPatternsConfigUpsertRequest( + data=LLMObsPatternsConfigUpsertRequestData( + attributes=LLMObsPatternsConfigUpsertRequestAttributes( + account_id="1000000001", + config_id="a7c8d9e0-1234-5678-9abc-def012345678", + evp_query="@ml_app:support-bot", + hierarchy_depth=2, + integration_provider="openai", + model_name="gpt-4o", + name="Support chatbot topics", + num_records=1000, + sampling_ratio=0.1, + scope="", + template="", + ), + type=LLMObsPatternsConfigType.TOPIC_DISCOVERY_CONFIGS, + ), +) + +configuration = Configuration() +configuration.unstable_operations["upsert_llm_obs_patterns_config"] = True +with ApiClient(configuration) as api_client: + api_instance = LLMObservabilityApi(api_client) + response = api_instance.upsert_llm_obs_patterns_config(body=body) + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 8e0043876e..a0729d5c85 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -282,6 +282,7 @@ def __init__( "v2.delete_llm_obs_dataset_records": False, "v2.delete_llm_obs_datasets": False, "v2.delete_llm_obs_experiments": False, + "v2.delete_llm_obs_patterns_config": False, "v2.delete_llm_obs_projects": False, "v2.export_llm_obs_dataset": False, "v2.get_llm_obs_annotated_interactions": False, @@ -289,6 +290,8 @@ def __init__( "v2.get_llm_obs_annotation_queue_label_schema": False, "v2.get_llm_obs_custom_eval_config": False, "v2.get_llm_obs_dataset_draft_state": False, + "v2.get_llm_obs_patterns_config": False, + "v2.get_llm_obs_patterns_run_status": False, "v2.list_llm_obs_annotation_queues": False, "v2.list_llm_obs_dataset_records": False, "v2.list_llm_obs_datasets": False, @@ -299,6 +302,11 @@ def __init__( "v2.list_llm_obs_experiments": False, "v2.list_llm_obs_integration_accounts": False, "v2.list_llm_obs_integration_models": False, + "v2.list_llm_obs_patterns_clustered_points": False, + "v2.list_llm_obs_patterns_configs": False, + "v2.list_llm_obs_patterns_runs": False, + "v2.list_llm_obs_patterns_topics": False, + "v2.list_llm_obs_patterns_topics_with_clustered_points": False, "v2.list_llm_obs_projects": False, "v2.list_llm_obs_spans": False, "v2.lock_llm_obs_dataset_draft_state": False, @@ -306,6 +314,7 @@ def __init__( "v2.search_llm_obs_experimentation": False, "v2.search_llm_obs_spans": False, "v2.simple_search_llm_obs_experimentation": False, + "v2.trigger_llm_obs_patterns": False, "v2.unlock_llm_obs_dataset_draft_state": False, "v2.update_llm_obs_annotation_queue": False, "v2.update_llm_obs_annotation_queue_label_schema": False, @@ -316,6 +325,7 @@ def __init__( "v2.update_llm_obs_project": False, "v2.upload_llm_obs_dataset_records_file": False, "v2.upsert_llm_obs_annotations": False, + "v2.upsert_llm_obs_patterns_config": False, "v2.create_annotation": False, "v2.delete_annotation": False, "v2.get_page_annotations": False, diff --git a/src/datadog_api_client/v2/api/llm_observability_api.py b/src/datadog_api_client/v2/api/llm_observability_api.py index 4aa64adc26..8286556462 100644 --- a/src/datadog_api_client/v2/api/llm_observability_api.py +++ b/src/datadog_api_client/v2/api/llm_observability_api.py @@ -75,6 +75,18 @@ from datadog_api_client.v2.model.llm_obs_project_update_request import LLMObsProjectUpdateRequest from datadog_api_client.v2.model.llm_obs_spans_response import LLMObsSpansResponse from datadog_api_client.v2.model.llm_obs_search_spans_request import LLMObsSearchSpansRequest +from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response import LLMObsPatternsClusteredPointsResponse +from datadog_api_client.v2.model.llm_obs_patterns_configs_response import LLMObsPatternsConfigsResponse +from datadog_api_client.v2.model.llm_obs_patterns_config_response import LLMObsPatternsConfigResponse +from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request import LLMObsPatternsConfigUpsertRequest +from datadog_api_client.v2.model.llm_obs_patterns_runs_response import LLMObsPatternsRunsResponse +from datadog_api_client.v2.model.llm_obs_patterns_trigger_response import LLMObsPatternsTriggerResponse +from datadog_api_client.v2.model.llm_obs_patterns_trigger_request import LLMObsPatternsTriggerRequest +from datadog_api_client.v2.model.llm_obs_patterns_run_status_response import LLMObsPatternsRunStatusResponse +from datadog_api_client.v2.model.llm_obs_patterns_topics_response import LLMObsPatternsTopicsResponse +from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response import ( + LLMObsPatternsTopicsWithClusteredPointsResponse, +) from datadog_api_client.v2.model.llm_obs_datasets_response import LLMObsDatasetsResponse from datadog_api_client.v2.model.llm_obs_dataset_response import LLMObsDatasetResponse from datadog_api_client.v2.model.llm_obs_dataset_request import LLMObsDatasetRequest @@ -586,6 +598,29 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._delete_llm_obs_patterns_config_endpoint = _Endpoint( + settings={ + "response_type": None, + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-configs/{config_id}", + "operation_id": "delete_llm_obs_patterns_config", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "config_id": { + "required": True, + "openapi_types": (str,), + "attribute": "config_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["*/*"], + }, + api_client=api_client, + ) + self._delete_llm_obs_projects_endpoint = _Endpoint( settings={ "response_type": None, @@ -788,6 +823,45 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._get_llm_obs_patterns_config_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsConfigResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-configs/latest", + "operation_id": "get_llm_obs_patterns_config", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._get_llm_obs_patterns_run_status_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsRunStatusResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-runs/status", + "operation_id": "get_llm_obs_patterns_run_status", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "config_id": { + "required": True, + "openapi_types": (str,), + "attribute": "config_id", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_llm_obs_annotation_queues_endpoint = _Endpoint( settings={ "response_type": (LLMObsAnnotationQueuesResponse,), @@ -1143,6 +1217,139 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_llm_obs_patterns_clustered_points_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsClusteredPointsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-clustered-points", + "operation_id": "list_llm_obs_patterns_clustered_points", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "topic_id": { + "required": True, + "openapi_types": (str,), + "attribute": "topic_id", + "location": "query", + }, + "page_size": { + "openapi_types": (int,), + "attribute": "page_size", + "location": "query", + }, + "page_token": { + "openapi_types": (str,), + "attribute": "page_token", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_llm_obs_patterns_configs_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsConfigsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-configs", + "operation_id": "list_llm_obs_patterns_configs", + "http_method": "GET", + "version": "v2", + }, + params_map={}, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_llm_obs_patterns_runs_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsRunsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-runs", + "operation_id": "list_llm_obs_patterns_runs", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "config_id": { + "required": True, + "openapi_types": (str,), + "attribute": "config_id", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_llm_obs_patterns_topics_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsTopicsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-topics", + "operation_id": "list_llm_obs_patterns_topics", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "config_id": { + "required": True, + "openapi_types": (str,), + "attribute": "config_id", + "location": "query", + }, + "run_id": { + "openapi_types": (str,), + "attribute": "run_id", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._list_llm_obs_patterns_topics_with_clustered_points_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsTopicsWithClusteredPointsResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-topics/with-cluster-points", + "operation_id": "list_llm_obs_patterns_topics_with_clustered_points", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "config_id": { + "required": True, + "openapi_types": (str,), + "attribute": "config_id", + "location": "query", + }, + "run_id": { + "openapi_types": (str,), + "attribute": "run_id", + "location": "query", + }, + "include_metrics": { + "openapi_types": (bool,), + "attribute": "include_metrics", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_llm_obs_projects_endpoint = _Endpoint( settings={ "response_type": (LLMObsProjectsResponse,), @@ -1378,6 +1585,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._trigger_llm_obs_patterns_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsTriggerResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-runs", + "operation_id": "trigger_llm_obs_patterns", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (LLMObsPatternsTriggerRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._unlock_llm_obs_dataset_draft_state_endpoint = _Endpoint( settings={ "response_type": None, @@ -1680,6 +1907,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._upsert_llm_obs_patterns_config_endpoint = _Endpoint( + settings={ + "response_type": (LLMObsPatternsConfigResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/llm-obs/v1/topic-discovery-configs", + "operation_id": "upsert_llm_obs_patterns_config", + "http_method": "PUT", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (LLMObsPatternsConfigUpsertRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + def aggregate_llm_obs_experimentation( self, body: LLMObsExperimentationAnalyticsRequest, @@ -2098,6 +2345,23 @@ def delete_llm_obs_experiments( return self._delete_llm_obs_experiments_endpoint.call_with_http_info(**kwargs) + def delete_llm_obs_patterns_config( + self, + config_id: str, + ) -> None: + """Delete a patterns configuration. + + Delete a patterns configuration by its ID. + + :param config_id: The ID of the patterns configuration. + :type config_id: str + :rtype: None + """ + kwargs: Dict[str, Any] = {} + kwargs["config_id"] = config_id + + return self._delete_llm_obs_patterns_config_endpoint.call_with_http_info(**kwargs) + def delete_llm_obs_projects( self, body: LLMObsDeleteProjectsRequest, @@ -2254,6 +2518,36 @@ def get_llm_obs_dataset_draft_state( return self._get_llm_obs_dataset_draft_state_endpoint.call_with_http_info(**kwargs) + def get_llm_obs_patterns_config( + self, + ) -> LLMObsPatternsConfigResponse: + """Get a patterns configuration. + + Retrieve the patterns configuration for the organization. + + :rtype: LLMObsPatternsConfigResponse + """ + kwargs: Dict[str, Any] = {} + return self._get_llm_obs_patterns_config_endpoint.call_with_http_info(**kwargs) + + def get_llm_obs_patterns_run_status( + self, + config_id: str, + ) -> LLMObsPatternsRunStatusResponse: + """Get patterns run status. + + Retrieve the status and step-by-step progress of the current or most recent + patterns run for a configuration. + + :param config_id: The ID of the patterns configuration. + :type config_id: str + :rtype: LLMObsPatternsRunStatusResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["config_id"] = config_id + + return self._get_llm_obs_patterns_run_status_endpoint.call_with_http_info(**kwargs) + def list_llm_obs_annotation_queues( self, *, @@ -2578,6 +2872,124 @@ def list_llm_obs_integration_models( return self._list_llm_obs_integration_models_endpoint.call_with_http_info(**kwargs) + def list_llm_obs_patterns_clustered_points( + self, + topic_id: str, + *, + page_size: Union[int, UnsetType] = unset, + page_token: Union[str, UnsetType] = unset, + ) -> LLMObsPatternsClusteredPointsResponse: + """List patterns clustered points. + + List the data points grouped into a topic. For a parent topic, points from all + of its leaf topics are returned. + + :param topic_id: The ID of the topic to retrieve clustered points for. + :type topic_id: str + :param page_size: Maximum number of clustered points to return per page. + :type page_size: int, optional + :param page_token: Pagination token to retrieve the next page of clustered points. + :type page_token: str, optional + :rtype: LLMObsPatternsClusteredPointsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["topic_id"] = topic_id + + if page_size is not unset: + kwargs["page_size"] = page_size + + if page_token is not unset: + kwargs["page_token"] = page_token + + return self._list_llm_obs_patterns_clustered_points_endpoint.call_with_http_info(**kwargs) + + def list_llm_obs_patterns_configs( + self, + ) -> LLMObsPatternsConfigsResponse: + """List patterns configurations. + + List all patterns configurations for the organization. + + :rtype: LLMObsPatternsConfigsResponse + """ + kwargs: Dict[str, Any] = {} + return self._list_llm_obs_patterns_configs_endpoint.call_with_http_info(**kwargs) + + def list_llm_obs_patterns_runs( + self, + config_id: str, + ) -> LLMObsPatternsRunsResponse: + """List patterns runs. + + List the completed patterns runs for a configuration. + + :param config_id: The ID of the patterns configuration. + :type config_id: str + :rtype: LLMObsPatternsRunsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["config_id"] = config_id + + return self._list_llm_obs_patterns_runs_endpoint.call_with_http_info(**kwargs) + + def list_llm_obs_patterns_topics( + self, + config_id: str, + *, + run_id: Union[str, UnsetType] = unset, + ) -> LLMObsPatternsTopicsResponse: + """List patterns topics. + + List the topics discovered by a patterns run. When no run is specified, + the most recent completed run is used. + + :param config_id: The ID of the patterns configuration. + :type config_id: str + :param run_id: The ID of a specific patterns run. Defaults to the most recent completed run. + :type run_id: str, optional + :rtype: LLMObsPatternsTopicsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["config_id"] = config_id + + if run_id is not unset: + kwargs["run_id"] = run_id + + return self._list_llm_obs_patterns_topics_endpoint.call_with_http_info(**kwargs) + + def list_llm_obs_patterns_topics_with_clustered_points( + self, + config_id: str, + *, + run_id: Union[str, UnsetType] = unset, + include_metrics: Union[bool, UnsetType] = unset, + ) -> LLMObsPatternsTopicsWithClusteredPointsResponse: + """List patterns topics with clustered points. + + 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 config_id: The ID of the patterns configuration. + :type config_id: str + :param run_id: The ID of a specific patterns run. Defaults to the most recent completed run. + :type run_id: str, optional + :param include_metrics: When true, enrich each clustered point with span metrics such as status, + duration, token counts, estimated cost, and evaluations. + :type include_metrics: bool, optional + :rtype: LLMObsPatternsTopicsWithClusteredPointsResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["config_id"] = config_id + + if run_id is not unset: + kwargs["run_id"] = run_id + + if include_metrics is not unset: + kwargs["include_metrics"] = include_metrics + + return self._list_llm_obs_patterns_topics_with_clustered_points_endpoint.call_with_http_info(**kwargs) + def list_llm_obs_projects( self, *, @@ -2807,6 +3219,23 @@ def simple_search_llm_obs_experimentation( return self._simple_search_llm_obs_experimentation_endpoint.call_with_http_info(**kwargs) + def trigger_llm_obs_patterns( + self, + body: LLMObsPatternsTriggerRequest, + ) -> LLMObsPatternsTriggerResponse: + """Trigger a patterns run. + + Start a patterns run for a given configuration. The run executes asynchronously. + + :param body: Trigger patterns payload. + :type body: LLMObsPatternsTriggerRequest + :rtype: LLMObsPatternsTriggerResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._trigger_llm_obs_patterns_endpoint.call_with_http_info(**kwargs) + def unlock_llm_obs_dataset_draft_state( self, project_id: str, @@ -3080,3 +3509,20 @@ def upsert_llm_obs_annotations( kwargs["body"] = body return self._upsert_llm_obs_annotations_endpoint.call_with_http_info(**kwargs) + + def upsert_llm_obs_patterns_config( + self, + body: LLMObsPatternsConfigUpsertRequest, + ) -> LLMObsPatternsConfigResponse: + """Create or update a patterns configuration. + + Create a new patterns configuration, or update an existing one when a configuration ID is provided. + + :param body: Patterns configuration payload. + :type body: LLMObsPatternsConfigUpsertRequest + :rtype: LLMObsPatternsConfigResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._upsert_llm_obs_patterns_config_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_activity_progress.py b/src/datadog_api_client/v2/model/llm_obs_patterns_activity_progress.py new file mode 100644 index 0000000000..6b91fc78bb --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_activity_progress.py @@ -0,0 +1,51 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, + unset, + UnsetType, +) + + +class LLMObsPatternsActivityProgress(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "started_at": (datetime, none_type), + "status": (str,), + } + + attribute_map = { + "name": "name", + "started_at": "started_at", + "status": "status", + } + + def __init__(self_, name: str, status: str, started_at: Union[datetime, none_type, UnsetType] = unset, **kwargs): + """ + Progress information for a single step of a patterns run. + + :param name: Name of the step. + :type name: str + + :param started_at: Timestamp when the step started. Null if the step has not started. + :type started_at: datetime, none_type, optional + + :param status: Status of the step. + :type status: str + """ + if started_at is not unset: + kwargs["started_at"] = started_at + super().__init__(kwargs) + + self_.name = name + self_.status = status diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_point.py b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_point.py new file mode 100644 index 0000000000..aa83507a23 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_point.py @@ -0,0 +1,86 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class LLMObsPatternsClusteredPoint(ModelNormal): + @cached_property + def openapi_types(_): + return { + "event_id": (str,), + "id": (str,), + "input": (str,), + "is_included": (bool,), + "is_suggested": (bool,), + "session_id": (str,), + "span_id": (str,), + "topic_id": (str,), + } + + attribute_map = { + "event_id": "event_id", + "id": "id", + "input": "input", + "is_included": "is_included", + "is_suggested": "is_suggested", + "session_id": "session_id", + "span_id": "span_id", + "topic_id": "topic_id", + } + + def __init__( + self_, + event_id: str, + id: str, + input: str, + is_included: bool, + is_suggested: bool, + session_id: str, + span_id: str, + topic_id: str, + **kwargs, + ): + """ + A single data point grouped into a topic. + + :param event_id: Identifier of the source event. + :type event_id: str + + :param id: Unique identifier of the clustered point. + :type id: str + + :param input: Input text of the source span. + :type input: str + + :param is_included: Whether the point is included in the patterns dataset. + :type is_included: bool + + :param is_suggested: Whether the point is suggested for inclusion in the patterns dataset. + :type is_suggested: bool + + :param session_id: Identifier of the source session. + :type session_id: str + + :param span_id: Identifier of the source span. + :type span_id: str + + :param topic_id: Identifier of the topic the point belongs to. + :type topic_id: str + """ + super().__init__(kwargs) + + self_.event_id = event_id + self_.id = id + self_.input = input + self_.is_included = is_included + self_.is_suggested = is_suggested + self_.session_id = session_id + self_.span_id = span_id + self_.topic_id = topic_id diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_point_ref.py b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_point_ref.py new file mode 100644 index 0000000000..64739f2be4 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_point_ref.py @@ -0,0 +1,117 @@ +# 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. +from __future__ import annotations + +from typing import Any, Dict, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + date, + datetime, + none_type, + unset, + UnsetType, + UUID, +) + + +class LLMObsPatternsClusteredPointRef(ModelNormal): + @cached_property + def openapi_types(_): + return { + "duration": (float,), + "estimated_total_cost": (float,), + "evaluation": ( + { + str: ( + bool, + date, + datetime, + dict, + float, + int, + list, + str, + UUID, + none_type, + ) + }, + ), + "input_tokens": (float,), + "output_tokens": (float,), + "span_id": (str,), + "status": (str,), + "total_tokens": (float,), + } + + attribute_map = { + "duration": "duration", + "estimated_total_cost": "estimated_total_cost", + "evaluation": "evaluation", + "input_tokens": "input_tokens", + "output_tokens": "output_tokens", + "span_id": "span_id", + "status": "status", + "total_tokens": "total_tokens", + } + + def __init__( + self_, + span_id: str, + duration: Union[float, UnsetType] = unset, + estimated_total_cost: Union[float, UnsetType] = unset, + evaluation: Union[Dict[str, Any], UnsetType] = unset, + input_tokens: Union[float, UnsetType] = unset, + output_tokens: Union[float, UnsetType] = unset, + status: Union[str, UnsetType] = unset, + total_tokens: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + A clustered point attached inline to a topic. The metric fields are populated + only when the request includes ``include_metrics=true``. + + :param duration: Duration of the source span in nanoseconds. Included only when metrics are requested. + :type duration: float, optional + + :param estimated_total_cost: Estimated total cost of the source span. Included only when metrics are requested. + :type estimated_total_cost: float, optional + + :param evaluation: Evaluation results for the source span keyed by evaluation name. Included + only when metrics are requested. + :type evaluation: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional + + :param input_tokens: Number of input tokens of the source span. Included only when metrics are requested. + :type input_tokens: float, optional + + :param output_tokens: Number of output tokens of the source span. Included only when metrics are requested. + :type output_tokens: float, optional + + :param span_id: Identifier of the source span. + :type span_id: str + + :param status: Status of the source span. Included only when metrics are requested. + :type status: str, optional + + :param total_tokens: Total number of tokens of the source span. Included only when metrics are requested. + :type total_tokens: float, optional + """ + if duration is not unset: + kwargs["duration"] = duration + if estimated_total_cost is not unset: + kwargs["estimated_total_cost"] = estimated_total_cost + if evaluation is not unset: + kwargs["evaluation"] = evaluation + if input_tokens is not unset: + kwargs["input_tokens"] = input_tokens + if output_tokens is not unset: + kwargs["output_tokens"] = output_tokens + if status is not unset: + kwargs["status"] = status + if total_tokens is not unset: + kwargs["total_tokens"] = total_tokens + super().__init__(kwargs) + + self_.span_id = span_id diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response.py new file mode 100644 index 0000000000..ed9cf415d1 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response.py @@ -0,0 +1,44 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_data import ( + LLMObsPatternsClusteredPointsResponseData, + ) + + +class LLMObsPatternsClusteredPointsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_data import ( + LLMObsPatternsClusteredPointsResponseData, + ) + + return { + "data": (LLMObsPatternsClusteredPointsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsClusteredPointsResponseData, **kwargs): + """ + Response containing the clustered points of an LLM Observability topic. + + :param data: Data object of an LLM Observability patterns clustered points response. + :type data: LLMObsPatternsClusteredPointsResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response_attributes.py new file mode 100644 index 0000000000..21c789d267 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response_attributes.py @@ -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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_clustered_point import LLMObsPatternsClusteredPoint + + +class LLMObsPatternsClusteredPointsResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_clustered_point import LLMObsPatternsClusteredPoint + + return { + "next_page_token": (str, none_type), + "points": ([LLMObsPatternsClusteredPoint],), + "topic_id": (str,), + } + + attribute_map = { + "next_page_token": "next_page_token", + "points": "points", + "topic_id": "topic_id", + } + + def __init__( + self_, + next_page_token: Union[str, none_type], + points: List[LLMObsPatternsClusteredPoint], + topic_id: str, + **kwargs, + ): + """ + Attributes of an LLM Observability patterns clustered points response. + + :param next_page_token: Pagination token for the next page of points. Null if there are no more pages. + :type next_page_token: str, none_type + + :param points: List of clustered points. + :type points: [LLMObsPatternsClusteredPoint] + + :param topic_id: Identifier of the topic the points belong to. + :type topic_id: str + """ + super().__init__(kwargs) + + self_.next_page_token = next_page_token + self_.points = points + self_.topic_id = topic_id diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response_data.py new file mode 100644 index 0000000000..4f4a05fd79 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_response_data.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_attributes import ( + LLMObsPatternsClusteredPointsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_type import LLMObsPatternsClusteredPointsType + + +class LLMObsPatternsClusteredPointsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_attributes import ( + LLMObsPatternsClusteredPointsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_type import LLMObsPatternsClusteredPointsType + + return { + "attributes": (LLMObsPatternsClusteredPointsResponseAttributes,), + "id": (str,), + "type": (LLMObsPatternsClusteredPointsType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: LLMObsPatternsClusteredPointsResponseAttributes, + id: str, + type: LLMObsPatternsClusteredPointsType, + **kwargs, + ): + """ + Data object of an LLM Observability patterns clustered points response. + + :param attributes: Attributes of an LLM Observability patterns clustered points response. + :type attributes: LLMObsPatternsClusteredPointsResponseAttributes + + :param id: Identifier of the topic the points belong to. + :type id: str + + :param type: Resource type of an LLM Observability patterns clustered points response. + :type type: LLMObsPatternsClusteredPointsType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_type.py new file mode 100644 index 0000000000..6136d3c40d --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_clustered_points_type.py @@ -0,0 +1,37 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsClusteredPointsType(ModelSimple): + """ + Resource type of an LLM Observability patterns clustered points response. + + :param value: If omitted defaults to "clustered_points_response". Must be one of ["clustered_points_response"]. + :type value: str + """ + + allowed_values = { + "clustered_points_response", + } + CLUSTERED_POINTS_RESPONSE: ClassVar["LLMObsPatternsClusteredPointsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsClusteredPointsType.CLUSTERED_POINTS_RESPONSE = LLMObsPatternsClusteredPointsType( + "clustered_points_response" +) diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_attributes.py new file mode 100644 index 0000000000..0abcad68e0 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_attributes.py @@ -0,0 +1,132 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, + unset, + UnsetType, +) + + +class LLMObsPatternsConfigAttributes(ModelNormal): + validations = { + "hierarchy_depth": { + "inclusive_maximum": 2147483647, + }, + "num_records": { + "inclusive_maximum": 2147483647, + }, + } + + @cached_property + def openapi_types(_): + return { + "account_id": (str, none_type), + "created_at": (datetime,), + "evp_query": (str,), + "hierarchy_depth": (int,), + "integration_provider": (str, none_type), + "model_name": (str, none_type), + "name": (str,), + "num_records": (int,), + "sampling_ratio": (float,), + "scope": (str,), + "template": (str, none_type), + "updated_at": (datetime,), + } + + attribute_map = { + "account_id": "account_id", + "created_at": "created_at", + "evp_query": "evp_query", + "hierarchy_depth": "hierarchy_depth", + "integration_provider": "integration_provider", + "model_name": "model_name", + "name": "name", + "num_records": "num_records", + "sampling_ratio": "sampling_ratio", + "scope": "scope", + "template": "template", + "updated_at": "updated_at", + } + + def __init__( + self_, + created_at: datetime, + evp_query: str, + hierarchy_depth: int, + name: str, + num_records: int, + sampling_ratio: float, + scope: str, + updated_at: datetime, + account_id: Union[str, none_type, UnsetType] = unset, + integration_provider: Union[str, none_type, UnsetType] = unset, + model_name: Union[str, none_type, UnsetType] = unset, + template: Union[str, none_type, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an LLM Observability patterns configuration. + + :param account_id: Integration account ID for a bring-your-own-model configuration. + :type account_id: str, none_type, optional + + :param created_at: Timestamp when the configuration was created. + :type created_at: datetime + + :param evp_query: Query that selects the spans the patterns run analyzes. + :type evp_query: str + + :param hierarchy_depth: Depth of the topic hierarchy to generate. + :type hierarchy_depth: int + + :param integration_provider: Integration provider for a bring-your-own-model configuration. + :type integration_provider: str, none_type, optional + + :param model_name: Model name for a bring-your-own-model configuration. + :type model_name: str, none_type, optional + + :param name: Name of the configuration. + :type name: str + + :param num_records: Maximum number of records to process for the run. + :type num_records: int + + :param sampling_ratio: Fraction of matching spans to sample for the run. + :type sampling_ratio: float + + :param scope: Scope of the configuration. + :type scope: str + + :param template: Template used to guide topic generation. + :type template: str, none_type, optional + + :param updated_at: Timestamp when the configuration was last updated. + :type updated_at: datetime + """ + if account_id is not unset: + kwargs["account_id"] = account_id + if integration_provider is not unset: + kwargs["integration_provider"] = integration_provider + if model_name is not unset: + kwargs["model_name"] = model_name + if template is not unset: + kwargs["template"] = template + super().__init__(kwargs) + + self_.created_at = created_at + self_.evp_query = evp_query + self_.hierarchy_depth = hierarchy_depth + self_.name = name + self_.num_records = num_records + self_.sampling_ratio = sampling_ratio + self_.scope = scope + self_.updated_at = updated_at diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_item.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_item.py new file mode 100644 index 0000000000..32b5f46226 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_item.py @@ -0,0 +1,139 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, + unset, + UnsetType, +) + + +class LLMObsPatternsConfigItem(ModelNormal): + validations = { + "hierarchy_depth": { + "inclusive_maximum": 2147483647, + }, + "num_records": { + "inclusive_maximum": 2147483647, + }, + } + + @cached_property + def openapi_types(_): + return { + "account_id": (str, none_type), + "created_at": (datetime,), + "evp_query": (str,), + "hierarchy_depth": (int,), + "id": (str,), + "integration_provider": (str, none_type), + "model_name": (str, none_type), + "name": (str,), + "num_records": (int,), + "sampling_ratio": (float,), + "scope": (str,), + "template": (str, none_type), + "updated_at": (datetime,), + } + + attribute_map = { + "account_id": "account_id", + "created_at": "created_at", + "evp_query": "evp_query", + "hierarchy_depth": "hierarchy_depth", + "id": "id", + "integration_provider": "integration_provider", + "model_name": "model_name", + "name": "name", + "num_records": "num_records", + "sampling_ratio": "sampling_ratio", + "scope": "scope", + "template": "template", + "updated_at": "updated_at", + } + + def __init__( + self_, + created_at: datetime, + evp_query: str, + hierarchy_depth: int, + id: str, + name: str, + num_records: int, + sampling_ratio: float, + scope: str, + updated_at: datetime, + account_id: Union[str, none_type, UnsetType] = unset, + integration_provider: Union[str, none_type, UnsetType] = unset, + model_name: Union[str, none_type, UnsetType] = unset, + template: Union[str, none_type, UnsetType] = unset, + **kwargs, + ): + """ + A single LLM Observability patterns configuration in a list response. + + :param account_id: Integration account ID for a bring-your-own-model configuration. + :type account_id: str, none_type, optional + + :param created_at: Timestamp when the configuration was created. + :type created_at: datetime + + :param evp_query: Query that selects the spans the patterns run analyzes. + :type evp_query: str + + :param hierarchy_depth: Depth of the topic hierarchy to generate. + :type hierarchy_depth: int + + :param id: Unique identifier of the configuration. + :type id: str + + :param integration_provider: Integration provider for a bring-your-own-model configuration. + :type integration_provider: str, none_type, optional + + :param model_name: Model name for a bring-your-own-model configuration. + :type model_name: str, none_type, optional + + :param name: Name of the configuration. + :type name: str + + :param num_records: Maximum number of records to process for the run. + :type num_records: int + + :param sampling_ratio: Fraction of matching spans to sample for the run. + :type sampling_ratio: float + + :param scope: Scope of the configuration. + :type scope: str + + :param template: Template used to guide topic generation. + :type template: str, none_type, optional + + :param updated_at: Timestamp when the configuration was last updated. + :type updated_at: datetime + """ + if account_id is not unset: + kwargs["account_id"] = account_id + if integration_provider is not unset: + kwargs["integration_provider"] = integration_provider + if model_name is not unset: + kwargs["model_name"] = model_name + if template is not unset: + kwargs["template"] = template + super().__init__(kwargs) + + self_.created_at = created_at + self_.evp_query = evp_query + self_.hierarchy_depth = hierarchy_depth + self_.id = id + self_.name = name + self_.num_records = num_records + self_.sampling_ratio = sampling_ratio + self_.scope = scope + self_.updated_at = updated_at diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_response.py new file mode 100644 index 0000000000..8abd4d7801 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_response.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_response_data import LLMObsPatternsConfigResponseData + + +class LLMObsPatternsConfigResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_response_data import LLMObsPatternsConfigResponseData + + return { + "data": (LLMObsPatternsConfigResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsConfigResponseData, **kwargs): + """ + Response containing a single LLM Observability patterns configuration. + + :param data: Data object of an LLM Observability patterns configuration. + :type data: LLMObsPatternsConfigResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_response_data.py new file mode 100644 index 0000000000..a8d9dd036d --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_response_data.py @@ -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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_attributes import LLMObsPatternsConfigAttributes + from datadog_api_client.v2.model.llm_obs_patterns_config_type import LLMObsPatternsConfigType + + +class LLMObsPatternsConfigResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_attributes import LLMObsPatternsConfigAttributes + from datadog_api_client.v2.model.llm_obs_patterns_config_type import LLMObsPatternsConfigType + + return { + "attributes": (LLMObsPatternsConfigAttributes,), + "id": (str,), + "type": (LLMObsPatternsConfigType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: LLMObsPatternsConfigAttributes, id: str, type: LLMObsPatternsConfigType, **kwargs): + """ + Data object of an LLM Observability patterns configuration. + + :param attributes: Attributes of an LLM Observability patterns configuration. + :type attributes: LLMObsPatternsConfigAttributes + + :param id: Unique identifier of the configuration. + :type id: str + + :param type: Resource type of an LLM Observability patterns configuration. + :type type: LLMObsPatternsConfigType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_snapshot.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_snapshot.py new file mode 100644 index 0000000000..4a38a6d9a1 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_snapshot.py @@ -0,0 +1,97 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class LLMObsPatternsConfigSnapshot(ModelNormal): + validations = { + "hierarchy_depth": { + "inclusive_maximum": 2147483647, + }, + "num_records": { + "inclusive_maximum": 2147483647, + }, + } + + @cached_property + def openapi_types(_): + return { + "account_id": (str,), + "evp_query": (str,), + "hierarchy_depth": (int,), + "integration_provider": (str,), + "model_name": (str,), + "num_records": (int,), + "sampling_ratio": (float,), + } + + attribute_map = { + "account_id": "account_id", + "evp_query": "evp_query", + "hierarchy_depth": "hierarchy_depth", + "integration_provider": "integration_provider", + "model_name": "model_name", + "num_records": "num_records", + "sampling_ratio": "sampling_ratio", + } + + def __init__( + self_, + account_id: Union[str, UnsetType] = unset, + evp_query: Union[str, UnsetType] = unset, + hierarchy_depth: Union[int, UnsetType] = unset, + integration_provider: Union[str, UnsetType] = unset, + model_name: Union[str, UnsetType] = unset, + num_records: Union[int, UnsetType] = unset, + sampling_ratio: Union[float, UnsetType] = unset, + **kwargs, + ): + """ + Snapshot of the configuration used for a patterns run. + + :param account_id: Integration account ID used for a bring-your-own-model run. + :type account_id: str, optional + + :param evp_query: Query that selected the spans for the run. + :type evp_query: str, optional + + :param hierarchy_depth: Depth of the topic hierarchy generated. + :type hierarchy_depth: int, optional + + :param integration_provider: Integration provider used for a bring-your-own-model run. + :type integration_provider: str, optional + + :param model_name: Model name used for a bring-your-own-model run. + :type model_name: str, optional + + :param num_records: Maximum number of records processed for the run. + :type num_records: int, optional + + :param sampling_ratio: Fraction of matching spans sampled for the run. + :type sampling_ratio: float, optional + """ + if account_id is not unset: + kwargs["account_id"] = account_id + if evp_query is not unset: + kwargs["evp_query"] = evp_query + if hierarchy_depth is not unset: + kwargs["hierarchy_depth"] = hierarchy_depth + if integration_provider is not unset: + kwargs["integration_provider"] = integration_provider + if model_name is not unset: + kwargs["model_name"] = model_name + if num_records is not unset: + kwargs["num_records"] = num_records + if sampling_ratio is not unset: + kwargs["sampling_ratio"] = sampling_ratio + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_type.py new file mode 100644 index 0000000000..e84ee506d0 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsConfigType(ModelSimple): + """ + Resource type of an LLM Observability patterns configuration. + + :param value: If omitted defaults to "topic_discovery_configs". Must be one of ["topic_discovery_configs"]. + :type value: str + """ + + allowed_values = { + "topic_discovery_configs", + } + TOPIC_DISCOVERY_CONFIGS: ClassVar["LLMObsPatternsConfigType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsConfigType.TOPIC_DISCOVERY_CONFIGS = LLMObsPatternsConfigType("topic_discovery_configs") diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request.py new file mode 100644 index 0000000000..942591a00b --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request.py @@ -0,0 +1,44 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_data import ( + LLMObsPatternsConfigUpsertRequestData, + ) + + +class LLMObsPatternsConfigUpsertRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_data import ( + LLMObsPatternsConfigUpsertRequestData, + ) + + return { + "data": (LLMObsPatternsConfigUpsertRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsConfigUpsertRequestData, **kwargs): + """ + Request to create or update an LLM Observability patterns configuration. + + :param data: Data object for creating or updating an LLM Observability patterns configuration. + :type data: LLMObsPatternsConfigUpsertRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request_attributes.py new file mode 100644 index 0000000000..41dd7799e6 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request_attributes.py @@ -0,0 +1,125 @@ +# 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. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class LLMObsPatternsConfigUpsertRequestAttributes(ModelNormal): + validations = { + "hierarchy_depth": { + "inclusive_maximum": 2147483647, + }, + "num_records": { + "inclusive_maximum": 2147483647, + }, + } + + @cached_property + def openapi_types(_): + return { + "account_id": (str,), + "config_id": (str,), + "evp_query": (str,), + "hierarchy_depth": (int,), + "integration_provider": (str,), + "model_name": (str,), + "name": (str,), + "num_records": (int,), + "sampling_ratio": (float,), + "scope": (str,), + "template": (str,), + } + + attribute_map = { + "account_id": "account_id", + "config_id": "config_id", + "evp_query": "evp_query", + "hierarchy_depth": "hierarchy_depth", + "integration_provider": "integration_provider", + "model_name": "model_name", + "name": "name", + "num_records": "num_records", + "sampling_ratio": "sampling_ratio", + "scope": "scope", + "template": "template", + } + + def __init__( + self_, + evp_query: str, + hierarchy_depth: int, + name: str, + num_records: int, + sampling_ratio: float, + account_id: Union[str, UnsetType] = unset, + config_id: Union[str, UnsetType] = unset, + integration_provider: Union[str, UnsetType] = unset, + model_name: Union[str, UnsetType] = unset, + scope: Union[str, UnsetType] = unset, + template: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Attributes for creating or updating an LLM Observability patterns configuration. + + :param account_id: Integration account ID for a bring-your-own-model configuration. + :type account_id: str, optional + + :param config_id: The ID of an existing configuration to update. If omitted, a new configuration is created. + :type config_id: str, optional + + :param evp_query: Query that selects the spans the patterns run analyzes. + :type evp_query: str + + :param hierarchy_depth: Depth of the topic hierarchy to generate. + :type hierarchy_depth: int + + :param integration_provider: Integration provider for a bring-your-own-model configuration. + :type integration_provider: str, optional + + :param model_name: Model name for a bring-your-own-model configuration. + :type model_name: str, optional + + :param name: Name of the configuration. + :type name: str + + :param num_records: Maximum number of records to process for the run. + :type num_records: int + + :param sampling_ratio: Fraction of matching spans to sample for the run. + :type sampling_ratio: float + + :param scope: Scope of the configuration. + :type scope: str, optional + + :param template: Template used to guide topic generation. + :type template: str, optional + """ + if account_id is not unset: + kwargs["account_id"] = account_id + if config_id is not unset: + kwargs["config_id"] = config_id + if integration_provider is not unset: + kwargs["integration_provider"] = integration_provider + if model_name is not unset: + kwargs["model_name"] = model_name + if scope is not unset: + kwargs["scope"] = scope + if template is not unset: + kwargs["template"] = template + super().__init__(kwargs) + + self_.evp_query = evp_query + self_.hierarchy_depth = hierarchy_depth + self_.name = name + self_.num_records = num_records + self_.sampling_ratio = sampling_ratio diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request_data.py new file mode 100644 index 0000000000..fbe8df02e7 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_config_upsert_request_data.py @@ -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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_attributes import ( + LLMObsPatternsConfigUpsertRequestAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_config_type import LLMObsPatternsConfigType + + +class LLMObsPatternsConfigUpsertRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_attributes import ( + LLMObsPatternsConfigUpsertRequestAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_config_type import LLMObsPatternsConfigType + + return { + "attributes": (LLMObsPatternsConfigUpsertRequestAttributes,), + "type": (LLMObsPatternsConfigType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__( + self_, attributes: LLMObsPatternsConfigUpsertRequestAttributes, type: LLMObsPatternsConfigType, **kwargs + ): + """ + Data object for creating or updating an LLM Observability patterns configuration. + + :param attributes: Attributes for creating or updating an LLM Observability patterns configuration. + :type attributes: LLMObsPatternsConfigUpsertRequestAttributes + + :param type: Resource type of an LLM Observability patterns configuration. + :type type: LLMObsPatternsConfigType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_configs_list_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_list_type.py new file mode 100644 index 0000000000..ab7a584d15 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_list_type.py @@ -0,0 +1,37 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsConfigsListType(ModelSimple): + """ + Resource type of a list of LLM Observability patterns configurations. + + :param value: If omitted defaults to "list_topic_discovery_configs_response". Must be one of ["list_topic_discovery_configs_response"]. + :type value: str + """ + + allowed_values = { + "list_topic_discovery_configs_response", + } + LIST_TOPIC_DISCOVERY_CONFIGS_RESPONSE: ClassVar["LLMObsPatternsConfigsListType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsConfigsListType.LIST_TOPIC_DISCOVERY_CONFIGS_RESPONSE = LLMObsPatternsConfigsListType( + "list_topic_discovery_configs_response" +) diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response.py new file mode 100644 index 0000000000..7276bc3021 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_configs_response_data import LLMObsPatternsConfigsResponseData + + +class LLMObsPatternsConfigsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_configs_response_data import LLMObsPatternsConfigsResponseData + + return { + "data": (LLMObsPatternsConfigsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsConfigsResponseData, **kwargs): + """ + Response containing a list of LLM Observability patterns configurations. + + :param data: Data object of a list of LLM Observability patterns configurations. + :type data: LLMObsPatternsConfigsResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response_attributes.py new file mode 100644 index 0000000000..ed5b51c04f --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response_attributes.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_item import LLMObsPatternsConfigItem + + +class LLMObsPatternsConfigsResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_item import LLMObsPatternsConfigItem + + return { + "configs": ([LLMObsPatternsConfigItem],), + } + + attribute_map = { + "configs": "configs", + } + + def __init__(self_, configs: List[LLMObsPatternsConfigItem], **kwargs): + """ + Attributes of a list of LLM Observability patterns configurations. + + :param configs: List of patterns configurations. + :type configs: [LLMObsPatternsConfigItem] + """ + super().__init__(kwargs) + + self_.configs = configs diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response_data.py new file mode 100644 index 0000000000..4a6a804b8e --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_configs_response_data.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_configs_response_attributes import ( + LLMObsPatternsConfigsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_configs_list_type import LLMObsPatternsConfigsListType + + +class LLMObsPatternsConfigsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_configs_response_attributes import ( + LLMObsPatternsConfigsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_configs_list_type import LLMObsPatternsConfigsListType + + return { + "attributes": (LLMObsPatternsConfigsResponseAttributes,), + "id": (str,), + "type": (LLMObsPatternsConfigsListType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: LLMObsPatternsConfigsResponseAttributes, + id: str, + type: LLMObsPatternsConfigsListType, + **kwargs, + ): + """ + Data object of a list of LLM Observability patterns configurations. + + :param attributes: Attributes of a list of LLM Observability patterns configurations. + :type attributes: LLMObsPatternsConfigsResponseAttributes + + :param id: Identifier of the list response. + :type id: str + + :param type: Resource type of a list of LLM Observability patterns configurations. + :type type: LLMObsPatternsConfigsListType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_request_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_request_type.py new file mode 100644 index 0000000000..49fe17e9e5 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_request_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsRequestType(ModelSimple): + """ + Resource type for triggering an LLM Observability patterns run. + + :param value: If omitted defaults to "topic_discovery". Must be one of ["topic_discovery"]. + :type value: str + """ + + allowed_values = { + "topic_discovery", + } + TOPIC_DISCOVERY: ClassVar["LLMObsPatternsRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsRequestType.TOPIC_DISCOVERY = LLMObsPatternsRequestType("topic_discovery") diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response.py new file mode 100644 index 0000000000..d4b2e1464b --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response.py @@ -0,0 +1,44 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_run_status_response_data import ( + LLMObsPatternsRunStatusResponseData, + ) + + +class LLMObsPatternsRunStatusResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_run_status_response_data import ( + LLMObsPatternsRunStatusResponseData, + ) + + return { + "data": (LLMObsPatternsRunStatusResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsRunStatusResponseData, **kwargs): + """ + Response containing the status of an LLM Observability patterns run. + + :param data: Data object of an LLM Observability patterns run status response. + :type data: LLMObsPatternsRunStatusResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response_attributes.py new file mode 100644 index 0000000000..63d528746a --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response_attributes.py @@ -0,0 +1,61 @@ +# 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. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_activity_progress import LLMObsPatternsActivityProgress + + +class LLMObsPatternsRunStatusResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_activity_progress import LLMObsPatternsActivityProgress + + return { + "created_at": (datetime,), + "progress": ([LLMObsPatternsActivityProgress],), + "status": (str,), + "step": (str,), + } + + attribute_map = { + "created_at": "created_at", + "progress": "progress", + "status": "status", + "step": "step", + } + + def __init__( + self_, created_at: datetime, progress: List[LLMObsPatternsActivityProgress], status: str, step: str, **kwargs + ): + """ + Attributes of an LLM Observability patterns run status. + + :param created_at: Timestamp when the run was created. + :type created_at: datetime + + :param progress: List of step-by-step progress entries for a patterns run. + :type progress: [LLMObsPatternsActivityProgress] + + :param status: Overall status of the run. + :type status: str + + :param step: The current step of the run. + :type step: str + """ + super().__init__(kwargs) + + self_.created_at = created_at + self_.progress = progress + self_.status = status + self_.step = step diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response_data.py new file mode 100644 index 0000000000..a5ec8f69ff --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_response_data.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_run_status_response_attributes import ( + LLMObsPatternsRunStatusResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_run_status_type import LLMObsPatternsRunStatusType + + +class LLMObsPatternsRunStatusResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_run_status_response_attributes import ( + LLMObsPatternsRunStatusResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_run_status_type import LLMObsPatternsRunStatusType + + return { + "attributes": (LLMObsPatternsRunStatusResponseAttributes,), + "id": (str,), + "type": (LLMObsPatternsRunStatusType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: LLMObsPatternsRunStatusResponseAttributes, + id: str, + type: LLMObsPatternsRunStatusType, + **kwargs, + ): + """ + Data object of an LLM Observability patterns run status response. + + :param attributes: Attributes of an LLM Observability patterns run status. + :type attributes: LLMObsPatternsRunStatusResponseAttributes + + :param id: The ID of the patterns run. + :type id: str + + :param type: Resource type of an LLM Observability patterns run status. + :type type: LLMObsPatternsRunStatusType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_type.py new file mode 100644 index 0000000000..3048a5b8a8 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_run_status_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsRunStatusType(ModelSimple): + """ + Resource type of an LLM Observability patterns run status. + + :param value: If omitted defaults to "topic_discovery_run_status". Must be one of ["topic_discovery_run_status"]. + :type value: str + """ + + allowed_values = { + "topic_discovery_run_status", + } + TOPIC_DISCOVERY_RUN_STATUS: ClassVar["LLMObsPatternsRunStatusType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsRunStatusType.TOPIC_DISCOVERY_RUN_STATUS = LLMObsPatternsRunStatusType("topic_discovery_run_status") diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_run_summary.py b/src/datadog_api_client/v2/model/llm_obs_patterns_run_summary.py new file mode 100644 index 0000000000..1dbd2d6a48 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_run_summary.py @@ -0,0 +1,78 @@ +# 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. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_snapshot import LLMObsPatternsConfigSnapshot + + +class LLMObsPatternsRunSummary(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_snapshot import LLMObsPatternsConfigSnapshot + + return { + "completed_at": (datetime, none_type), + "config_snapshot": (LLMObsPatternsConfigSnapshot,), + "created_at": (datetime,), + "id": (str,), + "status": (str,), + } + + attribute_map = { + "completed_at": "completed_at", + "config_snapshot": "config_snapshot", + "created_at": "created_at", + "id": "id", + "status": "status", + } + + def __init__( + self_, + created_at: datetime, + id: str, + status: str, + completed_at: Union[datetime, none_type, UnsetType] = unset, + config_snapshot: Union[LLMObsPatternsConfigSnapshot, UnsetType] = unset, + **kwargs, + ): + """ + Summary of an LLM Observability patterns run. + + :param completed_at: Timestamp when the run completed. Null if the run has not completed. + :type completed_at: datetime, none_type, optional + + :param config_snapshot: Snapshot of the configuration used for a patterns run. + :type config_snapshot: LLMObsPatternsConfigSnapshot, optional + + :param created_at: Timestamp when the run was created. + :type created_at: datetime + + :param id: Unique identifier of the run. + :type id: str + + :param status: Status of the run. + :type status: str + """ + if completed_at is not unset: + kwargs["completed_at"] = completed_at + if config_snapshot is not unset: + kwargs["config_snapshot"] = config_snapshot + super().__init__(kwargs) + + self_.created_at = created_at + self_.id = id + self_.status = status diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_runs_list_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_list_type.py new file mode 100644 index 0000000000..2c78370078 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_list_type.py @@ -0,0 +1,37 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsRunsListType(ModelSimple): + """ + Resource type of a list of LLM Observability patterns runs. + + :param value: If omitted defaults to "list_topic_discovery_runs_response". Must be one of ["list_topic_discovery_runs_response"]. + :type value: str + """ + + allowed_values = { + "list_topic_discovery_runs_response", + } + LIST_TOPIC_DISCOVERY_RUNS_RESPONSE: ClassVar["LLMObsPatternsRunsListType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsRunsListType.LIST_TOPIC_DISCOVERY_RUNS_RESPONSE = LLMObsPatternsRunsListType( + "list_topic_discovery_runs_response" +) diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response.py new file mode 100644 index 0000000000..fc328244a8 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_runs_response_data import LLMObsPatternsRunsResponseData + + +class LLMObsPatternsRunsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_runs_response_data import LLMObsPatternsRunsResponseData + + return { + "data": (LLMObsPatternsRunsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsRunsResponseData, **kwargs): + """ + Response containing the completed runs of an LLM Observability patterns configuration. + + :param data: Data object of an LLM Observability patterns runs response. + :type data: LLMObsPatternsRunsResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response_attributes.py new file mode 100644 index 0000000000..7aa25aaff7 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response_attributes.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_run_summary import LLMObsPatternsRunSummary + + +class LLMObsPatternsRunsResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_run_summary import LLMObsPatternsRunSummary + + return { + "runs": ([LLMObsPatternsRunSummary],), + } + + attribute_map = { + "runs": "runs", + } + + def __init__(self_, runs: List[LLMObsPatternsRunSummary], **kwargs): + """ + Attributes of an LLM Observability patterns runs response. + + :param runs: List of patterns runs. + :type runs: [LLMObsPatternsRunSummary] + """ + super().__init__(kwargs) + + self_.runs = runs diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response_data.py new file mode 100644 index 0000000000..eee77dcf37 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_runs_response_data.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_runs_response_attributes import ( + LLMObsPatternsRunsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_runs_list_type import LLMObsPatternsRunsListType + + +class LLMObsPatternsRunsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_runs_response_attributes import ( + LLMObsPatternsRunsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_runs_list_type import LLMObsPatternsRunsListType + + return { + "attributes": (LLMObsPatternsRunsResponseAttributes,), + "id": (str,), + "type": (LLMObsPatternsRunsListType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, attributes: LLMObsPatternsRunsResponseAttributes, id: str, type: LLMObsPatternsRunsListType, **kwargs + ): + """ + Data object of an LLM Observability patterns runs response. + + :param attributes: Attributes of an LLM Observability patterns runs response. + :type attributes: LLMObsPatternsRunsResponseAttributes + + :param id: Identifier of the configuration the runs belong to. + :type id: str + + :param type: Resource type of a list of LLM Observability patterns runs. + :type type: LLMObsPatternsRunsListType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topic.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topic.py new file mode 100644 index 0000000000..53d2b4374b --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topic.py @@ -0,0 +1,108 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, +) + + +class LLMObsPatternsTopic(ModelNormal): + @cached_property + def openapi_types(_): + return { + "coherence_score": (float,), + "created_at": (datetime,), + "description": (str,), + "first_seen_at": (datetime,), + "hierarchy_level": (int,), + "id": (str,), + "is_validated": (bool,), + "name": (str,), + "parent_topic_id": (str,), + "point_count": (int,), + "run_id": (str,), + } + + attribute_map = { + "coherence_score": "coherence_score", + "created_at": "created_at", + "description": "description", + "first_seen_at": "first_seen_at", + "hierarchy_level": "hierarchy_level", + "id": "id", + "is_validated": "is_validated", + "name": "name", + "parent_topic_id": "parent_topic_id", + "point_count": "point_count", + "run_id": "run_id", + } + + def __init__( + self_, + coherence_score: float, + created_at: datetime, + description: str, + first_seen_at: datetime, + hierarchy_level: int, + id: str, + is_validated: bool, + name: str, + parent_topic_id: str, + point_count: int, + run_id: str, + **kwargs, + ): + """ + A topic discovered by an LLM Observability patterns run. + + :param coherence_score: Coherence score of the topic. + :type coherence_score: float + + :param created_at: Timestamp when the topic was created. + :type created_at: datetime + + :param description: Description of the topic. + :type description: str + + :param first_seen_at: Timestamp when the topic was first seen. + :type first_seen_at: datetime + + :param hierarchy_level: Level of the topic in the hierarchy. Level 0 is a leaf topic. + :type hierarchy_level: int + + :param id: Unique identifier of the topic. + :type id: str + + :param is_validated: Whether the topic has been validated. + :type is_validated: bool + + :param name: Name of the topic. + :type name: str + + :param parent_topic_id: Identifier of the parent topic. Empty for top-level topics. + :type parent_topic_id: str + + :param point_count: Number of data points assigned to the topic. + :type point_count: int + + :param run_id: Identifier of the run that produced the topic. + :type run_id: str + """ + super().__init__(kwargs) + + self_.coherence_score = coherence_score + self_.created_at = created_at + self_.description = description + self_.first_seen_at = first_seen_at + self_.hierarchy_level = hierarchy_level + self_.id = id + self_.is_validated = is_validated + self_.name = name + self_.parent_topic_id = parent_topic_id + self_.point_count = point_count + self_.run_id = run_id diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topic_with_clustered_points.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topic_with_clustered_points.py new file mode 100644 index 0000000000..3b192ced4f --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topic_with_clustered_points.py @@ -0,0 +1,126 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_clustered_point_ref import LLMObsPatternsClusteredPointRef + + +class LLMObsPatternsTopicWithClusteredPoints(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_clustered_point_ref import LLMObsPatternsClusteredPointRef + + return { + "cluster_points": ([LLMObsPatternsClusteredPointRef],), + "coherence_score": (float,), + "created_at": (datetime,), + "description": (str,), + "first_seen_at": (datetime,), + "hierarchy_level": (int,), + "id": (str,), + "is_validated": (bool,), + "name": (str,), + "parent_topic_id": (str,), + "point_count": (int,), + "run_id": (str,), + } + + attribute_map = { + "cluster_points": "cluster_points", + "coherence_score": "coherence_score", + "created_at": "created_at", + "description": "description", + "first_seen_at": "first_seen_at", + "hierarchy_level": "hierarchy_level", + "id": "id", + "is_validated": "is_validated", + "name": "name", + "parent_topic_id": "parent_topic_id", + "point_count": "point_count", + "run_id": "run_id", + } + + def __init__( + self_, + coherence_score: float, + created_at: datetime, + description: str, + first_seen_at: datetime, + hierarchy_level: int, + id: str, + is_validated: bool, + name: str, + parent_topic_id: str, + point_count: int, + run_id: str, + cluster_points: Union[List[LLMObsPatternsClusteredPointRef], UnsetType] = unset, + **kwargs, + ): + """ + A topic discovered by an LLM Observability patterns run, including the + clustered points attached to leaf topics. + + :param cluster_points: List of clustered points attached to a topic. + :type cluster_points: [LLMObsPatternsClusteredPointRef], optional + + :param coherence_score: Coherence score of the topic. + :type coherence_score: float + + :param created_at: Timestamp when the topic was created. + :type created_at: datetime + + :param description: Description of the topic. + :type description: str + + :param first_seen_at: Timestamp when the topic was first seen. + :type first_seen_at: datetime + + :param hierarchy_level: Level of the topic in the hierarchy. Level 0 is a leaf topic. + :type hierarchy_level: int + + :param id: Unique identifier of the topic. + :type id: str + + :param is_validated: Whether the topic has been validated. + :type is_validated: bool + + :param name: Name of the topic. + :type name: str + + :param parent_topic_id: Identifier of the parent topic. Empty for top-level topics. + :type parent_topic_id: str + + :param point_count: Number of data points assigned to the topic. + :type point_count: int + + :param run_id: Identifier of the run that produced the topic. + :type run_id: str + """ + if cluster_points is not unset: + kwargs["cluster_points"] = cluster_points + super().__init__(kwargs) + + self_.coherence_score = coherence_score + self_.created_at = created_at + self_.description = description + self_.first_seen_at = first_seen_at + self_.hierarchy_level = hierarchy_level + self_.id = id + self_.is_validated = is_validated + self_.name = name + self_.parent_topic_id = parent_topic_id + self_.point_count = point_count + self_.run_id = run_id diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response.py new file mode 100644 index 0000000000..599ae389bb --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_topics_response_data import LLMObsPatternsTopicsResponseData + + +class LLMObsPatternsTopicsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_topics_response_data import LLMObsPatternsTopicsResponseData + + return { + "data": (LLMObsPatternsTopicsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsTopicsResponseData, **kwargs): + """ + Response containing the topics discovered by an LLM Observability patterns run. + + :param data: Data object of an LLM Observability patterns topics response. + :type data: LLMObsPatternsTopicsResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response_attributes.py new file mode 100644 index 0000000000..abfd370549 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response_attributes.py @@ -0,0 +1,94 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_snapshot import LLMObsPatternsConfigSnapshot + from datadog_api_client.v2.model.llm_obs_patterns_topic import LLMObsPatternsTopic + + +class LLMObsPatternsTopicsResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_snapshot import LLMObsPatternsConfigSnapshot + from datadog_api_client.v2.model.llm_obs_patterns_topic import LLMObsPatternsTopic + + return { + "completed_at": (datetime, none_type), + "config_id": (str,), + "config_snapshot": (LLMObsPatternsConfigSnapshot,), + "created_at": (datetime,), + "previous_run_id": (str,), + "run_id": (str,), + "topics": ([LLMObsPatternsTopic],), + } + + attribute_map = { + "completed_at": "completed_at", + "config_id": "config_id", + "config_snapshot": "config_snapshot", + "created_at": "created_at", + "previous_run_id": "previous_run_id", + "run_id": "run_id", + "topics": "topics", + } + + def __init__( + self_, + config_id: str, + created_at: datetime, + previous_run_id: str, + run_id: str, + topics: List[LLMObsPatternsTopic], + completed_at: Union[datetime, none_type, UnsetType] = unset, + config_snapshot: Union[LLMObsPatternsConfigSnapshot, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an LLM Observability patterns topics response. + + :param completed_at: Timestamp when the run completed. Null if the run has not completed. + :type completed_at: datetime, none_type, optional + + :param config_id: Identifier of the configuration that produced the run. + :type config_id: str + + :param config_snapshot: Snapshot of the configuration used for a patterns run. + :type config_snapshot: LLMObsPatternsConfigSnapshot, optional + + :param created_at: Timestamp when the run was created. + :type created_at: datetime + + :param previous_run_id: Identifier of the run that completed immediately before this one. Empty if none. + :type previous_run_id: str + + :param run_id: Identifier of the run that produced the topics. + :type run_id: str + + :param topics: List of discovered topics. + :type topics: [LLMObsPatternsTopic] + """ + if completed_at is not unset: + kwargs["completed_at"] = completed_at + if config_snapshot is not unset: + kwargs["config_snapshot"] = config_snapshot + super().__init__(kwargs) + + self_.config_id = config_id + self_.created_at = created_at + self_.previous_run_id = previous_run_id + self_.run_id = run_id + self_.topics = topics diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response_data.py new file mode 100644 index 0000000000..ad604caf1c --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_response_data.py @@ -0,0 +1,60 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_topics_response_attributes import ( + LLMObsPatternsTopicsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_topics_type import LLMObsPatternsTopicsType + + +class LLMObsPatternsTopicsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_topics_response_attributes import ( + LLMObsPatternsTopicsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_topics_type import LLMObsPatternsTopicsType + + return { + "attributes": (LLMObsPatternsTopicsResponseAttributes,), + "id": (str,), + "type": (LLMObsPatternsTopicsType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, attributes: LLMObsPatternsTopicsResponseAttributes, id: str, type: LLMObsPatternsTopicsType, **kwargs + ): + """ + Data object of an LLM Observability patterns topics response. + + :param attributes: Attributes of an LLM Observability patterns topics response. + :type attributes: LLMObsPatternsTopicsResponseAttributes + + :param id: Identifier of the run the topics belong to. + :type id: str + + :param type: Resource type of an LLM Observability patterns topics response. + :type type: LLMObsPatternsTopicsType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_type.py new file mode 100644 index 0000000000..28c3c3afcf --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsTopicsType(ModelSimple): + """ + Resource type of an LLM Observability patterns topics response. + + :param value: If omitted defaults to "get_topics_response". Must be one of ["get_topics_response"]. + :type value: str + """ + + allowed_values = { + "get_topics_response", + } + GET_TOPICS_RESPONSE: ClassVar["LLMObsPatternsTopicsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsTopicsType.GET_TOPICS_RESPONSE = LLMObsPatternsTopicsType("get_topics_response") diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response.py new file mode 100644 index 0000000000..daf8893650 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response.py @@ -0,0 +1,45 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_data import ( + LLMObsPatternsTopicsWithClusteredPointsResponseData, + ) + + +class LLMObsPatternsTopicsWithClusteredPointsResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_data import ( + LLMObsPatternsTopicsWithClusteredPointsResponseData, + ) + + return { + "data": (LLMObsPatternsTopicsWithClusteredPointsResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsTopicsWithClusteredPointsResponseData, **kwargs): + """ + Response containing the topics, and the clustered points of their leaf topics, + discovered by an LLM Observability patterns run. + + :param data: Data object of an LLM Observability patterns topics-with-clustered-points response. + :type data: LLMObsPatternsTopicsWithClusteredPointsResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response_attributes.py new file mode 100644 index 0000000000..8765ad67af --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response_attributes.py @@ -0,0 +1,98 @@ +# 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. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_config_snapshot import LLMObsPatternsConfigSnapshot + from datadog_api_client.v2.model.llm_obs_patterns_topic_with_clustered_points import ( + LLMObsPatternsTopicWithClusteredPoints, + ) + + +class LLMObsPatternsTopicsWithClusteredPointsResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_config_snapshot import LLMObsPatternsConfigSnapshot + from datadog_api_client.v2.model.llm_obs_patterns_topic_with_clustered_points import ( + LLMObsPatternsTopicWithClusteredPoints, + ) + + return { + "completed_at": (datetime, none_type), + "config_id": (str,), + "config_snapshot": (LLMObsPatternsConfigSnapshot,), + "created_at": (datetime,), + "previous_run_id": (str,), + "run_id": (str,), + "topics": ([LLMObsPatternsTopicWithClusteredPoints],), + } + + attribute_map = { + "completed_at": "completed_at", + "config_id": "config_id", + "config_snapshot": "config_snapshot", + "created_at": "created_at", + "previous_run_id": "previous_run_id", + "run_id": "run_id", + "topics": "topics", + } + + def __init__( + self_, + config_id: str, + created_at: datetime, + previous_run_id: str, + run_id: str, + topics: List[LLMObsPatternsTopicWithClusteredPoints], + completed_at: Union[datetime, none_type, UnsetType] = unset, + config_snapshot: Union[LLMObsPatternsConfigSnapshot, UnsetType] = unset, + **kwargs, + ): + """ + Attributes of an LLM Observability patterns topics-with-clustered-points response. + + :param completed_at: Timestamp when the run completed. Null if the run has not completed. + :type completed_at: datetime, none_type, optional + + :param config_id: Identifier of the configuration that produced the run. + :type config_id: str + + :param config_snapshot: Snapshot of the configuration used for a patterns run. + :type config_snapshot: LLMObsPatternsConfigSnapshot, optional + + :param created_at: Timestamp when the run was created. + :type created_at: datetime + + :param previous_run_id: Identifier of the run that completed immediately before this one. Empty if none. + :type previous_run_id: str + + :param run_id: Identifier of the run that produced the topics. + :type run_id: str + + :param topics: List of discovered topics with their clustered points. + :type topics: [LLMObsPatternsTopicWithClusteredPoints] + """ + if completed_at is not unset: + kwargs["completed_at"] = completed_at + if config_snapshot is not unset: + kwargs["config_snapshot"] = config_snapshot + super().__init__(kwargs) + + self_.config_id = config_id + self_.created_at = created_at + self_.previous_run_id = previous_run_id + self_.run_id = run_id + self_.topics = topics diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response_data.py new file mode 100644 index 0000000000..7ebe2e1ba8 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_response_data.py @@ -0,0 +1,68 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_attributes import ( + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_type import ( + LLMObsPatternsTopicsWithClusteredPointsType, + ) + + +class LLMObsPatternsTopicsWithClusteredPointsResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_attributes import ( + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_type import ( + LLMObsPatternsTopicsWithClusteredPointsType, + ) + + return { + "attributes": (LLMObsPatternsTopicsWithClusteredPointsResponseAttributes,), + "id": (str,), + "type": (LLMObsPatternsTopicsWithClusteredPointsType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: LLMObsPatternsTopicsWithClusteredPointsResponseAttributes, + id: str, + type: LLMObsPatternsTopicsWithClusteredPointsType, + **kwargs, + ): + """ + Data object of an LLM Observability patterns topics-with-clustered-points response. + + :param attributes: Attributes of an LLM Observability patterns topics-with-clustered-points response. + :type attributes: LLMObsPatternsTopicsWithClusteredPointsResponseAttributes + + :param id: Identifier of the run the topics belong to. + :type id: str + + :param type: Resource type of an LLM Observability patterns topics-with-clustered-points response. + :type type: LLMObsPatternsTopicsWithClusteredPointsType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_type.py new file mode 100644 index 0000000000..fb053dcd85 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_topics_with_clustered_points_type.py @@ -0,0 +1,37 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsTopicsWithClusteredPointsType(ModelSimple): + """ + Resource type of an LLM Observability patterns topics-with-clustered-points response. + + :param value: If omitted defaults to "get_topics_with_cluster_points_response". Must be one of ["get_topics_with_cluster_points_response"]. + :type value: str + """ + + allowed_values = { + "get_topics_with_cluster_points_response", + } + GET_TOPICS_WITH_CLUSTER_POINTS_RESPONSE: ClassVar["LLMObsPatternsTopicsWithClusteredPointsType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsTopicsWithClusteredPointsType.GET_TOPICS_WITH_CLUSTER_POINTS_RESPONSE = ( + LLMObsPatternsTopicsWithClusteredPointsType("get_topics_with_cluster_points_response") +) diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request.py b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request.py new file mode 100644 index 0000000000..7b58d10d3c --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_data import LLMObsPatternsTriggerRequestData + + +class LLMObsPatternsTriggerRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_data import LLMObsPatternsTriggerRequestData + + return { + "data": (LLMObsPatternsTriggerRequestData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsTriggerRequestData, **kwargs): + """ + Request to trigger an LLM Observability patterns run. + + :param data: Data object for triggering an LLM Observability patterns run. + :type data: LLMObsPatternsTriggerRequestData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request_attributes.py new file mode 100644 index 0000000000..3b5db92984 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request_attributes.py @@ -0,0 +1,33 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class LLMObsPatternsTriggerRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "config_id": (str,), + } + + attribute_map = { + "config_id": "config_id", + } + + def __init__(self_, config_id: str, **kwargs): + """ + Attributes for triggering an LLM Observability patterns run. + + :param config_id: The ID of the patterns configuration to run. + :type config_id: str + """ + super().__init__(kwargs) + + self_.config_id = config_id diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request_data.py new file mode 100644 index 0000000000..785b7975f4 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_request_data.py @@ -0,0 +1,52 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_attributes import ( + LLMObsPatternsTriggerRequestAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_request_type import LLMObsPatternsRequestType + + +class LLMObsPatternsTriggerRequestData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_attributes import ( + LLMObsPatternsTriggerRequestAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_request_type import LLMObsPatternsRequestType + + return { + "attributes": (LLMObsPatternsTriggerRequestAttributes,), + "type": (LLMObsPatternsRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "type": "type", + } + + def __init__(self_, attributes: LLMObsPatternsTriggerRequestAttributes, type: LLMObsPatternsRequestType, **kwargs): + """ + Data object for triggering an LLM Observability patterns run. + + :param attributes: Attributes for triggering an LLM Observability patterns run. + :type attributes: LLMObsPatternsTriggerRequestAttributes + + :param type: Resource type for triggering an LLM Observability patterns run. + :type type: LLMObsPatternsRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response.py b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response.py new file mode 100644 index 0000000000..460ba97946 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response.py @@ -0,0 +1,40 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_data import LLMObsPatternsTriggerResponseData + + +class LLMObsPatternsTriggerResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_data import LLMObsPatternsTriggerResponseData + + return { + "data": (LLMObsPatternsTriggerResponseData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: LLMObsPatternsTriggerResponseData, **kwargs): + """ + Response after triggering an LLM Observability patterns run. + + :param data: Data object of an LLM Observability patterns trigger response. + :type data: LLMObsPatternsTriggerResponseData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_attributes.py b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_attributes.py new file mode 100644 index 0000000000..df2346f0c8 --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_attributes.py @@ -0,0 +1,45 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class LLMObsPatternsTriggerResponseAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "config_id": (str,), + "run_id": (str,), + "status": (str,), + } + + attribute_map = { + "config_id": "config_id", + "run_id": "run_id", + "status": "status", + } + + def __init__(self_, config_id: str, run_id: str, status: str, **kwargs): + """ + Attributes of an LLM Observability patterns trigger response. + + :param config_id: The ID of the patterns configuration that was run. + :type config_id: str + + :param run_id: The ID of the patterns run that was started. + :type run_id: str + + :param status: Status of the patterns run. + :type status: str + """ + super().__init__(kwargs) + + self_.config_id = config_id + self_.run_id = run_id + self_.status = status diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_data.py b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_data.py new file mode 100644 index 0000000000..e86713a4ad --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_data.py @@ -0,0 +1,64 @@ +# 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. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_attributes import ( + LLMObsPatternsTriggerResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_type import LLMObsPatternsTriggerResponseType + + +class LLMObsPatternsTriggerResponseData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_attributes import ( + LLMObsPatternsTriggerResponseAttributes, + ) + from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_type import LLMObsPatternsTriggerResponseType + + return { + "attributes": (LLMObsPatternsTriggerResponseAttributes,), + "id": (str,), + "type": (LLMObsPatternsTriggerResponseType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + attributes: LLMObsPatternsTriggerResponseAttributes, + id: str, + type: LLMObsPatternsTriggerResponseType, + **kwargs, + ): + """ + Data object of an LLM Observability patterns trigger response. + + :param attributes: Attributes of an LLM Observability patterns trigger response. + :type attributes: LLMObsPatternsTriggerResponseAttributes + + :param id: The ID of the patterns configuration that was run. + :type id: str + + :param type: Resource type of an LLM Observability patterns trigger response. + :type type: LLMObsPatternsTriggerResponseType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_type.py b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_type.py new file mode 100644 index 0000000000..f6a2d8236b --- /dev/null +++ b/src/datadog_api_client/v2/model/llm_obs_patterns_trigger_response_type.py @@ -0,0 +1,35 @@ +# 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. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class LLMObsPatternsTriggerResponseType(ModelSimple): + """ + Resource type of an LLM Observability patterns trigger response. + + :param value: If omitted defaults to "topic_discovery_run". Must be one of ["topic_discovery_run"]. + :type value: str + """ + + allowed_values = { + "topic_discovery_run", + } + TOPIC_DISCOVERY_RUN: ClassVar["LLMObsPatternsTriggerResponseType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +LLMObsPatternsTriggerResponseType.TOPIC_DISCOVERY_RUN = LLMObsPatternsTriggerResponseType("topic_discovery_run") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index be27b4cc8f..b1e125ee2e 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -4012,6 +4012,81 @@ from datadog_api_client.v2.model.llm_obs_open_ai_metadata import LLMObsOpenAIMetadata from datadog_api_client.v2.model.llm_obs_open_ai_reasoning_effort import LLMObsOpenAIReasoningEffort from datadog_api_client.v2.model.llm_obs_open_ai_reasoning_summary import LLMObsOpenAIReasoningSummary +from datadog_api_client.v2.model.llm_obs_patterns_activity_progress import LLMObsPatternsActivityProgress +from datadog_api_client.v2.model.llm_obs_patterns_clustered_point import LLMObsPatternsClusteredPoint +from datadog_api_client.v2.model.llm_obs_patterns_clustered_point_ref import LLMObsPatternsClusteredPointRef +from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response import LLMObsPatternsClusteredPointsResponse +from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_attributes import ( + LLMObsPatternsClusteredPointsResponseAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_response_data import ( + LLMObsPatternsClusteredPointsResponseData, +) +from datadog_api_client.v2.model.llm_obs_patterns_clustered_points_type import LLMObsPatternsClusteredPointsType +from datadog_api_client.v2.model.llm_obs_patterns_config_attributes import LLMObsPatternsConfigAttributes +from datadog_api_client.v2.model.llm_obs_patterns_config_item import LLMObsPatternsConfigItem +from datadog_api_client.v2.model.llm_obs_patterns_config_response import LLMObsPatternsConfigResponse +from datadog_api_client.v2.model.llm_obs_patterns_config_response_data import LLMObsPatternsConfigResponseData +from datadog_api_client.v2.model.llm_obs_patterns_config_snapshot import LLMObsPatternsConfigSnapshot +from datadog_api_client.v2.model.llm_obs_patterns_config_type import LLMObsPatternsConfigType +from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request import LLMObsPatternsConfigUpsertRequest +from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_attributes import ( + LLMObsPatternsConfigUpsertRequestAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_config_upsert_request_data import ( + LLMObsPatternsConfigUpsertRequestData, +) +from datadog_api_client.v2.model.llm_obs_patterns_configs_list_type import LLMObsPatternsConfigsListType +from datadog_api_client.v2.model.llm_obs_patterns_configs_response import LLMObsPatternsConfigsResponse +from datadog_api_client.v2.model.llm_obs_patterns_configs_response_attributes import ( + LLMObsPatternsConfigsResponseAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_configs_response_data import LLMObsPatternsConfigsResponseData +from datadog_api_client.v2.model.llm_obs_patterns_request_type import LLMObsPatternsRequestType +from datadog_api_client.v2.model.llm_obs_patterns_run_status_response import LLMObsPatternsRunStatusResponse +from datadog_api_client.v2.model.llm_obs_patterns_run_status_response_attributes import ( + LLMObsPatternsRunStatusResponseAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_run_status_response_data import LLMObsPatternsRunStatusResponseData +from datadog_api_client.v2.model.llm_obs_patterns_run_status_type import LLMObsPatternsRunStatusType +from datadog_api_client.v2.model.llm_obs_patterns_run_summary import LLMObsPatternsRunSummary +from datadog_api_client.v2.model.llm_obs_patterns_runs_list_type import LLMObsPatternsRunsListType +from datadog_api_client.v2.model.llm_obs_patterns_runs_response import LLMObsPatternsRunsResponse +from datadog_api_client.v2.model.llm_obs_patterns_runs_response_attributes import LLMObsPatternsRunsResponseAttributes +from datadog_api_client.v2.model.llm_obs_patterns_runs_response_data import LLMObsPatternsRunsResponseData +from datadog_api_client.v2.model.llm_obs_patterns_topic import LLMObsPatternsTopic +from datadog_api_client.v2.model.llm_obs_patterns_topic_with_clustered_points import ( + LLMObsPatternsTopicWithClusteredPoints, +) +from datadog_api_client.v2.model.llm_obs_patterns_topics_response import LLMObsPatternsTopicsResponse +from datadog_api_client.v2.model.llm_obs_patterns_topics_response_attributes import ( + LLMObsPatternsTopicsResponseAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_topics_response_data import LLMObsPatternsTopicsResponseData +from datadog_api_client.v2.model.llm_obs_patterns_topics_type import LLMObsPatternsTopicsType +from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response import ( + LLMObsPatternsTopicsWithClusteredPointsResponse, +) +from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_attributes import ( + LLMObsPatternsTopicsWithClusteredPointsResponseAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_response_data import ( + LLMObsPatternsTopicsWithClusteredPointsResponseData, +) +from datadog_api_client.v2.model.llm_obs_patterns_topics_with_clustered_points_type import ( + LLMObsPatternsTopicsWithClusteredPointsType, +) +from datadog_api_client.v2.model.llm_obs_patterns_trigger_request import LLMObsPatternsTriggerRequest +from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_attributes import ( + LLMObsPatternsTriggerRequestAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_trigger_request_data import LLMObsPatternsTriggerRequestData +from datadog_api_client.v2.model.llm_obs_patterns_trigger_response import LLMObsPatternsTriggerResponse +from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_attributes import ( + LLMObsPatternsTriggerResponseAttributes, +) +from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_data import LLMObsPatternsTriggerResponseData +from datadog_api_client.v2.model.llm_obs_patterns_trigger_response_type import LLMObsPatternsTriggerResponseType from datadog_api_client.v2.model.llm_obs_project_data_attributes_request import LLMObsProjectDataAttributesRequest from datadog_api_client.v2.model.llm_obs_project_data_attributes_response import LLMObsProjectDataAttributesResponse from datadog_api_client.v2.model.llm_obs_project_data_request import LLMObsProjectDataRequest @@ -12197,6 +12272,53 @@ "LLMObsOpenAIMetadata", "LLMObsOpenAIReasoningEffort", "LLMObsOpenAIReasoningSummary", + "LLMObsPatternsActivityProgress", + "LLMObsPatternsClusteredPoint", + "LLMObsPatternsClusteredPointRef", + "LLMObsPatternsClusteredPointsResponse", + "LLMObsPatternsClusteredPointsResponseAttributes", + "LLMObsPatternsClusteredPointsResponseData", + "LLMObsPatternsClusteredPointsType", + "LLMObsPatternsConfigAttributes", + "LLMObsPatternsConfigItem", + "LLMObsPatternsConfigResponse", + "LLMObsPatternsConfigResponseData", + "LLMObsPatternsConfigSnapshot", + "LLMObsPatternsConfigType", + "LLMObsPatternsConfigUpsertRequest", + "LLMObsPatternsConfigUpsertRequestAttributes", + "LLMObsPatternsConfigUpsertRequestData", + "LLMObsPatternsConfigsListType", + "LLMObsPatternsConfigsResponse", + "LLMObsPatternsConfigsResponseAttributes", + "LLMObsPatternsConfigsResponseData", + "LLMObsPatternsRequestType", + "LLMObsPatternsRunStatusResponse", + "LLMObsPatternsRunStatusResponseAttributes", + "LLMObsPatternsRunStatusResponseData", + "LLMObsPatternsRunStatusType", + "LLMObsPatternsRunSummary", + "LLMObsPatternsRunsListType", + "LLMObsPatternsRunsResponse", + "LLMObsPatternsRunsResponseAttributes", + "LLMObsPatternsRunsResponseData", + "LLMObsPatternsTopic", + "LLMObsPatternsTopicWithClusteredPoints", + "LLMObsPatternsTopicsResponse", + "LLMObsPatternsTopicsResponseAttributes", + "LLMObsPatternsTopicsResponseData", + "LLMObsPatternsTopicsType", + "LLMObsPatternsTopicsWithClusteredPointsResponse", + "LLMObsPatternsTopicsWithClusteredPointsResponseAttributes", + "LLMObsPatternsTopicsWithClusteredPointsResponseData", + "LLMObsPatternsTopicsWithClusteredPointsType", + "LLMObsPatternsTriggerRequest", + "LLMObsPatternsTriggerRequestAttributes", + "LLMObsPatternsTriggerRequestData", + "LLMObsPatternsTriggerResponse", + "LLMObsPatternsTriggerResponseAttributes", + "LLMObsPatternsTriggerResponseData", + "LLMObsPatternsTriggerResponseType", "LLMObsProjectDataAttributesRequest", "LLMObsProjectDataAttributesResponse", "LLMObsProjectDataRequest", diff --git a/tests/v2/features/llm_observability.feature b/tests/v2/features/llm_observability.feature index 842377375a..35e9592fa0 100644 --- a/tests/v2/features/llm_observability.feature +++ b/tests/v2/features/llm_observability.feature @@ -315,6 +315,30 @@ Feature: LLM Observability When the request is sent Then the response status is 422 Unprocessable Entity + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "Bad Request" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "Not Found" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Create or update a patterns configuration returns "OK" response + Given operation "UpsertLLMObsPatternsConfig" enabled + And new "UpsertLLMObsPatternsConfig" request + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "model_name": "gpt-4o", "name": "Support chatbot topics", "num_records": 1000, "sampling_ratio": 0.1, "scope": "", "template": ""}, "type": "topic_discovery_configs"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: Create or update annotations returns "Bad Request" response Given operation "UpsertLLMObsAnnotations" enabled @@ -471,6 +495,30 @@ Feature: LLM Observability When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "Bad Request" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "No Content" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/ml-observability + Scenario: Delete a patterns configuration returns "Not Found" response + Given operation "DeleteLLMObsPatternsConfig" enabled + And new "DeleteLLMObsPatternsConfig" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability Scenario: Delete an LLM Observability annotation queue returns "No Content" response Given operation "DeleteLLMObsAnnotationQueue" enabled @@ -619,6 +667,27 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "Bad Request" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "Not Found" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get a patterns configuration returns "OK" response + Given operation "GetLLMObsPatternsConfig" enabled + And new "GetLLMObsPatternsConfig" request + 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 @@ -675,6 +744,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "Bad Request" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "Not Found" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: Get patterns run status returns "OK" response + Given operation "GetLLMObsPatternsRunStatus" enabled + And new "GetLLMObsPatternsRunStatus" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability Scenario: List LLM Observability annotation queues returns "Bad Request" response Given operation "ListLLMObsAnnotationQueues" enabled @@ -915,6 +1008,116 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns clustered points returns "Bad Request" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns clustered points returns "Not Found" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns clustered points returns "OK" response + Given operation "ListLLMObsPatternsClusteredPoints" enabled + And new "ListLLMObsPatternsClusteredPoints" request + And request contains "topic_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns configurations returns "Bad Request" response + Given operation "ListLLMObsPatternsConfigs" enabled + And new "ListLLMObsPatternsConfigs" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns configurations returns "OK" response + Given operation "ListLLMObsPatternsConfigs" enabled + And new "ListLLMObsPatternsConfigs" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns runs returns "Bad Request" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns runs returns "Not Found" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns runs returns "OK" response + Given operation "ListLLMObsPatternsRuns" enabled + And new "ListLLMObsPatternsRuns" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics returns "Bad Request" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics returns "Not Found" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics returns "OK" response + Given operation "ListLLMObsPatternsTopics" enabled + And new "ListLLMObsPatternsTopics" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics with clustered points returns "Bad Request" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics with clustered points returns "Not Found" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/ml-observability + Scenario: List patterns topics with clustered points returns "OK" response + Given operation "ListLLMObsPatternsTopicsWithClusteredPoints" enabled + And new "ListLLMObsPatternsTopicsWithClusteredPoints" request + And request contains "config_id" parameter from "REPLACE.ME" + 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 @@ -1075,6 +1278,30 @@ Feature: LLM Observability When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Accepted" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 202 Accepted + + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Bad Request" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/ml-observability + Scenario: Trigger a patterns run returns "Not Found" response + Given operation "TriggerLLMObsPatterns" enabled + And new "TriggerLLMObsPatterns" request + And body with value {"data": {"attributes": {"config_id": "a7c8d9e0-1234-5678-9abc-def012345678"}, "type": "topic_discovery"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/ml-observability Scenario: Unlock LLM Observability dataset draft state returns "Bad Request" response Given operation "UnlockLLMObsDatasetDraftState" enabled diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 3a15f0b470..c095eb645f 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4421,6 +4421,68 @@ "type": "safe" } }, + "ListLLMObsPatternsClusteredPoints": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsConfigs": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "UpsertLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "GetLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "DeleteLLMObsPatternsConfig": { + "tag": "LLM Observability", + "undo": { + "type": "idempotent" + } + }, + "ListLLMObsPatternsRuns": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "TriggerLLMObsPatterns": { + "tag": "LLM Observability", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "GetLLMObsPatternsRunStatus": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsTopics": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, + "ListLLMObsPatternsTopicsWithClusteredPoints": { + "tag": "LLM Observability", + "undo": { + "type": "safe" + } + }, "ListLLMObsDatasets": { "tag": "LLM Observability", "undo": {