diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a4876bb5..c9071251 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.39.1" + ".": "5.40.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 227fac5f..6b613698 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 76 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell/retell-d2573b05221454951e2d3f6aa7e56afe1a1e81fac61608ddc4b67892a3b9527f.yml -openapi_spec_hash: 5fa3e4867d55623e7c51da628bb080bb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell/retell-356ae1b31c09ea2eaf1c24a93ff146e80880922a019050d6e0b6f3af2a59f565.yml +openapi_spec_hash: 0b21f22e97c2740d2402c697d933dbd7 config_hash: 563668cc30bc4847932ba265108c000c diff --git a/CHANGELOG.md b/CHANGELOG.md index 9538b0a6..70f3a78f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.40.0 (2026-05-18) + +Full Changelog: [v5.39.1...v5.40.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.39.1...v5.40.0) + +### Features + +* **api:** api update ([ceb0464](https://github.com/RetellAI/retell-python-sdk/commit/ceb0464f9818fc980045324aad0dbccbefbe02c1)) + ## 5.39.1 (2026-05-13) Full Changelog: [v5.39.0...v5.39.1](https://github.com/RetellAI/retell-python-sdk/compare/v5.39.0...v5.39.1) diff --git a/pyproject.toml b/pyproject.toml index 70db7bba..6049ff72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "retell-sdk" -version = "5.39.1" +version = "5.40.0" description = "The official Python library for the retell API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/retell/_version.py b/src/retell/_version.py index e81f3ee7..6f7f2ba4 100644 --- a/src/retell/_version.py +++ b/src/retell/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "retell" -__version__ = "5.39.1" # x-release-please-version +__version__ = "5.40.0" # x-release-please-version diff --git a/src/retell/resources/agent.py b/src/retell/resources/agent.py index 7a3020ef..a4dbefc9 100644 --- a/src/retell/resources/agent.py +++ b/src/retell/resources/agent.py @@ -88,7 +88,6 @@ def create( guardrail_config: agent_create_params.GuardrailConfig | Omit = omit, handbook_config: agent_create_params.HandbookConfig | Omit = omit, interruption_sensitivity: float | Omit = omit, - is_public: Optional[bool] | Omit = omit, ivr_option: Optional[agent_create_params.IvrOption] | Omit = omit, language: Union[ Literal[ @@ -446,9 +445,6 @@ def create( unset, default value 1 will apply. When this is set to 0, agent would never be interrupted. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - ivr_option: If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection. @@ -600,7 +596,6 @@ def create( "guardrail_config": guardrail_config, "handbook_config": handbook_config, "interruption_sensitivity": interruption_sensitivity, - "is_public": is_public, "ivr_option": ivr_option, "language": language, "max_call_duration_ms": max_call_duration_ms, @@ -716,7 +711,6 @@ def update( guardrail_config: agent_update_params.GuardrailConfig | Omit = omit, handbook_config: agent_update_params.HandbookConfig | Omit = omit, interruption_sensitivity: float | Omit = omit, - is_public: Optional[bool] | Omit = omit, ivr_option: Optional[agent_update_params.IvrOption] | Omit = omit, language: Union[ Literal[ @@ -1071,9 +1065,6 @@ def update( unset, default value 1 will apply. When this is set to 0, agent would never be interrupted. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - ivr_option: If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection. @@ -1232,7 +1223,6 @@ def update( "guardrail_config": guardrail_config, "handbook_config": handbook_config, "interruption_sensitivity": interruption_sensitivity, - "is_public": is_public, "ivr_option": ivr_option, "language": language, "max_call_duration_ms": max_call_duration_ms, @@ -1503,7 +1493,6 @@ async def create( guardrail_config: agent_create_params.GuardrailConfig | Omit = omit, handbook_config: agent_create_params.HandbookConfig | Omit = omit, interruption_sensitivity: float | Omit = omit, - is_public: Optional[bool] | Omit = omit, ivr_option: Optional[agent_create_params.IvrOption] | Omit = omit, language: Union[ Literal[ @@ -1861,9 +1850,6 @@ async def create( unset, default value 1 will apply. When this is set to 0, agent would never be interrupted. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - ivr_option: If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection. @@ -2015,7 +2001,6 @@ async def create( "guardrail_config": guardrail_config, "handbook_config": handbook_config, "interruption_sensitivity": interruption_sensitivity, - "is_public": is_public, "ivr_option": ivr_option, "language": language, "max_call_duration_ms": max_call_duration_ms, @@ -2131,7 +2116,6 @@ async def update( guardrail_config: agent_update_params.GuardrailConfig | Omit = omit, handbook_config: agent_update_params.HandbookConfig | Omit = omit, interruption_sensitivity: float | Omit = omit, - is_public: Optional[bool] | Omit = omit, ivr_option: Optional[agent_update_params.IvrOption] | Omit = omit, language: Union[ Literal[ @@ -2486,9 +2470,6 @@ async def update( unset, default value 1 will apply. When this is set to 0, agent would never be interrupted. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - ivr_option: If this option is set, the call will try to detect IVR in the first 3 minutes of the call. Actions defined will be applied when the IVR is detected. Set this to null to disable IVR detection. @@ -2647,7 +2628,6 @@ async def update( "guardrail_config": guardrail_config, "handbook_config": handbook_config, "interruption_sensitivity": interruption_sensitivity, - "is_public": is_public, "ivr_option": ivr_option, "language": language, "max_call_duration_ms": max_call_duration_ms, diff --git a/src/retell/resources/call.py b/src/retell/resources/call.py index 4a5e9271..7507c9b8 100644 --- a/src/retell/resources/call.py +++ b/src/retell/resources/call.py @@ -160,6 +160,7 @@ def list( self, *, filter_criteria: call_list_params.FilterCriteria | Omit = omit, + include_total: bool | Omit = omit, limit: int | Omit = omit, pagination_key: str | Omit = omit, skip: int | Omit = omit, @@ -177,6 +178,11 @@ def list( Args: filter_criteria: Filter criteria for calls. All conditions are implicitly connected with AND. + include_total: Whether to include `total` (count of all calls matching `filter_criteria`, + ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. + Each enabled request triggers an additional aggregate query, so opt in only when + the total is needed. + limit: Maximum number of calls to return. pagination_key: Opaque pagination cursor from a previous response. @@ -200,6 +206,7 @@ def list( body=maybe_transform( { "filter_criteria": filter_criteria, + "include_total": include_total, "limit": limit, "pagination_key": pagination_key, "skip": skip, @@ -643,6 +650,7 @@ async def list( self, *, filter_criteria: call_list_params.FilterCriteria | Omit = omit, + include_total: bool | Omit = omit, limit: int | Omit = omit, pagination_key: str | Omit = omit, skip: int | Omit = omit, @@ -660,6 +668,11 @@ async def list( Args: filter_criteria: Filter criteria for calls. All conditions are implicitly connected with AND. + include_total: Whether to include `total` (count of all calls matching `filter_criteria`, + ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. + Each enabled request triggers an additional aggregate query, so opt in only when + the total is needed. + limit: Maximum number of calls to return. pagination_key: Opaque pagination cursor from a previous response. @@ -683,6 +696,7 @@ async def list( body=await async_maybe_transform( { "filter_criteria": filter_criteria, + "include_total": include_total, "limit": limit, "pagination_key": pagination_key, "skip": skip, diff --git a/src/retell/resources/chat.py b/src/retell/resources/chat.py index 97e8b9a6..6a47d8ce 100644 --- a/src/retell/resources/chat.py +++ b/src/retell/resources/chat.py @@ -71,7 +71,7 @@ def create( Create a chat session Args: - agent_id: The chat agent to use for the call. + agent_id: The chat agent to use for the chat. agent_version: The version of the chat agent to use for the chat. If not provided, will default to latest version. @@ -208,6 +208,7 @@ def list( self, *, filter_criteria: object | Omit = omit, + include_total: bool | Omit = omit, limit: int | Omit = omit, pagination_key: str | Omit = omit, skip: int | Omit = omit, @@ -225,6 +226,11 @@ def list( Args: filter_criteria: Filter criteria for chats to retrieve. + include_total: Whether to include `total` (count of all chats matching `filter_criteria`, + ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. + Each enabled request triggers an additional aggregate query, so opt in only when + the total is needed. + limit: Maximum number of chats to return. pagination_key: Opaque pagination cursor from a previous response. @@ -248,6 +254,7 @@ def list( body=maybe_transform( { "filter_criteria": filter_criteria, + "include_total": include_total, "limit": limit, "pagination_key": pagination_key, "skip": skip, @@ -482,7 +489,7 @@ async def create( Create a chat session Args: - agent_id: The chat agent to use for the call. + agent_id: The chat agent to use for the chat. agent_version: The version of the chat agent to use for the chat. If not provided, will default to latest version. @@ -619,6 +626,7 @@ async def list( self, *, filter_criteria: object | Omit = omit, + include_total: bool | Omit = omit, limit: int | Omit = omit, pagination_key: str | Omit = omit, skip: int | Omit = omit, @@ -636,6 +644,11 @@ async def list( Args: filter_criteria: Filter criteria for chats to retrieve. + include_total: Whether to include `total` (count of all chats matching `filter_criteria`, + ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. + Each enabled request triggers an additional aggregate query, so opt in only when + the total is needed. + limit: Maximum number of chats to return. pagination_key: Opaque pagination cursor from a previous response. @@ -659,6 +672,7 @@ async def list( body=await async_maybe_transform( { "filter_criteria": filter_criteria, + "include_total": include_total, "limit": limit, "pagination_key": pagination_key, "skip": skip, diff --git a/src/retell/resources/chat_agent.py b/src/retell/resources/chat_agent.py index 1d93543f..53845b27 100644 --- a/src/retell/resources/chat_agent.py +++ b/src/retell/resources/chat_agent.py @@ -67,7 +67,6 @@ def create( end_chat_after_silence_ms: Optional[int] | Omit = omit, guardrail_config: chat_agent_create_params.GuardrailConfig | Omit = omit, handbook_config: chat_agent_create_params.HandbookConfig | Omit = omit, - is_public: Optional[bool] | Omit = omit, language: Union[ Literal[ "en-US", @@ -283,9 +282,6 @@ def create( handbook_config: Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - language: Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale @@ -346,7 +342,6 @@ def create( "end_chat_after_silence_ms": end_chat_after_silence_ms, "guardrail_config": guardrail_config, "handbook_config": handbook_config, - "is_public": is_public, "language": language, "opt_in_signed_url": opt_in_signed_url, "pii_config": pii_config, @@ -423,7 +418,6 @@ def update( end_chat_after_silence_ms: Optional[int] | Omit = omit, guardrail_config: chat_agent_update_params.GuardrailConfig | Omit = omit, handbook_config: chat_agent_update_params.HandbookConfig | Omit = omit, - is_public: Optional[bool] | Omit = omit, language: Union[ Literal[ "en-US", @@ -638,9 +632,6 @@ def update( handbook_config: Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - language: Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale @@ -706,7 +697,6 @@ def update( "end_chat_after_silence_ms": end_chat_after_silence_ms, "guardrail_config": guardrail_config, "handbook_config": handbook_config, - "is_public": is_public, "language": language, "opt_in_signed_url": opt_in_signed_url, "pii_config": pii_config, @@ -936,7 +926,6 @@ async def create( end_chat_after_silence_ms: Optional[int] | Omit = omit, guardrail_config: chat_agent_create_params.GuardrailConfig | Omit = omit, handbook_config: chat_agent_create_params.HandbookConfig | Omit = omit, - is_public: Optional[bool] | Omit = omit, language: Union[ Literal[ "en-US", @@ -1152,9 +1141,6 @@ async def create( handbook_config: Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - language: Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale @@ -1215,7 +1201,6 @@ async def create( "end_chat_after_silence_ms": end_chat_after_silence_ms, "guardrail_config": guardrail_config, "handbook_config": handbook_config, - "is_public": is_public, "language": language, "opt_in_signed_url": opt_in_signed_url, "pii_config": pii_config, @@ -1294,7 +1279,6 @@ async def update( end_chat_after_silence_ms: Optional[int] | Omit = omit, guardrail_config: chat_agent_update_params.GuardrailConfig | Omit = omit, handbook_config: chat_agent_update_params.HandbookConfig | Omit = omit, - is_public: Optional[bool] | Omit = omit, language: Union[ Literal[ "en-US", @@ -1509,9 +1493,6 @@ async def update( handbook_config: Toggle behavior presets on/off to influence agent response style and behaviors. Voice-only presets are not available for chat agents. - is_public: Whether the agent is public. When set to true, the agent is available for public - agent preview link. - language: Specifies what language(s) the agent will operate in. Accepts either a single scalar locale (e.g. `en-US`), the legacy scalar value `multi` for multilingual support, or an array of concrete locale codes for explicit multi-locale @@ -1577,7 +1558,6 @@ async def update( "end_chat_after_silence_ms": end_chat_after_silence_ms, "guardrail_config": guardrail_config, "handbook_config": handbook_config, - "is_public": is_public, "language": language, "opt_in_signed_url": opt_in_signed_url, "pii_config": pii_config, diff --git a/src/retell/resources/conversation_flow.py b/src/retell/resources/conversation_flow.py index 993957b4..655af4f6 100644 --- a/src/retell/resources/conversation_flow.py +++ b/src/retell/resources/conversation_flow.py @@ -60,6 +60,7 @@ def create( begin_tag_display_position: Optional[conversation_flow_create_params.BeginTagDisplayPosition] | Omit = omit, components: Optional[Iterable[conversation_flow_create_params.Component]] | Omit = omit, default_dynamic_variables: Optional[Dict[str, str]] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, global_prompt: Optional[str] | Omit = omit, is_transfer_llm: Optional[bool] | Omit = omit, kb_config: conversation_flow_create_params.KBConfig | Omit = omit, @@ -101,6 +102,9 @@ def create( default_dynamic_variables: Default dynamic variables that can be referenced throughout the conversation flow. + flex_mode: If enabled, the whole conversation flow will be converted as a Single Prompt + agent. + global_prompt: Global prompt used in every node of the conversation flow. is_transfer_llm: Whether this conversation flow is used for transfer LLM. @@ -142,6 +146,7 @@ def create( "begin_tag_display_position": begin_tag_display_position, "components": components, "default_dynamic_variables": default_dynamic_variables, + "flex_mode": flex_mode, "global_prompt": global_prompt, "is_transfer_llm": is_transfer_llm, "kb_config": kb_config, @@ -215,6 +220,7 @@ def update( begin_tag_display_position: Optional[conversation_flow_update_params.BeginTagDisplayPosition] | Omit = omit, components: Optional[Iterable[conversation_flow_update_params.Component]] | Omit = omit, default_dynamic_variables: Optional[Dict[str, str]] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, global_prompt: Optional[str] | Omit = omit, is_transfer_llm: Optional[bool] | Omit = omit, kb_config: conversation_flow_update_params.KBConfig | Omit = omit, @@ -253,6 +259,9 @@ def update( default_dynamic_variables: Default dynamic variables that can be referenced throughout the conversation flow. + flex_mode: If enabled, the whole conversation flow will be converted as a Single Prompt + agent. + global_prompt: Global prompt used in every node of the conversation flow. is_transfer_llm: Whether this conversation flow is used for transfer LLM. @@ -303,6 +312,7 @@ def update( "begin_tag_display_position": begin_tag_display_position, "components": components, "default_dynamic_variables": default_dynamic_variables, + "flex_mode": flex_mode, "global_prompt": global_prompt, "is_transfer_llm": is_transfer_llm, "kb_config": kb_config, @@ -450,6 +460,7 @@ async def create( begin_tag_display_position: Optional[conversation_flow_create_params.BeginTagDisplayPosition] | Omit = omit, components: Optional[Iterable[conversation_flow_create_params.Component]] | Omit = omit, default_dynamic_variables: Optional[Dict[str, str]] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, global_prompt: Optional[str] | Omit = omit, is_transfer_llm: Optional[bool] | Omit = omit, kb_config: conversation_flow_create_params.KBConfig | Omit = omit, @@ -491,6 +502,9 @@ async def create( default_dynamic_variables: Default dynamic variables that can be referenced throughout the conversation flow. + flex_mode: If enabled, the whole conversation flow will be converted as a Single Prompt + agent. + global_prompt: Global prompt used in every node of the conversation flow. is_transfer_llm: Whether this conversation flow is used for transfer LLM. @@ -532,6 +546,7 @@ async def create( "begin_tag_display_position": begin_tag_display_position, "components": components, "default_dynamic_variables": default_dynamic_variables, + "flex_mode": flex_mode, "global_prompt": global_prompt, "is_transfer_llm": is_transfer_llm, "kb_config": kb_config, @@ -605,6 +620,7 @@ async def update( begin_tag_display_position: Optional[conversation_flow_update_params.BeginTagDisplayPosition] | Omit = omit, components: Optional[Iterable[conversation_flow_update_params.Component]] | Omit = omit, default_dynamic_variables: Optional[Dict[str, str]] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, global_prompt: Optional[str] | Omit = omit, is_transfer_llm: Optional[bool] | Omit = omit, kb_config: conversation_flow_update_params.KBConfig | Omit = omit, @@ -643,6 +659,9 @@ async def update( default_dynamic_variables: Default dynamic variables that can be referenced throughout the conversation flow. + flex_mode: If enabled, the whole conversation flow will be converted as a Single Prompt + agent. + global_prompt: Global prompt used in every node of the conversation flow. is_transfer_llm: Whether this conversation flow is used for transfer LLM. @@ -693,6 +712,7 @@ async def update( "begin_tag_display_position": begin_tag_display_position, "components": components, "default_dynamic_variables": default_dynamic_variables, + "flex_mode": flex_mode, "global_prompt": global_prompt, "is_transfer_llm": is_transfer_llm, "kb_config": kb_config, diff --git a/src/retell/resources/conversation_flow_component.py b/src/retell/resources/conversation_flow_component.py index d1601222..3f146afe 100644 --- a/src/retell/resources/conversation_flow_component.py +++ b/src/retell/resources/conversation_flow_component.py @@ -56,6 +56,7 @@ def create( nodes: Iterable[conversation_flow_component_create_params.Node], begin_tag_display_position: Optional[conversation_flow_component_create_params.BeginTagDisplayPosition] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, mcps: Optional[Iterable[conversation_flow_component_create_params.Mcp]] | Omit = omit, notes: Optional[Iterable[conversation_flow_component_create_params.Note]] | Omit = omit, start_node_id: Optional[str] | Omit = omit, @@ -77,6 +78,8 @@ def create( begin_tag_display_position: Display position for the begin tag in the frontend + flex_mode: If enabled, the whole component will be converted as a Single Prompt agent. + mcps: A list of MCP server configurations to use for this component notes: Visual annotations displayed on the flow canvas. @@ -100,6 +103,7 @@ def create( "name": name, "nodes": nodes, "begin_tag_display_position": begin_tag_display_position, + "flex_mode": flex_mode, "mcps": mcps, "notes": notes, "start_node_id": start_node_id, @@ -157,6 +161,7 @@ def update( *, begin_tag_display_position: Optional[conversation_flow_component_update_params.BeginTagDisplayPosition] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, mcps: Optional[Iterable[conversation_flow_component_update_params.Mcp]] | Omit = omit, name: str | Omit = omit, nodes: Iterable[conversation_flow_component_update_params.Node] | Omit = omit, @@ -176,6 +181,8 @@ def update( Args: begin_tag_display_position: Display position for the begin tag in the frontend + flex_mode: If enabled, the whole component will be converted as a Single Prompt agent. + mcps: A list of MCP server configurations to use for this component name: Name of the component @@ -208,6 +215,7 @@ def update( body=maybe_transform( { "begin_tag_display_position": begin_tag_display_position, + "flex_mode": flex_mode, "mcps": mcps, "name": name, "nodes": nodes, @@ -342,6 +350,7 @@ async def create( nodes: Iterable[conversation_flow_component_create_params.Node], begin_tag_display_position: Optional[conversation_flow_component_create_params.BeginTagDisplayPosition] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, mcps: Optional[Iterable[conversation_flow_component_create_params.Mcp]] | Omit = omit, notes: Optional[Iterable[conversation_flow_component_create_params.Note]] | Omit = omit, start_node_id: Optional[str] | Omit = omit, @@ -363,6 +372,8 @@ async def create( begin_tag_display_position: Display position for the begin tag in the frontend + flex_mode: If enabled, the whole component will be converted as a Single Prompt agent. + mcps: A list of MCP server configurations to use for this component notes: Visual annotations displayed on the flow canvas. @@ -386,6 +397,7 @@ async def create( "name": name, "nodes": nodes, "begin_tag_display_position": begin_tag_display_position, + "flex_mode": flex_mode, "mcps": mcps, "notes": notes, "start_node_id": start_node_id, @@ -443,6 +455,7 @@ async def update( *, begin_tag_display_position: Optional[conversation_flow_component_update_params.BeginTagDisplayPosition] | Omit = omit, + flex_mode: Optional[bool] | Omit = omit, mcps: Optional[Iterable[conversation_flow_component_update_params.Mcp]] | Omit = omit, name: str | Omit = omit, nodes: Iterable[conversation_flow_component_update_params.Node] | Omit = omit, @@ -462,6 +475,8 @@ async def update( Args: begin_tag_display_position: Display position for the begin tag in the frontend + flex_mode: If enabled, the whole component will be converted as a Single Prompt agent. + mcps: A list of MCP server configurations to use for this component name: Name of the component @@ -494,6 +509,7 @@ async def update( body=await async_maybe_transform( { "begin_tag_display_position": begin_tag_display_position, + "flex_mode": flex_mode, "mcps": mcps, "name": name, "nodes": nodes, diff --git a/src/retell/resources/llm.py b/src/retell/resources/llm.py index 5311bf95..8ba7cf1a 100644 --- a/src/retell/resources/llm.py +++ b/src/retell/resources/llm.py @@ -87,7 +87,6 @@ def create( starting_state: Optional[str] | Omit = omit, states: Optional[Iterable[llm_create_params.State]] | Omit = omit, tool_call_strict_mode: Optional[bool] | Omit = omit, - version: Optional[int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -159,8 +158,6 @@ def create( tool_call_strict_mode: Whether to use strict mode for tool calls. Only applicable when using certain supported models. - version: The version of the LLM. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -189,7 +186,6 @@ def create( "starting_state": starting_state, "states": states, "tool_call_strict_mode": tool_call_strict_mode, - "version": version, }, llm_create_params.LlmCreateParams, ), @@ -243,7 +239,7 @@ def update( self, llm_id: str, *, - query_version: int | Omit = omit, + version: int | Omit = omit, begin_after_user_silence_ms: Optional[int] | Omit = omit, begin_message: Optional[str] | Omit = omit, default_dynamic_variables: Optional[Dict[str, str]] | Omit = omit, @@ -283,7 +279,6 @@ def update( starting_state: Optional[str] | Omit = omit, states: Optional[Iterable[llm_update_params.State]] | Omit = omit, tool_call_strict_mode: Optional[bool] | Omit = omit, - body_version: Optional[int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -295,7 +290,7 @@ def update( Update an existing Retell LLM Response Engine Args: - query_version: Optional version of the API to use for this request. Default to latest version. + version: Optional version of the API to use for this request. Default to latest version. begin_after_user_silence_ms: If set, the AI will begin the conversation after waiting for the user for the duration (in milliseconds) specified by this attribute. This only applies if the @@ -355,8 +350,6 @@ def update( tool_call_strict_mode: Whether to use strict mode for tool calls. Only applicable when using certain supported models. - body_version: The version of the LLM. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -387,7 +380,6 @@ def update( "starting_state": starting_state, "states": states, "tool_call_strict_mode": tool_call_strict_mode, - "body_version": body_version, }, llm_update_params.LlmUpdateParams, ), @@ -396,7 +388,7 @@ def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform({"query_version": query_version}, llm_update_params.LlmUpdateParams), + query=maybe_transform({"version": version}, llm_update_params.LlmUpdateParams), ), cast_to=LlmResponse, ) @@ -548,7 +540,6 @@ async def create( starting_state: Optional[str] | Omit = omit, states: Optional[Iterable[llm_create_params.State]] | Omit = omit, tool_call_strict_mode: Optional[bool] | Omit = omit, - version: Optional[int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -620,8 +611,6 @@ async def create( tool_call_strict_mode: Whether to use strict mode for tool calls. Only applicable when using certain supported models. - version: The version of the LLM. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -650,7 +639,6 @@ async def create( "starting_state": starting_state, "states": states, "tool_call_strict_mode": tool_call_strict_mode, - "version": version, }, llm_create_params.LlmCreateParams, ), @@ -704,7 +692,7 @@ async def update( self, llm_id: str, *, - query_version: int | Omit = omit, + version: int | Omit = omit, begin_after_user_silence_ms: Optional[int] | Omit = omit, begin_message: Optional[str] | Omit = omit, default_dynamic_variables: Optional[Dict[str, str]] | Omit = omit, @@ -744,7 +732,6 @@ async def update( starting_state: Optional[str] | Omit = omit, states: Optional[Iterable[llm_update_params.State]] | Omit = omit, tool_call_strict_mode: Optional[bool] | Omit = omit, - body_version: Optional[int] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -756,7 +743,7 @@ async def update( Update an existing Retell LLM Response Engine Args: - query_version: Optional version of the API to use for this request. Default to latest version. + version: Optional version of the API to use for this request. Default to latest version. begin_after_user_silence_ms: If set, the AI will begin the conversation after waiting for the user for the duration (in milliseconds) specified by this attribute. This only applies if the @@ -816,8 +803,6 @@ async def update( tool_call_strict_mode: Whether to use strict mode for tool calls. Only applicable when using certain supported models. - body_version: The version of the LLM. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -848,7 +833,6 @@ async def update( "starting_state": starting_state, "states": states, "tool_call_strict_mode": tool_call_strict_mode, - "body_version": body_version, }, llm_update_params.LlmUpdateParams, ), @@ -857,7 +841,7 @@ async def update( extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform({"query_version": query_version}, llm_update_params.LlmUpdateParams), + query=await async_maybe_transform({"version": version}, llm_update_params.LlmUpdateParams), ), cast_to=LlmResponse, ) diff --git a/src/retell/types/agent_create_params.py b/src/retell/types/agent_create_params.py index 22f0a1df..a31f7ee4 100644 --- a/src/retell/types/agent_create_params.py +++ b/src/retell/types/agent_create_params.py @@ -242,12 +242,6 @@ class AgentCreateParams(TypedDict, total=False): agent would never be interrupted. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - ivr_option: Optional[IvrOption] """ If this option is set, the call will try to detect IVR in the first 3 minutes of @@ -814,7 +808,11 @@ class PiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" diff --git a/src/retell/types/agent_response.py b/src/retell/types/agent_response.py index 3b3b2cf6..d5629678 100644 --- a/src/retell/types/agent_response.py +++ b/src/retell/types/agent_response.py @@ -213,7 +213,11 @@ class PiiConfig(BaseModel): "customer_account_number", ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Literal["post_call"] """The processing mode for PII scrubbing. Currently only post-call is supported.""" @@ -663,12 +667,6 @@ class AgentResponse(BaseModel): agent would never be interrupted. """ - is_public: Optional[bool] = None - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - is_published: Optional[bool] = None """Whether the agent is published.""" diff --git a/src/retell/types/agent_update_params.py b/src/retell/types/agent_update_params.py index 0f82955f..3a29af56 100644 --- a/src/retell/types/agent_update_params.py +++ b/src/retell/types/agent_update_params.py @@ -232,12 +232,6 @@ class AgentUpdateParams(TypedDict, total=False): agent would never be interrupted. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - ivr_option: Optional[IvrOption] """ If this option is set, the call will try to detect IVR in the first 3 minutes of @@ -780,7 +774,11 @@ class PiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" diff --git a/src/retell/types/batch_call_create_batch_call_params.py b/src/retell/types/batch_call_create_batch_call_params.py index e52418b3..81c9e84a 100644 --- a/src/retell/types/batch_call_create_batch_call_params.py +++ b/src/retell/types/batch_call_create_batch_call_params.py @@ -229,7 +229,11 @@ class TaskAgentOverrideAgentPiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" @@ -688,12 +692,6 @@ class TaskAgentOverrideAgent(TypedDict, total=False): agent would never be interrupted. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - ivr_option: Optional[TaskAgentOverrideAgentIvrOption] """ If this option is set, the call will try to detect IVR in the first 3 minutes of diff --git a/src/retell/types/call_create_phone_call_params.py b/src/retell/types/call_create_phone_call_params.py index 8f5f684e..ed5105c5 100644 --- a/src/retell/types/call_create_phone_call_params.py +++ b/src/retell/types/call_create_phone_call_params.py @@ -248,7 +248,11 @@ class AgentOverrideAgentPiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" @@ -707,12 +711,6 @@ class AgentOverrideAgent(TypedDict, total=False): agent would never be interrupted. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - ivr_option: Optional[AgentOverrideAgentIvrOption] """ If this option is set, the call will try to detect IVR in the first 3 minutes of diff --git a/src/retell/types/call_create_web_call_params.py b/src/retell/types/call_create_web_call_params.py index 0e1acd78..1266733c 100644 --- a/src/retell/types/call_create_web_call_params.py +++ b/src/retell/types/call_create_web_call_params.py @@ -235,7 +235,11 @@ class AgentOverrideAgentPiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" @@ -694,12 +698,6 @@ class AgentOverrideAgent(TypedDict, total=False): agent would never be interrupted. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - ivr_option: Optional[AgentOverrideAgentIvrOption] """ If this option is set, the call will try to detect IVR in the first 3 minutes of diff --git a/src/retell/types/call_list_params.py b/src/retell/types/call_list_params.py index 2bc4589c..6872f919 100644 --- a/src/retell/types/call_list_params.py +++ b/src/retell/types/call_list_params.py @@ -72,6 +72,14 @@ class CallListParams(TypedDict, total=False): filter_criteria: FilterCriteria """Filter criteria for calls. All conditions are implicitly connected with AND.""" + include_total: bool + """ + Whether to include `total` (count of all calls matching `filter_criteria`, + ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. + Each enabled request triggers an additional aggregate query, so opt in only when + the total is needed. + """ + limit: int """Maximum number of calls to return.""" diff --git a/src/retell/types/call_list_response.py b/src/retell/types/call_list_response.py index 1dd600d9..6362fec8 100644 --- a/src/retell/types/call_list_response.py +++ b/src/retell/types/call_list_response.py @@ -1146,3 +1146,9 @@ class CallListResponse(BaseModel): pagination_key: Optional[str] = None """Pagination key for the next page.""" + + total: Optional[int] = None + """Total number of calls matching `filter_criteria`. + + Only present when `include_total` is true. + """ diff --git a/src/retell/types/call_register_phone_call_params.py b/src/retell/types/call_register_phone_call_params.py index 8b85710b..f7596761 100644 --- a/src/retell/types/call_register_phone_call_params.py +++ b/src/retell/types/call_register_phone_call_params.py @@ -226,7 +226,11 @@ class AgentOverrideAgentPiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" @@ -685,12 +689,6 @@ class AgentOverrideAgent(TypedDict, total=False): agent would never be interrupted. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - ivr_option: Optional[AgentOverrideAgentIvrOption] """ If this option is set, the call will try to detect IVR in the first 3 minutes of diff --git a/src/retell/types/chat_agent_create_params.py b/src/retell/types/chat_agent_create_params.py index 63e92386..8b08d35d 100644 --- a/src/retell/types/chat_agent_create_params.py +++ b/src/retell/types/chat_agent_create_params.py @@ -93,12 +93,6 @@ class ChatAgentCreateParams(TypedDict, total=False): Voice-only presets are not available for chat agents. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - language: Union[ Literal[ "en-US", @@ -433,7 +427,11 @@ class PiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" diff --git a/src/retell/types/chat_agent_response.py b/src/retell/types/chat_agent_response.py index b371e293..f88cfa80 100644 --- a/src/retell/types/chat_agent_response.py +++ b/src/retell/types/chat_agent_response.py @@ -134,7 +134,11 @@ class PiiConfig(BaseModel): "customer_account_number", ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Literal["post_call"] """The processing mode for PII scrubbing. Currently only post-call is supported.""" @@ -362,12 +366,6 @@ class ChatAgentResponse(BaseModel): Voice-only presets are not available for chat agents. """ - is_public: Optional[bool] = None - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - is_published: Optional[bool] = None """Whether the chat agent is published.""" diff --git a/src/retell/types/chat_agent_update_params.py b/src/retell/types/chat_agent_update_params.py index 1bba5d42..41809561 100644 --- a/src/retell/types/chat_agent_update_params.py +++ b/src/retell/types/chat_agent_update_params.py @@ -89,12 +89,6 @@ class ChatAgentUpdateParams(TypedDict, total=False): Voice-only presets are not available for chat agents. """ - is_public: Optional[bool] - """Whether the agent is public. - - When set to true, the agent is available for public agent preview link. - """ - language: Union[ Literal[ "en-US", @@ -399,7 +393,11 @@ class PiiConfig(TypedDict, total=False): ] ] ] - """List of PII categories to scrub from transcripts and recordings.""" + """List of PII categories to scrub from transcripts and recordings. + + PII redaction is only active when this list is non-empty; an empty array means + no PII scrubbing is performed. + """ mode: Required[Literal["post_call"]] """The processing mode for PII scrubbing. Currently only post-call is supported.""" diff --git a/src/retell/types/chat_create_params.py b/src/retell/types/chat_create_params.py index 3c1d7869..d8988a19 100644 --- a/src/retell/types/chat_create_params.py +++ b/src/retell/types/chat_create_params.py @@ -10,7 +10,7 @@ class ChatCreateParams(TypedDict, total=False): agent_id: Required[str] - """The chat agent to use for the call.""" + """The chat agent to use for the chat.""" agent_version: Union[int, str] """The version of the chat agent to use for the chat. diff --git a/src/retell/types/chat_list_params.py b/src/retell/types/chat_list_params.py index ff227d6c..51bb22b3 100644 --- a/src/retell/types/chat_list_params.py +++ b/src/retell/types/chat_list_params.py @@ -11,6 +11,14 @@ class ChatListParams(TypedDict, total=False): filter_criteria: object """Filter criteria for chats to retrieve.""" + include_total: bool + """ + Whether to include `total` (count of all chats matching `filter_criteria`, + ignoring `limit`/`skip`/`pagination_key`) in the response. Defaults to false. + Each enabled request triggers an additional aggregate query, so opt in only when + the total is needed. + """ + limit: int """Maximum number of chats to return.""" diff --git a/src/retell/types/chat_list_response.py b/src/retell/types/chat_list_response.py index e9bee798..502cebcc 100644 --- a/src/retell/types/chat_list_response.py +++ b/src/retell/types/chat_list_response.py @@ -22,3 +22,9 @@ class ChatListResponse(BaseModel): pagination_key: Optional[str] = None """Pagination key for the next page.""" + + total: Optional[int] = None + """Total number of chats matching `filter_criteria`. + + Only present when `include_total` is true. + """ diff --git a/src/retell/types/conversation_flow_component_create_params.py b/src/retell/types/conversation_flow_component_create_params.py index 30cf961e..b691f03c 100644 --- a/src/retell/types/conversation_flow_component_create_params.py +++ b/src/retell/types/conversation_flow_component_create_params.py @@ -603,6 +603,9 @@ class ConversationFlowComponentCreateParams(TypedDict, total=False): begin_tag_display_position: Optional[BeginTagDisplayPosition] """Display position for the begin tag in the frontend""" + flex_mode: Optional[bool] + """If enabled, the whole component will be converted as a Single Prompt agent.""" + mcps: Optional[Iterable[Mcp]] """A list of MCP server configurations to use for this component""" diff --git a/src/retell/types/conversation_flow_component_response.py b/src/retell/types/conversation_flow_component_response.py index 4e0dce01..2b501cc5 100644 --- a/src/retell/types/conversation_flow_component_response.py +++ b/src/retell/types/conversation_flow_component_response.py @@ -7471,6 +7471,9 @@ class ConversationFlowComponentResponse(BaseModel): begin_tag_display_position: Optional[BeginTagDisplayPosition] = None """Display position for the begin tag in the frontend""" + flex_mode: Optional[bool] = None + """If enabled, the whole component will be converted as a Single Prompt agent.""" + linked_conversation_flow_ids: Optional[List[str]] = None """IDs of conversation flows linked to this shared component""" diff --git a/src/retell/types/conversation_flow_component_update_params.py b/src/retell/types/conversation_flow_component_update_params.py index f49544d0..8bb520e4 100644 --- a/src/retell/types/conversation_flow_component_update_params.py +++ b/src/retell/types/conversation_flow_component_update_params.py @@ -597,6 +597,9 @@ class ConversationFlowComponentUpdateParams(TypedDict, total=False): begin_tag_display_position: Optional[BeginTagDisplayPosition] """Display position for the begin tag in the frontend""" + flex_mode: Optional[bool] + """If enabled, the whole component will be converted as a Single Prompt agent.""" + mcps: Optional[Iterable[Mcp]] """A list of MCP server configurations to use for this component""" diff --git a/src/retell/types/conversation_flow_create_params.py b/src/retell/types/conversation_flow_create_params.py index 167be9d1..381ec70b 100644 --- a/src/retell/types/conversation_flow_create_params.py +++ b/src/retell/types/conversation_flow_create_params.py @@ -1207,6 +1207,12 @@ class ConversationFlowCreateParams(TypedDict, total=False): flow. """ + flex_mode: Optional[bool] + """ + If enabled, the whole conversation flow will be converted as a Single Prompt + agent. + """ + global_prompt: Optional[str] """Global prompt used in every node of the conversation flow.""" @@ -15076,6 +15082,9 @@ class Component(TypedDict, total=False): begin_tag_display_position: Optional[ComponentBeginTagDisplayPosition] """Display position for the begin tag in the frontend""" + flex_mode: Optional[bool] + """If enabled, the whole component will be converted as a Single Prompt agent.""" + mcps: Optional[Iterable[ComponentMcp]] """A list of MCP server configurations to use for this component""" diff --git a/src/retell/types/conversation_flow_response.py b/src/retell/types/conversation_flow_response.py index 818ba7dd..f4595e03 100644 --- a/src/retell/types/conversation_flow_response.py +++ b/src/retell/types/conversation_flow_response.py @@ -8146,6 +8146,9 @@ class Component(BaseModel): begin_tag_display_position: Optional[ComponentBeginTagDisplayPosition] = None """Display position for the begin tag in the frontend""" + flex_mode: Optional[bool] = None + """If enabled, the whole component will be converted as a Single Prompt agent.""" + mcps: Optional[List[ComponentMcp]] = None """A list of MCP server configurations to use for this component""" @@ -15082,6 +15085,12 @@ class ConversationFlowResponse(BaseModel): flow. """ + flex_mode: Optional[bool] = None + """ + If enabled, the whole conversation flow will be converted as a Single Prompt + agent. + """ + global_prompt: Optional[str] = None """Global prompt used in every node of the conversation flow.""" diff --git a/src/retell/types/conversation_flow_update_params.py b/src/retell/types/conversation_flow_update_params.py index 89927647..7fb419e5 100644 --- a/src/retell/types/conversation_flow_update_params.py +++ b/src/retell/types/conversation_flow_update_params.py @@ -1201,6 +1201,12 @@ class ConversationFlowUpdateParams(TypedDict, total=False): flow. """ + flex_mode: Optional[bool] + """ + If enabled, the whole conversation flow will be converted as a Single Prompt + agent. + """ + global_prompt: Optional[str] """Global prompt used in every node of the conversation flow.""" @@ -8364,6 +8370,9 @@ class Component(TypedDict, total=False): begin_tag_display_position: Optional[ComponentBeginTagDisplayPosition] """Display position for the begin tag in the frontend""" + flex_mode: Optional[bool] + """If enabled, the whole component will be converted as a Single Prompt agent.""" + mcps: Optional[Iterable[ComponentMcp]] """A list of MCP server configurations to use for this component""" diff --git a/src/retell/types/knowledge_base_response.py b/src/retell/types/knowledge_base_response.py index a16dd1cd..cb0d67a4 100644 --- a/src/retell/types/knowledge_base_response.py +++ b/src/retell/types/knowledge_base_response.py @@ -15,6 +15,9 @@ class KnowledgeBaseSourceKnowledgeBaseSourceDocument(BaseModel): + file_size: float + """File size in bytes.""" + file_url: str """URL of the document stored.""" diff --git a/src/retell/types/llm_create_params.py b/src/retell/types/llm_create_params.py index 014cac17..afee632b 100644 --- a/src/retell/types/llm_create_params.py +++ b/src/retell/types/llm_create_params.py @@ -222,9 +222,6 @@ class LlmCreateParams(TypedDict, total=False): Only applicable when using certain supported models. """ - version: Optional[int] - """The version of the LLM.""" - class GeneralToolEndCallTool(TypedDict, total=False): name: Required[str] diff --git a/src/retell/types/llm_response.py b/src/retell/types/llm_response.py index 859afc9d..9b710abd 100644 --- a/src/retell/types/llm_response.py +++ b/src/retell/types/llm_response.py @@ -2477,4 +2477,4 @@ class LlmResponse(BaseModel): """ version: Optional[int] = None - """The version of the LLM.""" + """Version of the Retell LLM Response Engine.""" diff --git a/src/retell/types/llm_update_params.py b/src/retell/types/llm_update_params.py index 9e86088b..5b45191a 100644 --- a/src/retell/types/llm_update_params.py +++ b/src/retell/types/llm_update_params.py @@ -3,10 +3,9 @@ from __future__ import annotations from typing import Dict, Union, Iterable, Optional -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing_extensions import Literal, Required, TypeAlias, TypedDict from .._types import SequenceNotStr -from .._utils import PropertyInfo __all__ = [ "LlmUpdateParams", @@ -105,7 +104,7 @@ class LlmUpdateParams(TypedDict, total=False): - query_version: Annotated[int, PropertyInfo(alias="version")] + version: int """Optional version of the API to use for this request. Default to latest version.""" begin_after_user_silence_ms: Optional[int] @@ -226,9 +225,6 @@ class LlmUpdateParams(TypedDict, total=False): Only applicable when using certain supported models. """ - body_version: Annotated[Optional[int], PropertyInfo(alias="version")] - """The version of the LLM.""" - class GeneralToolEndCallTool(TypedDict, total=False): name: Required[str] diff --git a/src/retell/types/phone_call_response.py b/src/retell/types/phone_call_response.py index 5769bc60..b1dfefcc 100644 --- a/src/retell/types/phone_call_response.py +++ b/src/retell/types/phone_call_response.py @@ -26,6 +26,8 @@ "ScrubbedTranscriptWithToolCallToolCallResultUtterance", "ScrubbedTranscriptWithToolCallNodeTransitionUtterance", "ScrubbedTranscriptWithToolCallDtmfUtterance", + "ScrubbedTranscriptWithToolCallSMSUtterance", + "ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia", "TelephonyIdentifier", "TranscriptObject", "TranscriptObjectWord", @@ -36,6 +38,8 @@ "TranscriptWithToolCallToolCallResultUtterance", "TranscriptWithToolCallNodeTransitionUtterance", "TranscriptWithToolCallDtmfUtterance", + "TranscriptWithToolCallSMSUtterance", + "TranscriptWithToolCallSMSUtteranceMultimedia", ] @@ -479,12 +483,41 @@ class ScrubbedTranscriptWithToolCallDtmfUtterance(BaseModel): """Digit pressed by the user from their phone keypad.""" +class ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia(BaseModel): + url: str + """URL of the multimedia attachment.""" + + summary: Optional[str] = None + """Optional textual summary of the attachment.""" + + +class ScrubbedTranscriptWithToolCallSMSUtterance(BaseModel): + content: str + """Text content of the SMS message.""" + + role: Literal["sms"] + """ + SMS message received from the user during the call (for example while the agent + is leaving a voicemail). Not part of the spoken conversation. + """ + + time_sec: float + """Time the SMS was received, in seconds relative to the start of the call.""" + + multimedia: Optional[List[ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia]] = None + """Multimedia attachments (MMS). + + Display only; not relayed into the spoken conversation. + """ + + ScrubbedTranscriptWithToolCall: TypeAlias = Union[ ScrubbedTranscriptWithToolCallUtterance, ScrubbedTranscriptWithToolCallToolCallInvocationUtterance, ScrubbedTranscriptWithToolCallToolCallResultUtterance, ScrubbedTranscriptWithToolCallNodeTransitionUtterance, ScrubbedTranscriptWithToolCallDtmfUtterance, + ScrubbedTranscriptWithToolCallSMSUtterance, ] @@ -633,12 +666,41 @@ class TranscriptWithToolCallDtmfUtterance(BaseModel): """Digit pressed by the user from their phone keypad.""" +class TranscriptWithToolCallSMSUtteranceMultimedia(BaseModel): + url: str + """URL of the multimedia attachment.""" + + summary: Optional[str] = None + """Optional textual summary of the attachment.""" + + +class TranscriptWithToolCallSMSUtterance(BaseModel): + content: str + """Text content of the SMS message.""" + + role: Literal["sms"] + """ + SMS message received from the user during the call (for example while the agent + is leaving a voicemail). Not part of the spoken conversation. + """ + + time_sec: float + """Time the SMS was received, in seconds relative to the start of the call.""" + + multimedia: Optional[List[TranscriptWithToolCallSMSUtteranceMultimedia]] = None + """Multimedia attachments (MMS). + + Display only; not relayed into the spoken conversation. + """ + + TranscriptWithToolCall: TypeAlias = Union[ TranscriptWithToolCallUtterance, TranscriptWithToolCallToolCallInvocationUtterance, TranscriptWithToolCallToolCallResultUtterance, TranscriptWithToolCallNodeTransitionUtterance, TranscriptWithToolCallDtmfUtterance, + TranscriptWithToolCallSMSUtterance, ] diff --git a/src/retell/types/web_call_response.py b/src/retell/types/web_call_response.py index 8fbccfe2..e932f439 100644 --- a/src/retell/types/web_call_response.py +++ b/src/retell/types/web_call_response.py @@ -26,6 +26,8 @@ "ScrubbedTranscriptWithToolCallToolCallResultUtterance", "ScrubbedTranscriptWithToolCallNodeTransitionUtterance", "ScrubbedTranscriptWithToolCallDtmfUtterance", + "ScrubbedTranscriptWithToolCallSMSUtterance", + "ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia", "TranscriptObject", "TranscriptObjectWord", "TranscriptWithToolCall", @@ -35,6 +37,8 @@ "TranscriptWithToolCallToolCallResultUtterance", "TranscriptWithToolCallNodeTransitionUtterance", "TranscriptWithToolCallDtmfUtterance", + "TranscriptWithToolCallSMSUtterance", + "TranscriptWithToolCallSMSUtteranceMultimedia", ] @@ -478,12 +482,41 @@ class ScrubbedTranscriptWithToolCallDtmfUtterance(BaseModel): """Digit pressed by the user from their phone keypad.""" +class ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia(BaseModel): + url: str + """URL of the multimedia attachment.""" + + summary: Optional[str] = None + """Optional textual summary of the attachment.""" + + +class ScrubbedTranscriptWithToolCallSMSUtterance(BaseModel): + content: str + """Text content of the SMS message.""" + + role: Literal["sms"] + """ + SMS message received from the user during the call (for example while the agent + is leaving a voicemail). Not part of the spoken conversation. + """ + + time_sec: float + """Time the SMS was received, in seconds relative to the start of the call.""" + + multimedia: Optional[List[ScrubbedTranscriptWithToolCallSMSUtteranceMultimedia]] = None + """Multimedia attachments (MMS). + + Display only; not relayed into the spoken conversation. + """ + + ScrubbedTranscriptWithToolCall: TypeAlias = Union[ ScrubbedTranscriptWithToolCallUtterance, ScrubbedTranscriptWithToolCallToolCallInvocationUtterance, ScrubbedTranscriptWithToolCallToolCallResultUtterance, ScrubbedTranscriptWithToolCallNodeTransitionUtterance, ScrubbedTranscriptWithToolCallDtmfUtterance, + ScrubbedTranscriptWithToolCallSMSUtterance, ] @@ -622,12 +655,41 @@ class TranscriptWithToolCallDtmfUtterance(BaseModel): """Digit pressed by the user from their phone keypad.""" +class TranscriptWithToolCallSMSUtteranceMultimedia(BaseModel): + url: str + """URL of the multimedia attachment.""" + + summary: Optional[str] = None + """Optional textual summary of the attachment.""" + + +class TranscriptWithToolCallSMSUtterance(BaseModel): + content: str + """Text content of the SMS message.""" + + role: Literal["sms"] + """ + SMS message received from the user during the call (for example while the agent + is leaving a voicemail). Not part of the spoken conversation. + """ + + time_sec: float + """Time the SMS was received, in seconds relative to the start of the call.""" + + multimedia: Optional[List[TranscriptWithToolCallSMSUtteranceMultimedia]] = None + """Multimedia attachments (MMS). + + Display only; not relayed into the spoken conversation. + """ + + TranscriptWithToolCall: TypeAlias = Union[ TranscriptWithToolCallUtterance, TranscriptWithToolCallToolCallInvocationUtterance, TranscriptWithToolCallToolCallResultUtterance, TranscriptWithToolCallNodeTransitionUtterance, TranscriptWithToolCallDtmfUtterance, + TranscriptWithToolCallSMSUtterance, ] diff --git a/tests/api_resources/test_agent.py b/tests/api_resources/test_agent.py index dec36e94..8d060ebe 100644 --- a/tests/api_resources/test_agent.py +++ b/tests/api_resources/test_agent.py @@ -87,7 +87,6 @@ def test_method_create_with_all_params(self, client: Retell) -> None: "speech_normalization": True, }, interruption_sensitivity=1, - is_public=False, ivr_option={ "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -294,7 +293,6 @@ def test_method_update_with_all_params(self, client: Retell) -> None: "speech_normalization": True, }, interruption_sensitivity=1, - is_public=False, ivr_option={ "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -649,7 +647,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncRetell) -> "speech_normalization": True, }, interruption_sensitivity=1, - is_public=False, ivr_option={ "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -856,7 +853,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncRetell) -> "speech_normalization": True, }, interruption_sensitivity=1, - is_public=False, ivr_option={ "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", diff --git a/tests/api_resources/test_batch_call.py b/tests/api_resources/test_batch_call.py index 179141b4..8d2e286c 100644 --- a/tests/api_resources/test_batch_call.py +++ b/tests/api_resources/test_batch_call.py @@ -80,7 +80,6 @@ def test_method_create_batch_call_with_all_params(self, client: Retell) -> None: "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -301,7 +300,6 @@ async def test_method_create_batch_call_with_all_params(self, async_client: Asyn "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", diff --git a/tests/api_resources/test_call.py b/tests/api_resources/test_call.py index 0d2f4ac5..a77e1b16 100644 --- a/tests/api_resources/test_call.py +++ b/tests/api_resources/test_call.py @@ -274,6 +274,7 @@ def test_method_list_with_all_params(self, client: Retell) -> None: "value": ["Negative"], }, }, + include_total=True, limit=1000, pagination_key="pagination_key", skip=0, @@ -406,7 +407,6 @@ def test_method_create_phone_call_with_all_params(self, client: Retell) -> None: "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -602,7 +602,6 @@ def test_method_create_web_call_with_all_params(self, client: Retell) -> None: "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -795,7 +794,6 @@ def test_method_register_phone_call_with_all_params(self, client: Retell) -> Non "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -1230,6 +1228,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRetell) -> N "value": ["Negative"], }, }, + include_total=True, limit=1000, pagination_key="pagination_key", skip=0, @@ -1362,7 +1361,6 @@ async def test_method_create_phone_call_with_all_params(self, async_client: Asyn "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -1558,7 +1556,6 @@ async def test_method_create_web_call_with_all_params(self, async_client: AsyncR "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", @@ -1751,7 +1748,6 @@ async def test_method_register_phone_call_with_all_params(self, async_client: As "speech_normalization": True, }, "interruption_sensitivity": 1, - "is_public": False, "ivr_option": { "action": {"type": "hangup"}, "detection_prompt": "detection_prompt", diff --git a/tests/api_resources/test_chat.py b/tests/api_resources/test_chat.py index 32b4ed86..cefde6e1 100644 --- a/tests/api_resources/test_chat.py +++ b/tests/api_resources/test_chat.py @@ -179,6 +179,7 @@ def test_method_list(self, client: Retell) -> None: def test_method_list_with_all_params(self, client: Retell) -> None: chat = client.chat.list( filter_criteria={}, + include_total=True, limit=1000, pagination_key="pagination_key", skip=0, @@ -543,6 +544,7 @@ async def test_method_list(self, async_client: AsyncRetell) -> None: async def test_method_list_with_all_params(self, async_client: AsyncRetell) -> None: chat = await async_client.chat.list( filter_criteria={}, + include_total=True, limit=1000, pagination_key="pagination_key", skip=0, diff --git a/tests/api_resources/test_chat_agent.py b/tests/api_resources/test_chat_agent.py index 8166f0db..7c987ecb 100644 --- a/tests/api_resources/test_chat_agent.py +++ b/tests/api_resources/test_chat_agent.py @@ -59,7 +59,6 @@ def test_method_create_with_all_params(self, client: Retell) -> None: "high_empathy": True, "scope_boundaries": True, }, - is_public=False, language="en-US", opt_in_signed_url=True, pii_config={ @@ -200,7 +199,6 @@ def test_method_update_with_all_params(self, client: Retell) -> None: "high_empathy": True, "scope_boundaries": True, }, - is_public=False, language="en-US", opt_in_signed_url=True, pii_config={ @@ -488,7 +486,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncRetell) -> "high_empathy": True, "scope_boundaries": True, }, - is_public=False, language="en-US", opt_in_signed_url=True, pii_config={ @@ -629,7 +626,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncRetell) -> "high_empathy": True, "scope_boundaries": True, }, - is_public=False, language="en-US", opt_in_signed_url=True, pii_config={ diff --git a/tests/api_resources/test_conversation_flow.py b/tests/api_resources/test_conversation_flow.py index 98279724..99a920b7 100644 --- a/tests/api_resources/test_conversation_flow.py +++ b/tests/api_resources/test_conversation_flow.py @@ -288,6 +288,7 @@ def test_method_create_with_all_params(self, client: Retell) -> None: "x": 100, "y": 200, }, + "flex_mode": False, "mcps": [ { "name": "name", @@ -349,6 +350,7 @@ def test_method_create_with_all_params(self, client: Retell) -> None: "company_name": "Retell Inc", "support_hours": "9 AM - 5 PM", }, + flex_mode=False, global_prompt="You are a helpful customer service agent.", is_transfer_llm=False, kb_config={ @@ -659,6 +661,7 @@ def test_method_update_with_all_params(self, client: Retell) -> None: "x": 100, "y": 200, }, + "flex_mode": False, "mcps": [ { "name": "name", @@ -720,6 +723,7 @@ def test_method_update_with_all_params(self, client: Retell) -> None: "company_name": "Retell Inc", "support_hours": "9 AM - 5 PM", }, + flex_mode=False, global_prompt="You are a helpful customer service agent.", is_transfer_llm=False, kb_config={ @@ -1293,6 +1297,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRetell) -> "x": 100, "y": 200, }, + "flex_mode": False, "mcps": [ { "name": "name", @@ -1354,6 +1359,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRetell) -> "company_name": "Retell Inc", "support_hours": "9 AM - 5 PM", }, + flex_mode=False, global_prompt="You are a helpful customer service agent.", is_transfer_llm=False, kb_config={ @@ -1664,6 +1670,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRetell) -> "x": 100, "y": 200, }, + "flex_mode": False, "mcps": [ { "name": "name", @@ -1725,6 +1732,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRetell) -> "company_name": "Retell Inc", "support_hours": "9 AM - 5 PM", }, + flex_mode=False, global_prompt="You are a helpful customer service agent.", is_transfer_llm=False, kb_config={ diff --git a/tests/api_resources/test_conversation_flow_component.py b/tests/api_resources/test_conversation_flow_component.py index 5c1e440c..2043fc81 100644 --- a/tests/api_resources/test_conversation_flow_component.py +++ b/tests/api_resources/test_conversation_flow_component.py @@ -159,6 +159,7 @@ def test_method_create_with_all_params(self, client: Retell) -> None: "x": 100, "y": 200, }, + flex_mode=False, mcps=[ { "name": "name", @@ -324,6 +325,7 @@ def test_method_update_with_all_params(self, client: Retell) -> None: "x": 100, "y": 200, }, + flex_mode=False, mcps=[ { "name": "name", @@ -758,6 +760,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncRetell) -> "x": 100, "y": 200, }, + flex_mode=False, mcps=[ { "name": "name", @@ -923,6 +926,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncRetell) -> "x": 100, "y": 200, }, + flex_mode=False, mcps=[ { "name": "name", diff --git a/tests/api_resources/test_llm.py b/tests/api_resources/test_llm.py index 0e4f2b32..e7b9b4ab 100644 --- a/tests/api_resources/test_llm.py +++ b/tests/api_resources/test_llm.py @@ -133,7 +133,6 @@ def test_method_create_with_all_params(self, client: Retell) -> None: }, ], tool_call_strict_mode=True, - version=1, ) assert_matches_type(LlmResponse, llm, path=["response"]) @@ -223,7 +222,7 @@ def test_method_update(self, client: Retell) -> None: def test_method_update_with_all_params(self, client: Retell) -> None: llm = client.llm.update( llm_id="16b980523634a6dc504898cda492e939", - query_version=1, + version=1, begin_after_user_silence_ms=2000, begin_message="Hey I am a virtual assistant calling from Retell Hospital.", default_dynamic_variables={"customer_name": "John Doe"}, @@ -327,7 +326,6 @@ def test_method_update_with_all_params(self, client: Retell) -> None: }, ], tool_call_strict_mode=True, - body_version=1, ) assert_matches_type(LlmResponse, llm, path=["response"]) @@ -564,7 +562,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncRetell) -> }, ], tool_call_strict_mode=True, - version=1, ) assert_matches_type(LlmResponse, llm, path=["response"]) @@ -654,7 +651,7 @@ async def test_method_update(self, async_client: AsyncRetell) -> None: async def test_method_update_with_all_params(self, async_client: AsyncRetell) -> None: llm = await async_client.llm.update( llm_id="16b980523634a6dc504898cda492e939", - query_version=1, + version=1, begin_after_user_silence_ms=2000, begin_message="Hey I am a virtual assistant calling from Retell Hospital.", default_dynamic_variables={"customer_name": "John Doe"}, @@ -758,7 +755,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncRetell) -> }, ], tool_call_strict_mode=True, - body_version=1, ) assert_matches_type(LlmResponse, llm, path=["response"])