diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index acd63e70a6..42d8846893 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.py b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.py index 9598d569f4..e0beb35c77 100644 --- a/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.py +++ b/examples/v2/llm-observability/UpsertLLMObsPatternsConfig.py @@ -18,6 +18,7 @@ attributes=LLMObsPatternsConfigUpsertRequestAttributes( 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/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 19b8d3d76f..2845db8c13 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -490,8 +490,6 @@ def __init__( "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/src/datadog_api_client/v2/model/ddsql_tabular_query_column.py b/src/datadog_api_client/v2/model/ddsql_tabular_query_column.py index ab778d989d..4fe462f5db 100644 --- a/src/datadog_api_client/v2/model/ddsql_tabular_query_column.py +++ b/src/datadog_api_client/v2/model/ddsql_tabular_query_column.py @@ -44,9 +44,17 @@ def __init__(self_, name: str, type: str, values: List[Any], **kwargs): for the full, up-to-date list. :type type: str - :param values: 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. + :param 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. :type values: [bool, date, datetime, dict, float, int, list, str, UUID, none_type] """ super().__init__(kwargs) 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 index 0abcad68e0..d627543957 100644 --- 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 @@ -30,6 +30,7 @@ def openapi_types(_): return { "account_id": (str, none_type), "created_at": (datetime,), + "curation_enabled": (bool,), "evp_query": (str,), "hierarchy_depth": (int,), "integration_provider": (str, none_type), @@ -45,6 +46,7 @@ def openapi_types(_): 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", @@ -68,6 +70,7 @@ def __init__( scope: str, updated_at: datetime, account_id: Union[str, none_type, UnsetType] = unset, + curation_enabled: Union[bool, 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, @@ -82,6 +85,9 @@ def __init__( :param created_at: Timestamp when the configuration was created. :type created_at: datetime + :param curation_enabled: Whether automatic dataset curation is enabled for this configuration. + :type curation_enabled: bool, optional + :param evp_query: Query that selects the spans the patterns run analyzes. :type evp_query: str @@ -114,6 +120,8 @@ def __init__( """ if account_id is not unset: kwargs["account_id"] = account_id + if curation_enabled is not unset: + kwargs["curation_enabled"] = curation_enabled if integration_provider is not unset: kwargs["integration_provider"] = integration_provider if model_name is not unset: 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 index 32b5f46226..81dd660b97 100644 --- 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 @@ -30,6 +30,7 @@ def openapi_types(_): return { "account_id": (str, none_type), "created_at": (datetime,), + "curation_enabled": (bool,), "evp_query": (str,), "hierarchy_depth": (int,), "id": (str,), @@ -46,6 +47,7 @@ def openapi_types(_): attribute_map = { "account_id": "account_id", "created_at": "created_at", + "curation_enabled": "curation_enabled", "evp_query": "evp_query", "hierarchy_depth": "hierarchy_depth", "id": "id", @@ -71,6 +73,7 @@ def __init__( scope: str, updated_at: datetime, account_id: Union[str, none_type, UnsetType] = unset, + curation_enabled: Union[bool, 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, @@ -85,6 +88,9 @@ def __init__( :param created_at: Timestamp when the configuration was created. :type created_at: datetime + :param curation_enabled: Whether automatic dataset curation is enabled for this configuration. + :type curation_enabled: bool, optional + :param evp_query: Query that selects the spans the patterns run analyzes. :type evp_query: str @@ -120,6 +126,8 @@ def __init__( """ if account_id is not unset: kwargs["account_id"] = account_id + if curation_enabled is not unset: + kwargs["curation_enabled"] = curation_enabled if integration_provider is not unset: kwargs["integration_provider"] = integration_provider if model_name is not unset: 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 index 41dd7799e6..e51ec1e544 100644 --- 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 @@ -28,6 +28,7 @@ def openapi_types(_): return { "account_id": (str,), "config_id": (str,), + "curation_enabled": (bool,), "evp_query": (str,), "hierarchy_depth": (int,), "integration_provider": (str,), @@ -42,6 +43,7 @@ def openapi_types(_): 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", @@ -62,6 +64,7 @@ def __init__( sampling_ratio: float, account_id: Union[str, UnsetType] = unset, config_id: Union[str, UnsetType] = unset, + curation_enabled: Union[bool, UnsetType] = unset, integration_provider: Union[str, UnsetType] = unset, model_name: Union[str, UnsetType] = unset, scope: Union[str, UnsetType] = unset, @@ -77,6 +80,11 @@ def __init__( :param config_id: The ID of an existing configuration to update. If omitted, a new configuration is created. :type config_id: str, optional + :param curation_enabled: 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. + :type curation_enabled: bool, optional + :param evp_query: Query that selects the spans the patterns run analyzes. :type evp_query: str @@ -108,6 +116,8 @@ def __init__( kwargs["account_id"] = account_id if config_id is not unset: kwargs["config_id"] = config_id + if curation_enabled is not unset: + kwargs["curation_enabled"] = curation_enabled if integration_provider is not unset: kwargs["integration_provider"] = integration_provider if model_name is not unset: diff --git a/tests/v2/features/llm_observability.feature b/tests/v2/features/llm_observability.feature index b1897f532b..37ac6ede00 100644 --- a/tests/v2/features/llm_observability.feature +++ b/tests/v2/features/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