Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81749,6 +81749,15 @@ components:
example: openai
nullable: true
type: string
min_cluster_size:
description: |-
Minimum topic size, the smallest number of interactions a topic must contain. Topics with fewer
interactions are moved to Outliers.
example: 15
format: int32
maximum: 2147483647
minimum: 2
type: integer
model_name:
description: Model name for a bring-your-own-model configuration.
example: gpt-4o
Expand Down Expand Up @@ -81788,6 +81797,7 @@ components:
- evp_query
- sampling_ratio
- num_records
- min_cluster_size
- hierarchy_depth
- scope
- created_at
Expand Down Expand Up @@ -81825,6 +81835,15 @@ components:
example: openai
nullable: true
type: string
min_cluster_size:
description: |-
Minimum topic size, the smallest number of interactions a topic must contain. Topics with fewer
interactions are moved to Outliers.
example: 15
format: int32
maximum: 2147483647
minimum: 2
type: integer
model_name:
description: Model name for a bring-your-own-model configuration.
example: gpt-4o
Expand Down Expand Up @@ -81865,6 +81884,7 @@ components:
- evp_query
- sampling_ratio
- num_records
- min_cluster_size
- hierarchy_depth
- scope
- created_at
Expand Down Expand Up @@ -81977,6 +81997,15 @@ components:
description: Integration provider for a bring-your-own-model configuration.
example: openai
type: string
min_cluster_size:
description: |-
Minimum topic size, the smallest number of interactions a topic must contain. Topics with fewer
interactions are moved to Outliers. Must be at least 2 and less than `num_records`. Required when creating a configuration.
example: 15
format: int32
maximum: 2147483647
minimum: 2
type: integer
model_name:
description: Model name for a bring-your-own-model configuration.
example: gpt-4o
Expand Down Expand Up @@ -210024,6 +210053,7 @@ paths:
evp_query: "@ml_app:support-bot"
hierarchy_depth: 2
id: a7c8d9e0-1234-5678-9abc-def012345678
min_cluster_size: 15
name: Support chatbot topics
num_records: 1000
sampling_ratio: 0.1
Expand Down Expand Up @@ -210083,6 +210113,7 @@ paths:
attributes:
evp_query: "@ml_app:support-bot"
hierarchy_depth: 2
min_cluster_size: 15
name: Support chatbot topics
num_records: 1000
sampling_ratio: 0.1
Expand All @@ -210103,6 +210134,7 @@ paths:
created_at: "2024-01-15T10:30:00Z"
evp_query: "@ml_app:support-bot"
hierarchy_depth: 2
min_cluster_size: 15
name: Support chatbot topics
num_records: 1000
sampling_ratio: 0.1
Expand Down Expand Up @@ -210171,6 +210203,7 @@ paths:
created_at: "2024-01-15T10:30:00Z"
evp_query: "@ml_app:support-bot"
hierarchy_depth: 2
min_cluster_size: 15
name: Support chatbot topics
num_records: 1000
sampling_ratio: 0.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
evp_query="@ml_app:support-bot",
hierarchy_depth=2,
integration_provider="openai",
min_cluster_size=15,
model_name="gpt-4o",
name="Support chatbot topics",
num_records=1000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class LLMObsPatternsConfigAttributes(ModelNormal):
"hierarchy_depth": {
"inclusive_maximum": 2147483647,
},
"min_cluster_size": {
"inclusive_maximum": 2147483647,
"inclusive_minimum": 2,
},
"num_records": {
"inclusive_maximum": 2147483647,
},
Expand All @@ -33,6 +37,7 @@ def openapi_types(_):
"evp_query": (str,),
"hierarchy_depth": (int,),
"integration_provider": (str, none_type),
"min_cluster_size": (int,),
"model_name": (str, none_type),
"name": (str,),
"num_records": (int,),
Expand All @@ -48,6 +53,7 @@ def openapi_types(_):
"evp_query": "evp_query",
"hierarchy_depth": "hierarchy_depth",
"integration_provider": "integration_provider",
"min_cluster_size": "min_cluster_size",
"model_name": "model_name",
"name": "name",
"num_records": "num_records",
Expand All @@ -62,6 +68,7 @@ def __init__(
created_at: datetime,
evp_query: str,
hierarchy_depth: int,
min_cluster_size: int,
name: str,
num_records: int,
sampling_ratio: float,
Expand Down Expand Up @@ -91,6 +98,10 @@ def __init__(
:param integration_provider: Integration provider for a bring-your-own-model configuration.
:type integration_provider: str, none_type, optional

:param min_cluster_size: Minimum topic size, the smallest number of interactions a topic must contain. Topics with fewer
interactions are moved to Outliers.
:type min_cluster_size: int

:param model_name: Model name for a bring-your-own-model configuration.
:type model_name: str, none_type, optional

Expand Down Expand Up @@ -125,6 +136,7 @@ def __init__(
self_.created_at = created_at
self_.evp_query = evp_query
self_.hierarchy_depth = hierarchy_depth
self_.min_cluster_size = min_cluster_size
self_.name = name
self_.num_records = num_records
self_.sampling_ratio = sampling_ratio
Expand Down
12 changes: 12 additions & 0 deletions src/datadog_api_client/v2/model/llm_obs_patterns_config_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class LLMObsPatternsConfigItem(ModelNormal):
"hierarchy_depth": {
"inclusive_maximum": 2147483647,
},
"min_cluster_size": {
"inclusive_maximum": 2147483647,
"inclusive_minimum": 2,
},
"num_records": {
"inclusive_maximum": 2147483647,
},
Expand All @@ -34,6 +38,7 @@ def openapi_types(_):
"hierarchy_depth": (int,),
"id": (str,),
"integration_provider": (str, none_type),
"min_cluster_size": (int,),
"model_name": (str, none_type),
"name": (str,),
"num_records": (int,),
Expand All @@ -50,6 +55,7 @@ def openapi_types(_):
"hierarchy_depth": "hierarchy_depth",
"id": "id",
"integration_provider": "integration_provider",
"min_cluster_size": "min_cluster_size",
"model_name": "model_name",
"name": "name",
"num_records": "num_records",
Expand All @@ -65,6 +71,7 @@ def __init__(
evp_query: str,
hierarchy_depth: int,
id: str,
min_cluster_size: int,
name: str,
num_records: int,
sampling_ratio: float,
Expand Down Expand Up @@ -97,6 +104,10 @@ def __init__(
:param integration_provider: Integration provider for a bring-your-own-model configuration.
:type integration_provider: str, none_type, optional

:param min_cluster_size: Minimum topic size, the smallest number of interactions a topic must contain. Topics with fewer
interactions are moved to Outliers.
:type min_cluster_size: int

:param model_name: Model name for a bring-your-own-model configuration.
:type model_name: str, none_type, optional

Expand Down Expand Up @@ -132,6 +143,7 @@ def __init__(
self_.evp_query = evp_query
self_.hierarchy_depth = hierarchy_depth
self_.id = id
self_.min_cluster_size = min_cluster_size
self_.name = name
self_.num_records = num_records
self_.sampling_ratio = sampling_ratio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ class LLMObsPatternsConfigUpsertRequestAttributes(ModelNormal):
"hierarchy_depth": {
"inclusive_maximum": 2147483647,
},
"min_cluster_size": {
"inclusive_maximum": 2147483647,
"inclusive_minimum": 2,
},
"num_records": {
"inclusive_maximum": 2147483647,
},
Expand All @@ -31,6 +35,7 @@ def openapi_types(_):
"evp_query": (str,),
"hierarchy_depth": (int,),
"integration_provider": (str,),
"min_cluster_size": (int,),
"model_name": (str,),
"name": (str,),
"num_records": (int,),
Expand All @@ -45,6 +50,7 @@ def openapi_types(_):
"evp_query": "evp_query",
"hierarchy_depth": "hierarchy_depth",
"integration_provider": "integration_provider",
"min_cluster_size": "min_cluster_size",
"model_name": "model_name",
"name": "name",
"num_records": "num_records",
Expand All @@ -63,6 +69,7 @@ def __init__(
account_id: Union[str, UnsetType] = unset,
config_id: Union[str, UnsetType] = unset,
integration_provider: Union[str, UnsetType] = unset,
min_cluster_size: Union[int, UnsetType] = unset,
model_name: Union[str, UnsetType] = unset,
scope: Union[str, UnsetType] = unset,
template: Union[str, UnsetType] = unset,
Expand All @@ -86,6 +93,10 @@ def __init__(
:param integration_provider: Integration provider for a bring-your-own-model configuration.
:type integration_provider: str, optional

:param min_cluster_size: Minimum topic size, the smallest number of interactions a topic must contain. Topics with fewer
interactions are moved to Outliers. Must be at least 2 and less than ``num_records``. Required when creating a configuration.
:type min_cluster_size: int, optional

:param model_name: Model name for a bring-your-own-model configuration.
:type model_name: str, optional

Expand All @@ -110,6 +121,8 @@ def __init__(
kwargs["config_id"] = config_id
if integration_provider is not unset:
kwargs["integration_provider"] = integration_provider
if min_cluster_size is not unset:
kwargs["min_cluster_size"] = min_cluster_size
if model_name is not unset:
kwargs["model_name"] = model_name
if scope is not unset:
Expand Down
6 changes: 3 additions & 3 deletions tests/v2/features/agent_observability.feature
Original file line number Diff line number Diff line change
Expand Up @@ -370,23 +370,23 @@ Feature: Agent 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", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "min_cluster_size": 15, "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:ddoghq/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", "evp_query": "@ml_app:support-bot", "hierarchy_depth": 2, "integration_provider": "openai", "min_cluster_size": 15, "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:ddoghq/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"}}
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", "min_cluster_size": 15, "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

Expand Down
Loading