diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index acd63e70a663..42d8846893fb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -31063,9 +31063,17 @@ components: type: string values: description: |- - Column values in row order. The element type matches the column's `type`; - for example a `VARCHAR` column carries strings, a `TIMESTAMP` column carries - Unix-millisecond integers. `null` is allowed for missing values. + Column values in row order, one entry per result row. The element type + follows the column's `type`. The following serialization rules should be + taken into account: + + - `BIGINT` values are encoded as JSON numbers in the signed 64-bit integer range. + - `DECIMAL` values are encoded as JSON numbers with 64-bit double precision. + - `TIMESTAMP` and `DATE` values are encoded as Unix-millisecond integers; a + `DATE` resolves to midnight UTC. + - `JSON` values are returned as a JSON-encoded string. + + `null` is allowed for any column type where a value is missing. example: - web-store - checkout @@ -55956,6 +55964,10 @@ components: example: "2024-01-15T10:30:00Z" format: date-time type: string + curation_enabled: + description: Whether automatic dataset curation is enabled for this configuration. + example: true + type: boolean evp_query: description: Query that selects the spans the patterns run analyzes. example: "@ml_app:support-bot" @@ -56028,6 +56040,10 @@ components: example: "2024-01-15T10:30:00Z" format: date-time type: string + curation_enabled: + description: Whether automatic dataset curation is enabled for this configuration. + example: true + type: boolean evp_query: description: Query that selects the spans the patterns run analyzes. example: "@ml_app:support-bot" @@ -56185,6 +56201,13 @@ components: description: The ID of an existing configuration to update. If omitted, a new configuration is created. example: "a7c8d9e0-1234-5678-9abc-def012345678" type: string + curation_enabled: + description: |- + When true, Datadog automatically provisions a managed project and dataset + (`{pattern-name}-pattern-curated`) to receive suggested interactions after + each run. Defaults to true for new patterns. + example: true + type: boolean evp_query: description: Query that selects the spans the patterns run analyzes. example: "@ml_app:support-bot" @@ -135602,9 +135625,6 @@ paths: summary: Execute a tabular DDSQL query tags: - DDSQL - 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/ddsql/query/tabular/fetch: post: description: |- @@ -135713,9 +135733,6 @@ paths: summary: Fetch the result of a DDSQL query tags: - DDSQL - 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/deletion/data/{product}: post: description: Creates a data deletion request by providing a query and a timeframe targeting the proper data. @@ -154572,6 +154589,7 @@ paths: attributes: configs: - created_at: "2024-01-15T10:30:00Z" + curation_enabled: true evp_query: "@ml_app:support-bot" hierarchy_depth: 2 id: a7c8d9e0-1234-5678-9abc-def012345678 @@ -154651,6 +154669,7 @@ paths: data: attributes: created_at: "2024-01-15T10:30:00Z" + curation_enabled: true evp_query: "@ml_app:support-bot" hierarchy_depth: 2 name: Support chatbot topics @@ -154687,6 +154706,12 @@ paths: schema: $ref: "#/components/schemas/JSONAPIErrorResponse" description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict "429": $ref: "#/components/responses/TooManyRequestsResponse" "500": @@ -154718,6 +154743,7 @@ paths: data: attributes: created_at: "2024-01-15T10:30:00Z" + curation_enabled: true evp_query: "@ml_app:support-bot" hierarchy_depth: 2 name: Support chatbot topics diff --git a/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.rb b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.rb index 8b67ddf66d93..93cdabdaa745 100644 --- a/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.rb +++ b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.rb @@ -11,6 +11,7 @@ attributes: DatadogAPIClient::V2::LLMObsPatternsConfigUpsertRequestAttributes.new({ account_id: "1000000001", config_id: "a7c8d9e0-1234-5678-9abc-def012345678", + curation_enabled: true, evp_query: "@ml_app:support-bot", hierarchy_depth: 2, integration_provider: "openai", diff --git a/features/v2/llm_observability.feature b/features/v2/llm_observability.feature index b1897f532b9f..37ac6ede0075 100644 --- a/features/v2/llm_observability.feature +++ b/features/v2/llm_observability.feature @@ -373,15 +373,23 @@ Feature: LLM 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"}} + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "curation_enabled": true, "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 "Conflict" 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", "curation_enabled": true, "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 409 Conflict + @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"}} + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "curation_enabled": true, "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 @@ -389,7 +397,7 @@ Feature: LLM 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"}} + And body with value {"data": {"attributes": {"account_id": "1000000001", "config_id": "a7c8d9e0-1234-5678-9abc-def012345678", "curation_enabled": true, "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 diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index 9d1245a1250d..f8efb320e7cf 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -432,8 +432,6 @@ def initialize "v2.get_all_datasets": false, "v2.get_dataset": false, "v2.update_dataset": false, - "v2.execute_ddsql_tabular_query": false, - "v2.fetch_ddsql_tabular_query": false, "v2.cancel_data_deletion_request": false, "v2.create_data_deletion_request": false, "v2.get_data_deletion_requests": false, diff --git a/lib/datadog_api_client/v2/api/ddsql_api.rb b/lib/datadog_api_client/v2/api/ddsql_api.rb index fbe77f4c1ddd..990ca327857d 100644 --- a/lib/datadog_api_client/v2/api/ddsql_api.rb +++ b/lib/datadog_api_client/v2/api/ddsql_api.rb @@ -41,12 +41,6 @@ def execute_ddsql_tabular_query(body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(DdsqlTabularQueryResponse, Integer, Hash)>] DdsqlTabularQueryResponse data, response status code and response headers def execute_ddsql_tabular_query_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.execute_ddsql_tabular_query".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.execute_ddsql_tabular_query") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.execute_ddsql_tabular_query")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DDSQLAPI.execute_ddsql_tabular_query ...' @@ -117,12 +111,6 @@ def fetch_ddsql_tabular_query(body, opts = {}) # @param opts [Hash] the optional parameters # @return [Array<(DdsqlTabularQueryResponse, Integer, Hash)>] DdsqlTabularQueryResponse data, response status code and response headers def fetch_ddsql_tabular_query_with_http_info(body, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v2.fetch_ddsql_tabular_query".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v2.fetch_ddsql_tabular_query") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.fetch_ddsql_tabular_query")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DDSQLAPI.fetch_ddsql_tabular_query ...' diff --git a/lib/datadog_api_client/v2/models/ddsql_tabular_query_column.rb b/lib/datadog_api_client/v2/models/ddsql_tabular_query_column.rb index 2fc6d124f076..d31aae87df29 100644 --- a/lib/datadog_api_client/v2/models/ddsql_tabular_query_column.rb +++ b/lib/datadog_api_client/v2/models/ddsql_tabular_query_column.rb @@ -31,9 +31,17 @@ class DdsqlTabularQueryColumn # for the full, up-to-date list. attr_reader :type - # Column values in row order. The element type matches the column's `type`; - # for example a `VARCHAR` column carries strings, a `TIMESTAMP` column carries - # Unix-millisecond integers. `null` is allowed for missing values. + # Column values in row order, one entry per result row. The element type + # follows the column's `type`. The following serialization rules should be + # taken into account: + # + # - `BIGINT` values are encoded as JSON numbers in the signed 64-bit integer range. + # - `DECIMAL` values are encoded as JSON numbers with 64-bit double precision. + # - `TIMESTAMP` and `DATE` values are encoded as Unix-millisecond integers; a + # `DATE` resolves to midnight UTC. + # - `JSON` values are returned as a JSON-encoded string. + # + # `null` is allowed for any column type where a value is missing. attr_reader :values attr_accessor :additional_properties diff --git a/lib/datadog_api_client/v2/models/llm_obs_patterns_config_attributes.rb b/lib/datadog_api_client/v2/models/llm_obs_patterns_config_attributes.rb index 86ff20b00da5..c28f4fc97ea5 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_patterns_config_attributes.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_patterns_config_attributes.rb @@ -27,6 +27,9 @@ class LLMObsPatternsConfigAttributes # Timestamp when the configuration was created. attr_reader :created_at + # Whether automatic dataset curation is enabled for this configuration. + attr_accessor :curation_enabled + # Query that selects the spans the patterns run analyzes. attr_reader :evp_query @@ -65,6 +68,7 @@ def self.attribute_map { :'account_id' => :'account_id', :'created_at' => :'created_at', + :'curation_enabled' => :'curation_enabled', :'evp_query' => :'evp_query', :'hierarchy_depth' => :'hierarchy_depth', :'integration_provider' => :'integration_provider', @@ -84,6 +88,7 @@ def self.openapi_types { :'account_id' => :'String', :'created_at' => :'Time', + :'curation_enabled' => :'Boolean', :'evp_query' => :'String', :'hierarchy_depth' => :'Integer', :'integration_provider' => :'String', @@ -134,6 +139,10 @@ def initialize(attributes = {}) self.created_at = attributes[:'created_at'] end + if attributes.key?(:'curation_enabled') + self.curation_enabled = attributes[:'curation_enabled'] + end + if attributes.key?(:'evp_query') self.evp_query = attributes[:'evp_query'] end @@ -306,6 +315,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && created_at == o.created_at && + curation_enabled == o.curation_enabled && evp_query == o.evp_query && hierarchy_depth == o.hierarchy_depth && integration_provider == o.integration_provider && @@ -323,7 +333,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_id, created_at, evp_query, hierarchy_depth, integration_provider, model_name, name, num_records, sampling_ratio, scope, template, updated_at, additional_properties].hash + [account_id, created_at, curation_enabled, evp_query, hierarchy_depth, integration_provider, model_name, name, num_records, sampling_ratio, scope, template, updated_at, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_patterns_config_item.rb b/lib/datadog_api_client/v2/models/llm_obs_patterns_config_item.rb index ddfe330144aa..05fa8a06bf33 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_patterns_config_item.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_patterns_config_item.rb @@ -27,6 +27,9 @@ class LLMObsPatternsConfigItem # Timestamp when the configuration was created. attr_reader :created_at + # Whether automatic dataset curation is enabled for this configuration. + attr_accessor :curation_enabled + # Query that selects the spans the patterns run analyzes. attr_reader :evp_query @@ -68,6 +71,7 @@ def self.attribute_map { :'account_id' => :'account_id', :'created_at' => :'created_at', + :'curation_enabled' => :'curation_enabled', :'evp_query' => :'evp_query', :'hierarchy_depth' => :'hierarchy_depth', :'id' => :'id', @@ -88,6 +92,7 @@ def self.openapi_types { :'account_id' => :'String', :'created_at' => :'Time', + :'curation_enabled' => :'Boolean', :'evp_query' => :'String', :'hierarchy_depth' => :'Integer', :'id' => :'String', @@ -139,6 +144,10 @@ def initialize(attributes = {}) self.created_at = attributes[:'created_at'] end + if attributes.key?(:'curation_enabled') + self.curation_enabled = attributes[:'curation_enabled'] + end + if attributes.key?(:'evp_query') self.evp_query = attributes[:'evp_query'] end @@ -326,6 +335,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && created_at == o.created_at && + curation_enabled == o.curation_enabled && evp_query == o.evp_query && hierarchy_depth == o.hierarchy_depth && id == o.id && @@ -344,7 +354,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_id, created_at, evp_query, hierarchy_depth, id, integration_provider, model_name, name, num_records, sampling_ratio, scope, template, updated_at, additional_properties].hash + [account_id, created_at, curation_enabled, evp_query, hierarchy_depth, id, integration_provider, model_name, name, num_records, sampling_ratio, scope, template, updated_at, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/llm_obs_patterns_config_upsert_request_attributes.rb b/lib/datadog_api_client/v2/models/llm_obs_patterns_config_upsert_request_attributes.rb index 16be43cbc408..874065b619f9 100644 --- a/lib/datadog_api_client/v2/models/llm_obs_patterns_config_upsert_request_attributes.rb +++ b/lib/datadog_api_client/v2/models/llm_obs_patterns_config_upsert_request_attributes.rb @@ -27,6 +27,11 @@ class LLMObsPatternsConfigUpsertRequestAttributes # The ID of an existing configuration to update. If omitted, a new configuration is created. attr_accessor :config_id + # When true, Datadog automatically provisions a managed project and dataset + # (`{pattern-name}-pattern-curated`) to receive suggested interactions after + # each run. Defaults to true for new patterns. + attr_accessor :curation_enabled + # Query that selects the spans the patterns run analyzes. attr_reader :evp_query @@ -62,6 +67,7 @@ def self.attribute_map { :'account_id' => :'account_id', :'config_id' => :'config_id', + :'curation_enabled' => :'curation_enabled', :'evp_query' => :'evp_query', :'hierarchy_depth' => :'hierarchy_depth', :'integration_provider' => :'integration_provider', @@ -80,6 +86,7 @@ def self.openapi_types { :'account_id' => :'String', :'config_id' => :'String', + :'curation_enabled' => :'Boolean', :'evp_query' => :'String', :'hierarchy_depth' => :'Integer', :'integration_provider' => :'String', @@ -118,6 +125,10 @@ def initialize(attributes = {}) self.config_id = attributes[:'config_id'] end + if attributes.key?(:'curation_enabled') + self.curation_enabled = attributes[:'curation_enabled'] + end + if attributes.key?(:'evp_query') self.evp_query = attributes[:'evp_query'] end @@ -253,6 +264,7 @@ def ==(o) self.class == o.class && account_id == o.account_id && config_id == o.config_id && + curation_enabled == o.curation_enabled && evp_query == o.evp_query && hierarchy_depth == o.hierarchy_depth && integration_provider == o.integration_provider && @@ -269,7 +281,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [account_id, config_id, evp_query, hierarchy_depth, integration_provider, model_name, name, num_records, sampling_ratio, scope, template, additional_properties].hash + [account_id, config_id, curation_enabled, evp_query, hierarchy_depth, integration_provider, model_name, name, num_records, sampling_ratio, scope, template, additional_properties].hash end end end