Skip to content

Commit f1e4af5

Browse files
feat: Add xAI and missing voice providers to Call Control API
1 parent e82e1bc commit f1e4af5

22 files changed

Lines changed: 320 additions & 450 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1029
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-5a95d4e4875d6ba2ffaf51a7cedff6709f6a344add0226694c8c9b0d1712ac37.yml
3-
openapi_spec_hash: 7d5daafe08dc9dba0c9f2f50f23f0e6b
4-
config_hash: 77bd21b3699ffa20c210990f62eb8879
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-dfc8acb48b0cf82f37fb76b8cd2786eb3a19778ac09f0fa1789d17e0fff8724a.yml
3+
openapi_spec_hash: d225e8cf339310f78e672aec3ac51a24
4+
config_hash: db5d4ab5ad87516c9c3d8fdb77eaba78

api.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ from telnyx.types.ai import (
590590
AssistantsList,
591591
AudioVisualizerConfig,
592592
EnabledFeatures,
593+
ExternalLlm,
594+
ExternalLlmReq,
595+
FallbackConfig,
596+
FallbackConfigReq,
593597
HangupTool,
594598
HangupToolParams,
595599
ImportMetadata,
@@ -599,6 +603,8 @@ from telnyx.types.ai import (
599603
MessagingSettings,
600604
Observability,
601605
ObservabilityReq,
606+
PostConversationSettings,
607+
PostConversationSettingsReq,
602608
PrivacySettings,
603609
RetrievalTool,
604610
TelephonySettings,

src/telnyx/resources/ai/assistants/assistants.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,18 @@
8080
from ....types.ai.assistant_tool_param import AssistantToolParam
8181
from ....types.ai.voice_settings_param import VoiceSettingsParam
8282
from ....types.ai.widget_settings_param import WidgetSettingsParam
83+
from ....types.ai.external_llm_req_param import ExternalLlmReqParam
8384
from ....types.ai.insight_settings_param import InsightSettingsParam
8485
from ....types.ai.privacy_settings_param import PrivacySettingsParam
8586
from ....types.ai.assistant_chat_response import AssistantChatResponse
8687
from ....types.ai.observability_req_param import ObservabilityReqParam
8788
from ....types.ai.messaging_settings_param import MessagingSettingsParam
8889
from ....types.ai.telephony_settings_param import TelephonySettingsParam
8990
from ....types.ai.assistant_delete_response import AssistantDeleteResponse
91+
from ....types.ai.fallback_config_req_param import FallbackConfigReqParam
9092
from ....types.ai.assistant_send_sms_response import AssistantSendSMSResponse
9193
from ....types.ai.transcription_settings_param import TranscriptionSettingsParam
94+
from ....types.ai.post_conversation_settings_req_param import PostConversationSettingsReqParam
9295

9396
__all__ = ["AssistantsResource", "AsyncAssistantsResource"]
9497

@@ -155,8 +158,8 @@ def create(
155158
dynamic_variables_webhook_timeout_ms: int | Omit = omit,
156159
dynamic_variables_webhook_url: str | Omit = omit,
157160
enabled_features: List[EnabledFeatures] | Omit = omit,
158-
external_llm: assistant_create_params.ExternalLlm | Omit = omit,
159-
fallback_config: assistant_create_params.FallbackConfig | Omit = omit,
161+
external_llm: ExternalLlmReqParam | Omit = omit,
162+
fallback_config: FallbackConfigReqParam | Omit = omit,
160163
greeting: str | Omit = omit,
161164
insight_settings: InsightSettingsParam | Omit = omit,
162165
integrations: Iterable[assistant_create_params.Integration] | Omit = omit,
@@ -166,7 +169,7 @@ def create(
166169
messaging_settings: MessagingSettingsParam | Omit = omit,
167170
model: str | Omit = omit,
168171
observability_settings: ObservabilityReqParam | Omit = omit,
169-
post_conversation_settings: assistant_create_params.PostConversationSettings | Omit = omit,
172+
post_conversation_settings: PostConversationSettingsReqParam | Omit = omit,
170173
privacy_settings: PrivacySettingsParam | Omit = omit,
171174
tags: SequenceNotStr[str] | Omit = omit,
172175
telephony_settings: TelephonySettingsParam | Omit = omit,
@@ -365,8 +368,8 @@ def update(
365368
dynamic_variables_webhook_timeout_ms: int | Omit = omit,
366369
dynamic_variables_webhook_url: str | Omit = omit,
367370
enabled_features: List[EnabledFeatures] | Omit = omit,
368-
external_llm: assistant_update_params.ExternalLlm | Omit = omit,
369-
fallback_config: assistant_update_params.FallbackConfig | Omit = omit,
371+
external_llm: ExternalLlmReqParam | Omit = omit,
372+
fallback_config: FallbackConfigReqParam | Omit = omit,
370373
greeting: str | Omit = omit,
371374
insight_settings: InsightSettingsParam | Omit = omit,
372375
instructions: str | Omit = omit,
@@ -378,7 +381,7 @@ def update(
378381
model: str | Omit = omit,
379382
name: str | Omit = omit,
380383
observability_settings: ObservabilityReqParam | Omit = omit,
381-
post_conversation_settings: assistant_update_params.PostConversationSettings | Omit = omit,
384+
post_conversation_settings: PostConversationSettingsReqParam | Omit = omit,
382385
privacy_settings: PrivacySettingsParam | Omit = omit,
383386
promote_to_main: bool | Omit = omit,
384387
tags: SequenceNotStr[str] | Omit = omit,
@@ -880,8 +883,8 @@ async def create(
880883
dynamic_variables_webhook_timeout_ms: int | Omit = omit,
881884
dynamic_variables_webhook_url: str | Omit = omit,
882885
enabled_features: List[EnabledFeatures] | Omit = omit,
883-
external_llm: assistant_create_params.ExternalLlm | Omit = omit,
884-
fallback_config: assistant_create_params.FallbackConfig | Omit = omit,
886+
external_llm: ExternalLlmReqParam | Omit = omit,
887+
fallback_config: FallbackConfigReqParam | Omit = omit,
885888
greeting: str | Omit = omit,
886889
insight_settings: InsightSettingsParam | Omit = omit,
887890
integrations: Iterable[assistant_create_params.Integration] | Omit = omit,
@@ -891,7 +894,7 @@ async def create(
891894
messaging_settings: MessagingSettingsParam | Omit = omit,
892895
model: str | Omit = omit,
893896
observability_settings: ObservabilityReqParam | Omit = omit,
894-
post_conversation_settings: assistant_create_params.PostConversationSettings | Omit = omit,
897+
post_conversation_settings: PostConversationSettingsReqParam | Omit = omit,
895898
privacy_settings: PrivacySettingsParam | Omit = omit,
896899
tags: SequenceNotStr[str] | Omit = omit,
897900
telephony_settings: TelephonySettingsParam | Omit = omit,
@@ -1090,8 +1093,8 @@ async def update(
10901093
dynamic_variables_webhook_timeout_ms: int | Omit = omit,
10911094
dynamic_variables_webhook_url: str | Omit = omit,
10921095
enabled_features: List[EnabledFeatures] | Omit = omit,
1093-
external_llm: assistant_update_params.ExternalLlm | Omit = omit,
1094-
fallback_config: assistant_update_params.FallbackConfig | Omit = omit,
1096+
external_llm: ExternalLlmReqParam | Omit = omit,
1097+
fallback_config: FallbackConfigReqParam | Omit = omit,
10951098
greeting: str | Omit = omit,
10961099
insight_settings: InsightSettingsParam | Omit = omit,
10971100
instructions: str | Omit = omit,
@@ -1103,7 +1106,7 @@ async def update(
11031106
model: str | Omit = omit,
11041107
name: str | Omit = omit,
11051108
observability_settings: ObservabilityReqParam | Omit = omit,
1106-
post_conversation_settings: assistant_update_params.PostConversationSettings | Omit = omit,
1109+
post_conversation_settings: PostConversationSettingsReqParam | Omit = omit,
11071110
privacy_settings: PrivacySettingsParam | Omit = omit,
11081111
promote_to_main: bool | Omit = omit,
11091112
tags: SequenceNotStr[str] | Omit = omit,

src/telnyx/resources/ai/assistants/versions.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,15 @@
2424
from ....types.ai.assistant_tool_param import AssistantToolParam
2525
from ....types.ai.voice_settings_param import VoiceSettingsParam
2626
from ....types.ai.widget_settings_param import WidgetSettingsParam
27+
from ....types.ai.external_llm_req_param import ExternalLlmReqParam
2728
from ....types.ai.insight_settings_param import InsightSettingsParam
2829
from ....types.ai.privacy_settings_param import PrivacySettingsParam
2930
from ....types.ai.observability_req_param import ObservabilityReqParam
3031
from ....types.ai.messaging_settings_param import MessagingSettingsParam
3132
from ....types.ai.telephony_settings_param import TelephonySettingsParam
33+
from ....types.ai.fallback_config_req_param import FallbackConfigReqParam
3234
from ....types.ai.transcription_settings_param import TranscriptionSettingsParam
35+
from ....types.ai.post_conversation_settings_req_param import PostConversationSettingsReqParam
3336

3437
__all__ = ["VersionsResource", "AsyncVersionsResource"]
3538

@@ -111,8 +114,8 @@ def update(
111114
dynamic_variables_webhook_timeout_ms: int | Omit = omit,
112115
dynamic_variables_webhook_url: str | Omit = omit,
113116
enabled_features: List[EnabledFeatures] | Omit = omit,
114-
external_llm: version_update_params.ExternalLlm | Omit = omit,
115-
fallback_config: version_update_params.FallbackConfig | Omit = omit,
117+
external_llm: ExternalLlmReqParam | Omit = omit,
118+
fallback_config: FallbackConfigReqParam | Omit = omit,
116119
greeting: str | Omit = omit,
117120
insight_settings: InsightSettingsParam | Omit = omit,
118121
instructions: str | Omit = omit,
@@ -124,7 +127,7 @@ def update(
124127
model: str | Omit = omit,
125128
name: str | Omit = omit,
126129
observability_settings: ObservabilityReqParam | Omit = omit,
127-
post_conversation_settings: version_update_params.PostConversationSettings | Omit = omit,
130+
post_conversation_settings: PostConversationSettingsReqParam | Omit = omit,
128131
privacy_settings: PrivacySettingsParam | Omit = omit,
129132
tags: SequenceNotStr[str] | Omit = omit,
130133
telephony_settings: TelephonySettingsParam | Omit = omit,
@@ -472,8 +475,8 @@ async def update(
472475
dynamic_variables_webhook_timeout_ms: int | Omit = omit,
473476
dynamic_variables_webhook_url: str | Omit = omit,
474477
enabled_features: List[EnabledFeatures] | Omit = omit,
475-
external_llm: version_update_params.ExternalLlm | Omit = omit,
476-
fallback_config: version_update_params.FallbackConfig | Omit = omit,
478+
external_llm: ExternalLlmReqParam | Omit = omit,
479+
fallback_config: FallbackConfigReqParam | Omit = omit,
477480
greeting: str | Omit = omit,
478481
insight_settings: InsightSettingsParam | Omit = omit,
479482
instructions: str | Omit = omit,
@@ -485,7 +488,7 @@ async def update(
485488
model: str | Omit = omit,
486489
name: str | Omit = omit,
487490
observability_settings: ObservabilityReqParam | Omit = omit,
488-
post_conversation_settings: version_update_params.PostConversationSettings | Omit = omit,
491+
post_conversation_settings: PostConversationSettingsReqParam | Omit = omit,
489492
privacy_settings: PrivacySettingsParam | Omit = omit,
490493
tags: SequenceNotStr[str] | Omit = omit,
491494
telephony_settings: TelephonySettingsParam | Omit = omit,

src/telnyx/resources/calls/actions.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,8 @@ def gather_using_ai(
869869
- **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
870870
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
871871
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
872+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
873+
`ara`, `rex`, `sal`, `leo`.
872874
873875
voice_settings: The settings associated with the voice selected
874876
@@ -1144,6 +1146,8 @@ def gather_using_speak(
11441146
`voice_settings` to configure precision, sample_rate, and format.
11451147
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
11461148
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
1149+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
1150+
`ara`, `rex`, `sal`, `leo`.
11471151
11481152
For service_level basic, you may define the gender of the speaker (male or
11491153
female).
@@ -1865,6 +1869,8 @@ def speak(
18651869
`voice_settings` to configure precision, sample_rate, and format.
18661870
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
18671871
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
1872+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
1873+
`ara`, `rex`, `sal`, `leo`.
18681874
18691875
For service_level basic, you may define the gender of the speaker (male or
18701876
female).
@@ -2014,6 +2020,8 @@ def start_ai_assistant(
20142020
- **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
20152021
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
20162022
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
2023+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
2024+
`ara`, `rex`, `sal`, `leo`.
20172025
20182026
voice_settings: The settings associated with the voice selected
20192027
@@ -4495,6 +4503,8 @@ async def gather_using_ai(
44954503
- **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
44964504
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
44974505
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
4506+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
4507+
`ara`, `rex`, `sal`, `leo`.
44984508
44994509
voice_settings: The settings associated with the voice selected
45004510
@@ -4770,6 +4780,8 @@ async def gather_using_speak(
47704780
`voice_settings` to configure precision, sample_rate, and format.
47714781
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
47724782
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
4783+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
4784+
`ara`, `rex`, `sal`, `leo`.
47734785
47744786
For service_level basic, you may define the gender of the speaker (male or
47754787
female).
@@ -5491,6 +5503,8 @@ async def speak(
54915503
`voice_settings` to configure precision, sample_rate, and format.
54925504
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
54935505
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
5506+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
5507+
`ara`, `rex`, `sal`, `leo`.
54945508
54955509
For service_level basic, you may define the gender of the speaker (male or
54965510
female).
@@ -5640,6 +5654,8 @@ async def start_ai_assistant(
56405654
- **Telnyx:** Use `Telnyx.<model_id>.<voice_id>`
56415655
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
56425656
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
5657+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
5658+
`ara`, `rex`, `sal`, `leo`.
56435659
56445660
voice_settings: The settings associated with the voice selected
56455661

src/telnyx/resources/conferences/actions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,8 @@ def speak(
10531053
`voice_settings` to configure precision, sample_rate, and format.
10541054
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
10551055
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
1056+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
1057+
`ara`, `rex`, `sal`, `leo`.
10561058
10571059
For service_level basic, you may define the gender of the speaker (male or
10581060
female).
@@ -2248,6 +2250,8 @@ async def speak(
22482250
`voice_settings` to configure precision, sample_rate, and format.
22492251
- **Inworld:** Use `Inworld.<ModelId>.<VoiceId>` (e.g., `Inworld.Mini.Loretta`,
22502252
`Inworld.Max.Oliver`). Supported models: `Mini`, `Max`.
2253+
- **xAI:** Use `xAI.<VoiceId>` (e.g., `xAI.eve`). Available voices: `eve`,
2254+
`ara`, `rex`, `sal`, `leo`.
22512255
22522256
For service_level basic, you may define the gender of the speaker (male or
22532257
female).

src/telnyx/types/ai/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
from .bucket_ids import BucketIDs as BucketIDs
66
from .hangup_tool import HangupTool as HangupTool
77
from .conversation import Conversation as Conversation
8+
from .external_llm import ExternalLlm as ExternalLlm
89
from .mission_data import MissionData as MissionData
910
from .observability import Observability as Observability
1011
from .assistant_tool import AssistantTool as AssistantTool
1112
from .retrieval_tool import RetrievalTool as RetrievalTool
1213
from .voice_settings import VoiceSettings as VoiceSettings
1314
from .assistant_param import AssistantParam as AssistantParam
1415
from .assistants_list import AssistantsList as AssistantsList
16+
from .fallback_config import FallbackConfig as FallbackConfig
1517
from .import_metadata import ImportMetadata as ImportMetadata
1618
from .widget_settings import WidgetSettings as WidgetSettings
1719
from .bucket_ids_param import BucketIDsParam as BucketIDsParam
@@ -46,6 +48,7 @@
4648
from .widget_settings_param import WidgetSettingsParam as WidgetSettingsParam
4749
from .background_task_status import BackgroundTaskStatus as BackgroundTaskStatus
4850
from .cluster_compute_params import ClusterComputeParams as ClusterComputeParams
51+
from .external_llm_req_param import ExternalLlmReqParam as ExternalLlmReqParam
4952
from .insight_settings_param import InsightSettingsParam as InsightSettingsParam
5053
from .mcp_server_list_params import McpServerListParams as McpServerListParams
5154
from .privacy_settings_param import PrivacySettingsParam as PrivacySettingsParam
@@ -75,6 +78,7 @@
7578
from .assistant_send_sms_params import AssistantSendSMSParams as AssistantSendSMSParams
7679
from .audio_transcribe_response import AudioTranscribeResponse as AudioTranscribeResponse
7780
from .cluster_retrieve_response import ClusterRetrieveResponse as ClusterRetrieveResponse
81+
from .fallback_config_req_param import FallbackConfigReqParam as FallbackConfigReqParam
7882
from .integration_list_response import IntegrationListResponse as IntegrationListResponse
7983
from .mission_retrieve_response import MissionRetrieveResponse as MissionRetrieveResponse
8084
from .cluster_fetch_graph_params import ClusterFetchGraphParams as ClusterFetchGraphParams
@@ -84,6 +88,7 @@
8488
from .mcp_server_create_response import McpServerCreateResponse as McpServerCreateResponse
8589
from .mcp_server_update_response import McpServerUpdateResponse as McpServerUpdateResponse
8690
from .mission_list_events_params import MissionListEventsParams as MissionListEventsParams
91+
from .post_conversation_settings import PostConversationSettings as PostConversationSettings
8792
from .assistant_send_sms_response import AssistantSendSMSResponse as AssistantSendSMSResponse
8893
from .embedding_retrieve_response import EmbeddingRetrieveResponse as EmbeddingRetrieveResponse
8994
from .assistant_get_texml_response import AssistantGetTexmlResponse as AssistantGetTexmlResponse
@@ -102,6 +107,7 @@
102107
from .embedding_similarity_search_params import EmbeddingSimilaritySearchParams as EmbeddingSimilaritySearchParams
103108
from .transcription_settings_config_param import TranscriptionSettingsConfigParam as TranscriptionSettingsConfigParam
104109
from .embedding_similarity_search_response import EmbeddingSimilaritySearchResponse as EmbeddingSimilaritySearchResponse
110+
from .post_conversation_settings_req_param import PostConversationSettingsReqParam as PostConversationSettingsReqParam
105111
from .inference_embedding_webhook_tool_params import (
106112
InferenceEmbeddingWebhookToolParams as InferenceEmbeddingWebhookToolParams,
107113
)

0 commit comments

Comments
 (0)