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
64 changes: 63 additions & 1 deletion generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -5089,7 +5089,7 @@
"type": "null"
}
],
"description": "The scope at which to run the functions. Defaults to span-level execution. Trace/group scope requires all functions to be facets."
"description": "The scope at which to run the functions. Defaults to span-level execution."
}
},
"required": [
Expand Down Expand Up @@ -5516,6 +5516,68 @@
"credentials"
]
},
{
"type": "object",
"properties": {
"event_type": {
"type": "string",
"enum": [
"async_query"
],
"description": "The type of automation."
},
"status": {
"$ref": "#/components/schemas/AutomationStatus"
},
"created_by_user_id": {
"type": "string",
"format": "uuid",
"description": "The user who submitted the async query"
},
"object_type": {
"type": "string",
"enum": [
"project_logs",
"experiment",
"dataset",
"playground_logs"
],
"description": "The source object type for the async query"
},
"object_id": {
"type": "string",
"description": "The source object ID for the async query"
},
"query": {
"type": "string",
"description": "The SQL query to execute asynchronously"
},
"format": {
"type": "string",
"enum": [
"jsonl"
],
"description": "The materialized result format"
},
"batch_size": {
"type": [
"integer",
"null"
],
"exclusiveMinimum": 0,
"maximum": 100000,
"description": "The maximum number of result rows to write per async query batch"
}
},
"required": [
"event_type",
"created_by_user_id",
"object_type",
"object_id",
"query",
"format"
]
},
{
"type": "object",
"properties": {
Expand Down
45 changes: 39 additions & 6 deletions py/src/braintrust/_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1699,7 +1699,39 @@ class ProjectAutomationConfig1Credentials1(TypedDict):
"""


class ProjectAutomationConfig3Action(TypedDict):
class ProjectAutomationConfig2(TypedDict):
event_type: Literal['async_query']
"""
The type of automation.
"""
status: NotRequired[AutomationStatus | None]
created_by_user_id: str
"""
The user who submitted the async query
"""
object_type: Literal['project_logs', 'experiment', 'dataset', 'playground_logs']
"""
The source object type for the async query
"""
object_id: str
"""
The source object ID for the async query
"""
query: str
"""
The SQL query to execute asynchronously
"""
format: Literal['jsonl']
"""
The materialized result format
"""
batch_size: NotRequired[int | None]
"""
The maximum number of result rows to write per async query batch
"""


class ProjectAutomationConfig4Action(TypedDict):
type: Literal['webhook']
"""
The type of action to take
Expand All @@ -1710,7 +1742,7 @@ class ProjectAutomationConfig3Action(TypedDict):
"""


class ProjectAutomationConfig3Action1(TypedDict):
class ProjectAutomationConfig4Action1(TypedDict):
type: Literal['slack']
"""
The type of action to take
Expand All @@ -1729,7 +1761,7 @@ class ProjectAutomationConfig3Action1(TypedDict):
"""


class ProjectAutomationConfig3(TypedDict):
class ProjectAutomationConfig4(TypedDict):
event_type: Literal['environment_update']
"""
The type of automation.
Expand All @@ -1738,7 +1770,7 @@ class ProjectAutomationConfig3(TypedDict):
"""
Optional list of environment slugs to filter by
"""
action: ProjectAutomationConfig3Action | ProjectAutomationConfig3Action1
action: ProjectAutomationConfig4Action | ProjectAutomationConfig4Action1
"""
The action to take when the automation rule is triggered
"""
Expand Down Expand Up @@ -3231,7 +3263,7 @@ class OnlineScoreConfig(TypedDict):
"""
scope: NotRequired[SpanScope | TraceScope | GroupScope | None]
"""
The scope at which to run the functions. Defaults to span-level execution. Trace/group scope requires all functions to be facets.
The scope at which to run the functions. Defaults to span-level execution.
"""


Expand Down Expand Up @@ -3306,7 +3338,7 @@ class ProjectAutomationConfig1(TypedDict):
"""


class ProjectAutomationConfig2(TypedDict):
class ProjectAutomationConfig3(TypedDict):
event_type: Literal['retention']
"""
The type of automation.
Expand Down Expand Up @@ -3654,6 +3686,7 @@ class ProjectAutomation(TypedDict):
| ProjectAutomationConfig1
| ProjectAutomationConfig2
| ProjectAutomationConfig3
| ProjectAutomationConfig4
| TopicAutomationConfig
)
"""
Expand Down
2 changes: 1 addition & 1 deletion py/src/braintrust/generated_types.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Auto-generated file (content hash 544695dbf71e867b) -- do not modify"""
"""Auto-generated file (content hash e03e600b282a3442) -- do not modify"""

from ._generated_types import (
Acl,
Expand Down
Loading