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.31.0"
".": "4.32.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: 39
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell%2Ftoddlzt-33c92a2f7908f82088c3cad1076ac008f22cc41d25cbdbcd23b005bfd5e5ab3d.yml
openapi_spec_hash: 3df26020335431e67fdaa9c3865a6a81
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell%2Ftoddlzt-01ccd56ecde0b5e2e742326f26f3cf2c0bbafef856e1b032110be4880e162106.yml
openapi_spec_hash: 8b1688d1e66812ccafbe5fcf26faa67a
config_hash: f4bc63f2350a2a4988750b41a0737f9d
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 4.32.0 (2025-05-26)

Full Changelog: [v4.31.0...v4.32.0](https://github.com/RetellAI/retell-python-sdk/compare/v4.31.0...v4.32.0)

### Features

* **api:** api update ([59e4d5a](https://github.com/RetellAI/retell-python-sdk/commit/59e4d5a864c6e028437f5f15619aabad7d18b445))
* **api:** api update ([887256f](https://github.com/RetellAI/retell-python-sdk/commit/887256f2b38d8f6ed6a77d9855a39bc9ee53558f))

## 4.31.0 (2025-05-22)

Full Changelog: [v4.30.0...v4.31.0](https://github.com/RetellAI/retell-python-sdk/compare/v4.30.0...v4.31.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 = "retell-sdk"
version = "4.31.0"
version = "4.32.0"
description = "The official Python library for the retell API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/retell/_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__ = "retell"
__version__ = "4.31.0" # x-release-please-version
__version__ = "4.32.0" # x-release-please-version
24 changes: 24 additions & 0 deletions src/retell/resources/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def create(
stt_mode: Literal["fast", "accurate"] | NotGiven = NOT_GIVEN,
user_dtmf_options: Optional[agent_create_params.UserDtmfOptions] | NotGiven = NOT_GIVEN,
version: Optional[float] | NotGiven = NOT_GIVEN,
vocab_specialization: Literal["general", "medical"] | NotGiven = NOT_GIVEN,
voice_model: Optional[
Literal[
"eleven_turbo_v2",
Expand Down Expand Up @@ -301,6 +302,10 @@ def create(

version: Version of the agent.

vocab_specialization: If set, determines the vocabulary set to use for transcription. This setting
only applies for English agents, for non English agent, this setting is a no-op.
Default to general.

voice_model: Optionally set the voice model used for the selected voice. Currently only
elevenlab voices have voice model selections. Set to null to remove voice model
selection, and default ones will apply. Check out the dashboard for details on
Expand Down Expand Up @@ -377,6 +382,7 @@ def create(
"stt_mode": stt_mode,
"user_dtmf_options": user_dtmf_options,
"version": version,
"vocab_specialization": vocab_specialization,
"voice_model": voice_model,
"voice_speed": voice_speed,
"voice_temperature": voice_temperature,
Expand Down Expand Up @@ -512,6 +518,7 @@ def update(
stt_mode: Literal["fast", "accurate"] | NotGiven = NOT_GIVEN,
user_dtmf_options: Optional[agent_update_params.UserDtmfOptions] | NotGiven = NOT_GIVEN,
body_version: Optional[float] | NotGiven = NOT_GIVEN,
vocab_specialization: Literal["general", "medical"] | NotGiven = NOT_GIVEN,
voice_id: str | NotGiven = NOT_GIVEN,
voice_model: Optional[
Literal[
Expand Down Expand Up @@ -689,6 +696,10 @@ def update(

body_version: Version of the agent.

vocab_specialization: If set, determines the vocabulary set to use for transcription. This setting
only applies for English agents, for non English agent, this setting is a no-op.
Default to general.

voice_id: Unique voice id used for the agent. Find list of available voices and their
preview in Dashboard.

Expand Down Expand Up @@ -769,6 +780,7 @@ def update(
"stt_mode": stt_mode,
"user_dtmf_options": user_dtmf_options,
"body_version": body_version,
"vocab_specialization": vocab_specialization,
"voice_id": voice_id,
"voice_model": voice_model,
"voice_speed": voice_speed,
Expand Down Expand Up @@ -975,6 +987,7 @@ async def create(
stt_mode: Literal["fast", "accurate"] | NotGiven = NOT_GIVEN,
user_dtmf_options: Optional[agent_create_params.UserDtmfOptions] | NotGiven = NOT_GIVEN,
version: Optional[float] | NotGiven = NOT_GIVEN,
vocab_specialization: Literal["general", "medical"] | NotGiven = NOT_GIVEN,
voice_model: Optional[
Literal[
"eleven_turbo_v2",
Expand Down Expand Up @@ -1152,6 +1165,10 @@ async def create(

version: Version of the agent.

vocab_specialization: If set, determines the vocabulary set to use for transcription. This setting
only applies for English agents, for non English agent, this setting is a no-op.
Default to general.

voice_model: Optionally set the voice model used for the selected voice. Currently only
elevenlab voices have voice model selections. Set to null to remove voice model
selection, and default ones will apply. Check out the dashboard for details on
Expand Down Expand Up @@ -1228,6 +1245,7 @@ async def create(
"stt_mode": stt_mode,
"user_dtmf_options": user_dtmf_options,
"version": version,
"vocab_specialization": vocab_specialization,
"voice_model": voice_model,
"voice_speed": voice_speed,
"voice_temperature": voice_temperature,
Expand Down Expand Up @@ -1363,6 +1381,7 @@ async def update(
stt_mode: Literal["fast", "accurate"] | NotGiven = NOT_GIVEN,
user_dtmf_options: Optional[agent_update_params.UserDtmfOptions] | NotGiven = NOT_GIVEN,
body_version: Optional[float] | NotGiven = NOT_GIVEN,
vocab_specialization: Literal["general", "medical"] | NotGiven = NOT_GIVEN,
voice_id: str | NotGiven = NOT_GIVEN,
voice_model: Optional[
Literal[
Expand Down Expand Up @@ -1540,6 +1559,10 @@ async def update(

body_version: Version of the agent.

vocab_specialization: If set, determines the vocabulary set to use for transcription. This setting
only applies for English agents, for non English agent, this setting is a no-op.
Default to general.

voice_id: Unique voice id used for the agent. Find list of available voices and their
preview in Dashboard.

Expand Down Expand Up @@ -1620,6 +1643,7 @@ async def update(
"stt_mode": stt_mode,
"user_dtmf_options": user_dtmf_options,
"body_version": body_version,
"vocab_specialization": vocab_specialization,
"voice_id": voice_id,
"voice_model": voice_model,
"voice_speed": voice_speed,
Expand Down
7 changes: 7 additions & 0 deletions src/retell/types/agent_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,13 @@ class AgentCreateParams(TypedDict, total=False):
version: Optional[float]
"""Version of the agent."""

vocab_specialization: Literal["general", "medical"]
"""If set, determines the vocabulary set to use for transcription.

This setting only applies for English agents, for non English agent, this
setting is a no-op. Default to general.
"""

voice_model: Optional[
Literal[
"eleven_turbo_v2",
Expand Down
7 changes: 7 additions & 0 deletions src/retell/types/agent_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,13 @@ class AgentResponse(BaseModel):
version: Optional[object] = None
"""Version of the agent."""

vocab_specialization: Optional[Literal["general", "medical"]] = None
"""If set, determines the vocabulary set to use for transcription.

This setting only applies for English agents, for non English agent, this
setting is a no-op. Default to general.
"""

voice_model: Optional[
Literal[
"eleven_turbo_v2",
Expand Down
7 changes: 7 additions & 0 deletions src/retell/types/agent_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,13 @@ class AgentUpdateParams(TypedDict, total=False):
body_version: Annotated[Optional[float], PropertyInfo(alias="version")]
"""Version of the agent."""

vocab_specialization: Literal["general", "medical"]
"""If set, determines the vocabulary set to use for transcription.

This setting only applies for English agents, for non English agent, this
setting is a no-op. Default to general.
"""

voice_id: str
"""Unique voice id used for the agent.

Expand Down
3 changes: 3 additions & 0 deletions src/retell/types/chat_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ class ChatResponse(BaseModel):

chat_cost: Optional[ChatCost] = None

collected_dynamic_variables: Optional[Dict[str, object]] = None
"""Dynamic variables collected from the chat. Only available after the chat ends."""

end_timestamp: Optional[int] = None
"""End timestamp (milliseconds since epoch) of the chat.

Expand Down
21 changes: 21 additions & 0 deletions src/retell/types/phone_call_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"LatencyLlmWebsocketNetworkRtt",
"LatencyS2s",
"LatencyTts",
"LlmTokenUsage",
"TelephonyIdentifier",
"TranscriptObject",
"TranscriptObjectWord",
Expand Down Expand Up @@ -281,6 +282,17 @@ class Latency(BaseModel):
"""


class LlmTokenUsage(BaseModel):
average: float
"""Average token count of the call."""

num_requests: float
"""Number of requests made to the LLM."""

values: List[float]
"""All the token count values in the call."""


class TelephonyIdentifier(BaseModel):
twilio_call_sid: Optional[str] = None
"""Twilio call sid."""
Expand Down Expand Up @@ -439,6 +451,9 @@ class PhoneCallResponse(BaseModel):
call_cost: Optional[CallCost] = None
"""Cost of the call, including all the products and their costs and discount."""

collected_dynamic_variables: Optional[Dict[str, object]] = None
"""Dynamic variables collected from the call. Only available after the call ends."""

disconnection_reason: Optional[
Literal[
"user_hangup",
Expand Down Expand Up @@ -489,6 +504,12 @@ class PhoneCallResponse(BaseModel):
feature used.
"""

llm_token_usage: Optional[LlmTokenUsage] = None
"""LLM token usage of the call, available after call ends.

Not populated if using custom LLM, realtime API, or no LLM call is made.
"""

metadata: Optional[object] = None
"""An arbitrary object for storage purpose only.

Expand Down
21 changes: 21 additions & 0 deletions src/retell/types/web_call_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"LatencyLlmWebsocketNetworkRtt",
"LatencyS2s",
"LatencyTts",
"LlmTokenUsage",
"TranscriptObject",
"TranscriptObjectWord",
"TranscriptWithToolCall",
Expand Down Expand Up @@ -280,6 +281,17 @@ class Latency(BaseModel):
"""


class LlmTokenUsage(BaseModel):
average: float
"""Average token count of the call."""

num_requests: float
"""Number of requests made to the LLM."""

values: List[float]
"""All the token count values in the call."""


class TranscriptObjectWord(BaseModel):
end: Optional[float] = None
"""End time of the word in the call in second.
Expand Down Expand Up @@ -430,6 +442,9 @@ class WebCallResponse(BaseModel):
call_cost: Optional[CallCost] = None
"""Cost of the call, including all the products and their costs and discount."""

collected_dynamic_variables: Optional[Dict[str, object]] = None
"""Dynamic variables collected from the call. Only available after the call ends."""

disconnection_reason: Optional[
Literal[
"user_hangup",
Expand Down Expand Up @@ -480,6 +495,12 @@ class WebCallResponse(BaseModel):
feature used.
"""

llm_token_usage: Optional[LlmTokenUsage] = None
"""LLM token usage of the call, available after call ends.

Not populated if using custom LLM, realtime API, or no LLM call is made.
"""

metadata: Optional[object] = None
"""An arbitrary object for storage purpose only.

Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def test_method_create_with_all_params(self, client: Retell) -> None:
"timeout_ms": 1000,
},
version=0,
vocab_specialization="general",
voice_model="eleven_turbo_v2",
voice_speed=1,
voice_temperature=1,
Expand Down Expand Up @@ -240,6 +241,7 @@ def test_method_update_with_all_params(self, client: Retell) -> None:
"timeout_ms": 1000,
},
body_version=0,
vocab_specialization="general",
voice_id="11labs-Adrian",
voice_model="eleven_turbo_v2",
voice_speed=1,
Expand Down Expand Up @@ -454,6 +456,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRetell) ->
"timeout_ms": 1000,
},
version=0,
vocab_specialization="general",
voice_model="eleven_turbo_v2",
voice_speed=1,
voice_temperature=1,
Expand Down Expand Up @@ -606,6 +609,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRetell) ->
"timeout_ms": 1000,
},
body_version=0,
vocab_specialization="general",
voice_id="11labs-Adrian",
voice_model="eleven_turbo_v2",
voice_speed=1,
Expand Down
Loading