diff --git a/generated_types.json b/generated_types.json index 21fb1095..cca6da02 100644 --- a/generated_types.json +++ b/generated_types.json @@ -8473,7 +8473,7 @@ "type": "null" } ], - "description": "Execution scope for topic automation. Defaults to span-level execution." + "description": "Execution scope for topic automation." }, "data_scope": { "$ref": "#/components/schemas/TopicAutomationDataScope" @@ -8689,7 +8689,17 @@ }, "source_facet": { "type": "string", - "description": "The facet field name to use as input for classification" + "description": "Materialized facet field name used when source_facet_function is absent" + }, + "source_facet_function": { + "allOf": [ + { + "$ref": "#/components/schemas/SavedFunctionId" + }, + { + "description": "The stable function reference for the source facet" + } + ] }, "embedding_model": { "type": "string", diff --git a/py/src/braintrust/_generated_types.py b/py/src/braintrust/_generated_types.py index f40678a4..ca138a15 100644 --- a/py/src/braintrust/_generated_types.py +++ b/py/src/braintrust/_generated_types.py @@ -2680,6 +2680,42 @@ class TopicDigestAutomationConfig(TypedDict): """ +class SourceFacetFunctionSourceFacetFunction(TypedDict): + type: Literal['function'] + id: str + version: NotRequired[str | None] + """ + The version of the function + """ + + +class SourceFacetFunctionSourceFacetFunction1(TypedDict): + type: Literal['global'] + name: str + function_type: NotRequired[FunctionTypeEnum | None] + + +class SourceFacetFunctionSourceFacetFunction2(TypedDict): + pass + + +class SourceFacetFunctionSourceFacetFunction3( + SourceFacetFunctionSourceFacetFunction, SourceFacetFunctionSourceFacetFunction2 +): + pass + + +class SourceFacetFunctionSourceFacetFunction4( + SourceFacetFunctionSourceFacetFunction1, SourceFacetFunctionSourceFacetFunction2 +): + pass + + +SourceFacetFunction: TypeAlias = ( + SourceFacetFunctionSourceFacetFunction3 | SourceFacetFunctionSourceFacetFunction4 +) + + class Function1Function1(TypedDict): type: Literal['function'] id: str @@ -3812,7 +3848,7 @@ class TopicAutomationConfig(TypedDict): """ scope: NotRequired[SpanScope | TraceScope | GroupScope | None] """ - Execution scope for topic automation. Defaults to span-level execution. + Execution scope for topic automation. """ data_scope: NotRequired[TopicAutomationDataScope | None] btql_filter: NotRequired[str | None] @@ -3839,8 +3875,9 @@ class TopicMapData(TypedDict): type: Literal['topic_map'] source_facet: str """ - The facet field name to use as input for classification + Materialized facet field name used when source_facet_function is absent """ + source_facet_function: NotRequired[SourceFacetFunction | None] embedding_model: str """ The embedding model to use for embedding facet values diff --git a/py/src/braintrust/generated_types.py b/py/src/braintrust/generated_types.py index 16ddb3ef..06439648 100644 --- a/py/src/braintrust/generated_types.py +++ b/py/src/braintrust/generated_types.py @@ -1,4 +1,4 @@ -"""Auto-generated file (content hash 267ce67890c684fe) -- do not modify""" +"""Auto-generated file (content hash a530347bf79cb618) -- do not modify""" from ._generated_types import ( Acl,