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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.150.0"
".": "4.151.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 1047
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-1d40dd48b29a34bbfcc793ac13312e30f9e7f6ac213f743f44d4d7a019132211.yml
openapi_spec_hash: 811911fb01d3e42b62305264c779829f
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-f0b674236fbd66f50b5a1706fafd8cb681459cf05379967fd1f043d38d6d476d.yml
openapi_spec_hash: 7ae2cfe4f10fc24e4376fd15cd3455e8
config_hash: da8cae8a6100e4d90af920e222524d09
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.151.0 (2026-06-05)

Full Changelog: [v4.150.0...v4.151.0](https://github.com/team-telnyx/telnyx-python/compare/v4.150.0...v4.151.0)

### Features

* Conversation flow update ([222a515](https://github.com/team-telnyx/telnyx-python/commit/222a515891253a53bbfe47ca6750ebb5daf5855f))

## 4.150.0 (2026-06-04)

Full Changelog: [v4.149.1...v4.150.0](https://github.com/team-telnyx/telnyx-python/compare/v4.149.1...v4.150.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "telnyx"
version = "4.150.0"
version = "4.151.0"
description = "The official Python library for the telnyx API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/telnyx/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "telnyx"
__version__ = "4.150.0" # x-release-please-version
__version__ = "4.151.0" # x-release-please-version
75 changes: 73 additions & 2 deletions src/telnyx/types/ai/assistant_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"ConversationFlowNodeFlowNodeReqPosition",
"ConversationFlowNodeToolNodeReq",
"ConversationFlowNodeToolNodeReqPosition",
"ConversationFlowNodeSpeakNodeReq",
"ConversationFlowNodeSpeakNodeReqPosition",
"ConversationFlowEdge",
"ConversationFlowEdgeCondition",
"ConversationFlowEdgeConditionLlmCondition",
Expand All @@ -40,6 +42,7 @@
"ConversationFlowEdgeConditionExpressionConditionExpressionStringLiteralExpression",
"ConversationFlowEdgeConditionExpressionConditionExpressionNumberLiteralExpression",
"ConversationFlowEdgeConditionExpressionConditionExpressionBooleanLiteralExpression",
"ConversationFlowEdgeConditionDefaultCondition",
"ConversationFlowEdgeTarget",
"ConversationFlowEdgeTargetNodeTarget",
"ConversationFlowEdgeTargetAssistantTarget",
Expand Down Expand Up @@ -349,7 +352,58 @@ class ConversationFlowNodeToolNodeReq(TypedDict, total=False):
"""Node kind discriminator. Always `tool` for a tool node."""


ConversationFlowNode: TypeAlias = Union[ConversationFlowNodeFlowNodeReq, ConversationFlowNodeToolNodeReq]
class ConversationFlowNodeSpeakNodeReqPosition(TypedDict, total=False):
"""Optional canvas coordinates used by authoring UIs to lay out the graph.

Ignored by the runtime; round-trips so frontends can persist graph layout across reloads.
"""

x: Required[float]
"""Horizontal coordinate in the authoring canvas."""

y: Required[float]
"""Vertical coordinate in the authoring canvas."""


class ConversationFlowNodeSpeakNodeReq(TypedDict, total=False):
"""A standalone scripted-message step in a flow, as supplied by clients.

Unlike a prompt node, a speak node has no instructions or model — it isn't
an LLM turn. Reaching it delivers `message` to the user verbatim (with
`{{variable}}` interpolation), then routes via outgoing `llm` /
`expression` edges.
"""

id: Required[str]
"""Caller-supplied unique identifier for this node within the flow."""

message: Required[str]
"""Message delivered to the user verbatim when the flow reaches this node.

No LLM turn — the text is spoken/sent exactly as written. `{{variable}}`
placeholders are interpolated from the conversation's dynamic variables; an
unresolved placeholder renders as an empty string. After delivering, the flow
routes via the node's outgoing `llm` / `expression` edges (commonly a single
unconditional edge).
"""

name: str
"""Optional human-readable label, displayed in authoring UIs."""

position: ConversationFlowNodeSpeakNodeReqPosition
"""Optional canvas coordinates used by authoring UIs to lay out the graph.

Ignored by the runtime; round-trips so frontends can persist graph layout across
reloads.
"""

type: Literal["speak"]
"""Node kind discriminator. Always `speak` for a speak node."""


ConversationFlowNode: TypeAlias = Union[
ConversationFlowNodeFlowNodeReq, ConversationFlowNodeToolNodeReq, ConversationFlowNodeSpeakNodeReq
]


class ConversationFlowEdgeConditionLlmCondition(TypedDict, total=False):
Expand Down Expand Up @@ -438,8 +492,25 @@ class ConversationFlowEdgeConditionExpressionCondition(TypedDict, total=False):
type: Required[Literal["expression"]]


class ConversationFlowEdgeConditionDefaultCondition(TypedDict, total=False):
"""Fallback edge condition: fires only when no other edge's condition is true.

Evaluated after every conditioned (`llm` / `expression`) edge regardless
of declaration order, so it routes the flow whenever none of the node's
other outgoing edges match. Valid **only** on edges leaving a `tool` or
`speak` node, where the deterministic step auto-advances and must always
have somewhere to go. A tool/speak node with any outgoing edge is required
to carry exactly one `default` edge so it never dead-ends; a tool/speak
node with no outgoing edges is a valid terminal step. Carries no parameters.
"""

type: Required[Literal["default"]]


ConversationFlowEdgeCondition: TypeAlias = Union[
ConversationFlowEdgeConditionLlmCondition, ConversationFlowEdgeConditionExpressionCondition
ConversationFlowEdgeConditionLlmCondition,
ConversationFlowEdgeConditionExpressionCondition,
ConversationFlowEdgeConditionDefaultCondition,
]


Expand Down
75 changes: 73 additions & 2 deletions src/telnyx/types/ai/assistant_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"ConversationFlowNodeFlowNodeReqPosition",
"ConversationFlowNodeToolNodeReq",
"ConversationFlowNodeToolNodeReqPosition",
"ConversationFlowNodeSpeakNodeReq",
"ConversationFlowNodeSpeakNodeReqPosition",
"ConversationFlowEdge",
"ConversationFlowEdgeCondition",
"ConversationFlowEdgeConditionLlmCondition",
Expand All @@ -40,6 +42,7 @@
"ConversationFlowEdgeConditionExpressionConditionExpressionStringLiteralExpression",
"ConversationFlowEdgeConditionExpressionConditionExpressionNumberLiteralExpression",
"ConversationFlowEdgeConditionExpressionConditionExpressionBooleanLiteralExpression",
"ConversationFlowEdgeConditionDefaultCondition",
"ConversationFlowEdgeTarget",
"ConversationFlowEdgeTargetNodeTarget",
"ConversationFlowEdgeTargetAssistantTarget",
Expand Down Expand Up @@ -358,7 +361,58 @@ class ConversationFlowNodeToolNodeReq(TypedDict, total=False):
"""Node kind discriminator. Always `tool` for a tool node."""


ConversationFlowNode: TypeAlias = Union[ConversationFlowNodeFlowNodeReq, ConversationFlowNodeToolNodeReq]
class ConversationFlowNodeSpeakNodeReqPosition(TypedDict, total=False):
"""Optional canvas coordinates used by authoring UIs to lay out the graph.

Ignored by the runtime; round-trips so frontends can persist graph layout across reloads.
"""

x: Required[float]
"""Horizontal coordinate in the authoring canvas."""

y: Required[float]
"""Vertical coordinate in the authoring canvas."""


class ConversationFlowNodeSpeakNodeReq(TypedDict, total=False):
"""A standalone scripted-message step in a flow, as supplied by clients.

Unlike a prompt node, a speak node has no instructions or model — it isn't
an LLM turn. Reaching it delivers `message` to the user verbatim (with
`{{variable}}` interpolation), then routes via outgoing `llm` /
`expression` edges.
"""

id: Required[str]
"""Caller-supplied unique identifier for this node within the flow."""

message: Required[str]
"""Message delivered to the user verbatim when the flow reaches this node.

No LLM turn — the text is spoken/sent exactly as written. `{{variable}}`
placeholders are interpolated from the conversation's dynamic variables; an
unresolved placeholder renders as an empty string. After delivering, the flow
routes via the node's outgoing `llm` / `expression` edges (commonly a single
unconditional edge).
"""

name: str
"""Optional human-readable label, displayed in authoring UIs."""

position: ConversationFlowNodeSpeakNodeReqPosition
"""Optional canvas coordinates used by authoring UIs to lay out the graph.

Ignored by the runtime; round-trips so frontends can persist graph layout across
reloads.
"""

type: Literal["speak"]
"""Node kind discriminator. Always `speak` for a speak node."""


ConversationFlowNode: TypeAlias = Union[
ConversationFlowNodeFlowNodeReq, ConversationFlowNodeToolNodeReq, ConversationFlowNodeSpeakNodeReq
]


class ConversationFlowEdgeConditionLlmCondition(TypedDict, total=False):
Expand Down Expand Up @@ -447,8 +501,25 @@ class ConversationFlowEdgeConditionExpressionCondition(TypedDict, total=False):
type: Required[Literal["expression"]]


class ConversationFlowEdgeConditionDefaultCondition(TypedDict, total=False):
"""Fallback edge condition: fires only when no other edge's condition is true.

Evaluated after every conditioned (`llm` / `expression`) edge regardless
of declaration order, so it routes the flow whenever none of the node's
other outgoing edges match. Valid **only** on edges leaving a `tool` or
`speak` node, where the deterministic step auto-advances and must always
have somewhere to go. A tool/speak node with any outgoing edge is required
to carry exactly one `default` edge so it never dead-ends; a tool/speak
node with no outgoing edges is a valid terminal step. Carries no parameters.
"""

type: Required[Literal["default"]]


ConversationFlowEdgeCondition: TypeAlias = Union[
ConversationFlowEdgeConditionLlmCondition, ConversationFlowEdgeConditionExpressionCondition
ConversationFlowEdgeConditionLlmCondition,
ConversationFlowEdgeConditionExpressionCondition,
ConversationFlowEdgeConditionDefaultCondition,
]


Expand Down
75 changes: 73 additions & 2 deletions src/telnyx/types/ai/assistants/version_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
"ConversationFlowNodeFlowNodeReqPosition",
"ConversationFlowNodeToolNodeReq",
"ConversationFlowNodeToolNodeReqPosition",
"ConversationFlowNodeSpeakNodeReq",
"ConversationFlowNodeSpeakNodeReqPosition",
"ConversationFlowEdge",
"ConversationFlowEdgeCondition",
"ConversationFlowEdgeConditionLlmCondition",
Expand All @@ -40,6 +42,7 @@
"ConversationFlowEdgeConditionExpressionConditionExpressionStringLiteralExpression",
"ConversationFlowEdgeConditionExpressionConditionExpressionNumberLiteralExpression",
"ConversationFlowEdgeConditionExpressionConditionExpressionBooleanLiteralExpression",
"ConversationFlowEdgeConditionDefaultCondition",
"ConversationFlowEdgeTarget",
"ConversationFlowEdgeTargetNodeTarget",
"ConversationFlowEdgeTargetAssistantTarget",
Expand Down Expand Up @@ -354,7 +357,58 @@ class ConversationFlowNodeToolNodeReq(TypedDict, total=False):
"""Node kind discriminator. Always `tool` for a tool node."""


ConversationFlowNode: TypeAlias = Union[ConversationFlowNodeFlowNodeReq, ConversationFlowNodeToolNodeReq]
class ConversationFlowNodeSpeakNodeReqPosition(TypedDict, total=False):
"""Optional canvas coordinates used by authoring UIs to lay out the graph.

Ignored by the runtime; round-trips so frontends can persist graph layout across reloads.
"""

x: Required[float]
"""Horizontal coordinate in the authoring canvas."""

y: Required[float]
"""Vertical coordinate in the authoring canvas."""


class ConversationFlowNodeSpeakNodeReq(TypedDict, total=False):
"""A standalone scripted-message step in a flow, as supplied by clients.

Unlike a prompt node, a speak node has no instructions or model — it isn't
an LLM turn. Reaching it delivers `message` to the user verbatim (with
`{{variable}}` interpolation), then routes via outgoing `llm` /
`expression` edges.
"""

id: Required[str]
"""Caller-supplied unique identifier for this node within the flow."""

message: Required[str]
"""Message delivered to the user verbatim when the flow reaches this node.

No LLM turn — the text is spoken/sent exactly as written. `{{variable}}`
placeholders are interpolated from the conversation's dynamic variables; an
unresolved placeholder renders as an empty string. After delivering, the flow
routes via the node's outgoing `llm` / `expression` edges (commonly a single
unconditional edge).
"""

name: str
"""Optional human-readable label, displayed in authoring UIs."""

position: ConversationFlowNodeSpeakNodeReqPosition
"""Optional canvas coordinates used by authoring UIs to lay out the graph.

Ignored by the runtime; round-trips so frontends can persist graph layout across
reloads.
"""

type: Literal["speak"]
"""Node kind discriminator. Always `speak` for a speak node."""


ConversationFlowNode: TypeAlias = Union[
ConversationFlowNodeFlowNodeReq, ConversationFlowNodeToolNodeReq, ConversationFlowNodeSpeakNodeReq
]


class ConversationFlowEdgeConditionLlmCondition(TypedDict, total=False):
Expand Down Expand Up @@ -443,8 +497,25 @@ class ConversationFlowEdgeConditionExpressionCondition(TypedDict, total=False):
type: Required[Literal["expression"]]


class ConversationFlowEdgeConditionDefaultCondition(TypedDict, total=False):
"""Fallback edge condition: fires only when no other edge's condition is true.

Evaluated after every conditioned (`llm` / `expression`) edge regardless
of declaration order, so it routes the flow whenever none of the node's
other outgoing edges match. Valid **only** on edges leaving a `tool` or
`speak` node, where the deterministic step auto-advances and must always
have somewhere to go. A tool/speak node with any outgoing edge is required
to carry exactly one `default` edge so it never dead-ends; a tool/speak
node with no outgoing edges is a valid terminal step. Carries no parameters.
"""

type: Required[Literal["default"]]


ConversationFlowEdgeCondition: TypeAlias = Union[
ConversationFlowEdgeConditionLlmCondition, ConversationFlowEdgeConditionExpressionCondition
ConversationFlowEdgeConditionLlmCondition,
ConversationFlowEdgeConditionExpressionCondition,
ConversationFlowEdgeConditionDefaultCondition,
]


Expand Down
Loading
Loading