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
234 changes: 233 additions & 1 deletion generated_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -3722,6 +3722,237 @@
"title": "topic_map"
}
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"simulation"
]
},
"config": {
"anyOf": [
{
"type": "object",
"properties": {
"initiator": {
"type": "string",
"enum": [
"agent",
"simulated_user"
],
"default": "agent",
"description": "Who speaks first in the conversation"
},
"timeout_seconds": {
"type": "integer",
"minimum": 15,
"maximum": 3600,
"default": 600,
"description": "Maximum conversation duration in seconds"
},
"modality": {
"type": "string",
"enum": [
"voice"
],
"default": "voice"
},
"agent": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"livekit"
]
},
"server_url": {
"type": "string",
"minLength": 1,
"description": "The WebSocket URL of the LiveKit project hosting the agent"
},
"agent_name": {
"type": "string",
"minLength": 1,
"description": "The name of the LiveKit agent to dispatch"
}
},
"required": [
"type",
"server_url",
"agent_name"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"phone"
]
},
"phone_number": {
"type": "string",
"pattern": "^\\+[1-9]\\d{7,14}$"
}
},
"required": [
"type",
"phone_number"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"sip"
]
},
"uri": {
"type": "string",
"pattern": "^sips?:[^\\s]+$"
}
},
"required": [
"type",
"uri"
],
"additionalProperties": false
}
]
}
},
"required": [
"agent"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"initiator": {
"type": "string",
"enum": [
"agent",
"simulated_user"
],
"default": "agent",
"description": "Who speaks first in the conversation"
},
"timeout_seconds": {
"type": "integer",
"minimum": 15,
"maximum": 3600,
"default": 600,
"description": "Maximum conversation duration in seconds"
},
"modality": {
"type": "string",
"enum": [
"text"
]
},
"agent": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"livekit"
]
},
"server_url": {
"type": "string",
"minLength": 1,
"description": "The WebSocket URL of the LiveKit project hosting the agent"
},
"agent_name": {
"type": "string",
"minLength": 1,
"description": "The name of the LiveKit agent to dispatch"
}
},
"required": [
"type",
"server_url",
"agent_name"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"acp"
]
},
"command": {
"type": "string",
"minLength": 1,
"description": "Executable for the ACP agent subprocess, communicating over stdio"
},
"args": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Arguments passed to the executable without shell interpretation"
},
"cwd": {
"type": "string",
"pattern": "^(?:\\/|[A-Za-z]:[\\\\/]|\\\\\\\\)",
"description": "Absolute working directory for the ACP session on the execution host"
},
"permissions": {
"type": "string",
"enum": [
"deny"
],
"default": "deny",
"description": "Deny ACP permission requests; this does not sandbox the subprocess"
}
},
"required": [
"type",
"command",
"cwd"
],
"additionalProperties": false
}
]
}
},
"required": [
"modality",
"agent"
],
"additionalProperties": false
}
]
}
},
"required": [
"type",
"config"
],
"additionalProperties": false,
"description": "A task function that runs a conversation between an agent and a simulated user.",
"title": "simulation"
}
]
},
Expand All @@ -3732,7 +3963,8 @@
"code",
"global",
"graph",
"topic_map"
"topic_map",
"simulation"
]
},
"FunctionId": {
Expand Down
96 changes: 95 additions & 1 deletion py/src/braintrust/_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,100 @@ class FunctionDataFunctionData4(TypedDict):
"""


FunctionFormat: TypeAlias = Literal['llm', 'code', 'global', 'graph', 'topic_map']
class FunctionDataFunctionData5ConfigAgent(TypedDict):
type: Literal['livekit']
server_url: str
"""
The WebSocket URL of the LiveKit project hosting the agent
"""
agent_name: str
"""
The name of the LiveKit agent to dispatch
"""


class FunctionDataFunctionData5ConfigAgent1(TypedDict):
type: Literal['phone']
phone_number: str


class FunctionDataFunctionData5ConfigAgent2(TypedDict):
type: Literal['sip']
uri: str


class FunctionDataFunctionData5Config(TypedDict):
initiator: NotRequired[Literal['agent', 'simulated_user'] | None]
"""
Who speaks first in the conversation
"""
timeout_seconds: NotRequired[int | None]
"""
Maximum conversation duration in seconds
"""
modality: NotRequired[Literal['voice'] | None]
agent: (
FunctionDataFunctionData5ConfigAgent
| FunctionDataFunctionData5ConfigAgent1
| FunctionDataFunctionData5ConfigAgent2
)


class FunctionDataFunctionData5Config1Agent(TypedDict):
type: Literal['livekit']
server_url: str
"""
The WebSocket URL of the LiveKit project hosting the agent
"""
agent_name: str
"""
The name of the LiveKit agent to dispatch
"""


class FunctionDataFunctionData5Config1Agent1(TypedDict):
type: Literal['acp']
command: str
"""
Executable for the ACP agent subprocess, communicating over stdio
"""
args: NotRequired[Sequence[str] | None]
"""
Arguments passed to the executable without shell interpretation
"""
cwd: str
"""
Absolute working directory for the ACP session on the execution host
"""
permissions: NotRequired[Literal['deny'] | None]
"""
Deny ACP permission requests; this does not sandbox the subprocess
"""


class FunctionDataFunctionData5Config1(TypedDict):
initiator: NotRequired[Literal['agent', 'simulated_user'] | None]
"""
Who speaks first in the conversation
"""
timeout_seconds: NotRequired[int | None]
"""
Maximum conversation duration in seconds
"""
modality: Literal['text']
agent: (
FunctionDataFunctionData5Config1Agent | FunctionDataFunctionData5Config1Agent1
)


class FunctionDataFunctionData5(TypedDict):
type: Literal['simulation']
config: FunctionDataFunctionData5Config | FunctionDataFunctionData5Config1


FunctionFormat: TypeAlias = Literal[
'llm', 'code', 'global', 'graph', 'topic_map', 'simulation'
]


class FunctionIdFunctionId(TypedDict):
Expand Down Expand Up @@ -4821,6 +4914,7 @@ class RunEval(TypedDict):
| BatchedFacetData
| FunctionDataFunctionData4
| TopicMapData
| FunctionDataFunctionData5
)


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 387034529ea006a9) -- do not modify"""
"""Auto-generated file (content hash 062c5cc3a447a7b7) -- do not modify"""

from ._generated_types import (
Acl,
Expand Down
Loading