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.135.0"
".": "4.136.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: 1041
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-9cc495153444889989ae89f838f2d0429c3dd41e08a26fb76658b03f68007794.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx/telnyx-1a793276dc4d7fa1e848d3ca6b301533de22377db293aeca2eca1ca8e52f04eb.yml
openapi_spec_hash: 80c8b711c00455999eba32f4c3f225fe
config_hash: 6b6686945572dbb277d4884e51cb07e7
config_hash: a192a56f5166333bbe5063b015ed0f54
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 4.136.0 (2026-05-15)

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

### Features

* **api:** manual updates ([b60f39c](https://github.com/team-telnyx/telnyx-python/commit/b60f39c59eafd3fe80a26720e50e96e134fc44b2))

## 4.135.0 (2026-05-15)

Full Changelog: [v4.134.0...v4.135.0](https://github.com/team-telnyx/telnyx-python/compare/v4.134.0...v4.135.0)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,7 @@ from telnyx.types.calls import (
TranscriptionEngineBConfig,
TranscriptionEngineDeepgramConfig,
TranscriptionEngineGoogleConfig,
TranscriptionEngineSpeechmaticsConfig,
TranscriptionEngineTelnyxConfig,
TranscriptionEngineXaiConfig,
TranscriptionStartRequest,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "telnyx"
version = "4.135.0"
version = "4.136.0"
description = "The official Python library for the telnyx API"
dynamic = ["readme"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/telnyx/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "telnyx"
__version__ = "4.135.0" # x-release-please-version
__version__ = "4.136.0" # x-release-please-version
8 changes: 4 additions & 4 deletions src/telnyx/resources/ai/ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def with_streaming_response(self) -> AIResourceWithStreamingResponse:
def create_response(
self,
*,
body: Dict[str, object],
params: Dict[str, object],
# 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,
Expand Down Expand Up @@ -230,7 +230,7 @@ def create_response(
"""
return self._post(
"/ai/responses",
body=maybe_transform(body, ai_create_response_params.AICreateResponseParams),
body=maybe_transform(params, ai_create_response_params.AICreateResponseParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down Expand Up @@ -405,7 +405,7 @@ def with_streaming_response(self) -> AsyncAIResourceWithStreamingResponse:
async def create_response(
self,
*,
body: Dict[str, object],
params: Dict[str, object],
# 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,
Expand Down Expand Up @@ -433,7 +433,7 @@ async def create_response(
"""
return await self._post(
"/ai/responses",
body=await async_maybe_transform(body, ai_create_response_params.AICreateResponseParams),
body=await async_maybe_transform(params, ai_create_response_params.AICreateResponseParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
Expand Down
6 changes: 4 additions & 2 deletions src/telnyx/resources/ai/openai/openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

from __future__ import annotations

from typing import Dict

import httpx

from .chat import (
Expand Down Expand Up @@ -73,7 +75,7 @@ def create_response(
self,
*,
conversation: str | Omit = omit,
input: object | Omit = omit,
input: Dict[str, object] | Omit = omit,
instructions: str | Omit = omit,
model: str | Omit = omit,
stream: bool | Omit = omit,
Expand Down Expand Up @@ -229,7 +231,7 @@ async def create_response(
self,
*,
conversation: str | Omit = omit,
input: object | Omit = omit,
input: Dict[str, object] | Omit = omit,
instructions: str | Omit = omit,
model: str | Omit = omit,
stream: bool | Omit = omit,
Expand Down
3 changes: 2 additions & 1 deletion src/telnyx/types/ai/openai_create_response_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

from typing import Dict
from typing_extensions import TypedDict

__all__ = ["OpenAICreateResponseParams"]
Expand All @@ -16,7 +17,7 @@ class OpenAICreateResponseParams(TypedDict, total=False):
and tool-result followups. Omit it for a non-persisted, stateless response.
"""

input: object
input: Dict[str, object]
"""The input items for this turn, using the OpenAI Responses API input format."""

instructions: str
Expand Down
2 changes: 1 addition & 1 deletion src/telnyx/types/ai_create_response_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@


class AICreateResponseParams(TypedDict, total=False):
body: Required[Dict[str, object]]
params: Required[Dict[str, object]]
3 changes: 3 additions & 0 deletions src/telnyx/types/calls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@
from .transcription_engine_assemblyai_config_param import (
TranscriptionEngineAssemblyaiConfigParam as TranscriptionEngineAssemblyaiConfigParam,
)
from .transcription_engine_speechmatics_config_param import (
TranscriptionEngineSpeechmaticsConfigParam as TranscriptionEngineSpeechmaticsConfigParam,
)
from .call_control_command_result_with_conversation_id import (
CallControlCommandResultWithConversationID as CallControlCommandResultWithConversationID,
)
44 changes: 3 additions & 41 deletions src/telnyx/types/calls/action_start_transcription_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@
from .transcription_engine_google_config_param import TranscriptionEngineGoogleConfigParam
from .transcription_engine_telnyx_config_param import TranscriptionEngineTelnyxConfigParam
from .transcription_engine_assemblyai_config_param import TranscriptionEngineAssemblyaiConfigParam
from .transcription_engine_speechmatics_config_param import TranscriptionEngineSpeechmaticsConfigParam

__all__ = [
"ActionStartTranscriptionParams",
"TranscriptionEngineConfig",
"TranscriptionEngineConfigTranscriptionEngineSpeechmaticsConfig",
]
__all__ = ["ActionStartTranscriptionParams", "TranscriptionEngineConfig"]


class ActionStartTranscriptionParams(TypedDict, total=False):
Expand Down Expand Up @@ -55,48 +52,13 @@ class ActionStartTranscriptionParams(TypedDict, total=False):
"""


class TranscriptionEngineConfigTranscriptionEngineSpeechmaticsConfig(TypedDict, total=False):
interim_results: bool
"""Whether to send also interim results.

If set to false, only final results will be sent.
"""

language: Literal[
"en",
"ba",
"eu",
"gl",
"ga",
"mt",
"mn",
"sw",
"ug",
"cy",
"ar_en",
"cmn_en",
"en_ms",
"en_ta",
"tl",
"es-bilingual-en",
"cmn_en_ms_ta",
]
"""Language to use for speech recognition"""

transcription_engine: Literal["Speechmatics"]
"""Engine identifier for Speechmatics transcription service"""

transcription_model: Literal["speechmatics/standard"]
"""The model to use for transcription."""


TranscriptionEngineConfig: TypeAlias = Union[
TranscriptionEngineGoogleConfigParam,
TranscriptionEngineTelnyxConfigParam,
TranscriptionEngineAzureConfigParam,
TranscriptionEngineXaiConfigParam,
TranscriptionEngineAssemblyaiConfigParam,
TranscriptionEngineConfigTranscriptionEngineSpeechmaticsConfig,
TranscriptionEngineSpeechmaticsConfigParam,
TranscriptionEngineAConfigParam,
TranscriptionEngineBConfigParam,
DeepgramNova2ConfigParam,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing_extensions import Literal, TypedDict

__all__ = ["TranscriptionEngineSpeechmaticsConfigParam"]


class TranscriptionEngineSpeechmaticsConfigParam(TypedDict, total=False):
interim_results: bool
"""Whether to send also interim results.

If set to false, only final results will be sent.
"""

language: Literal[
"en",
"ba",
"eu",
"gl",
"ga",
"mt",
"mn",
"sw",
"ug",
"cy",
"ar_en",
"cmn_en",
"en_ms",
"en_ta",
"tl",
"es-bilingual-en",
"cmn_en_ms_ta",
]
"""Language to use for speech recognition"""

transcription_engine: Literal["Speechmatics"]
"""Engine identifier for Speechmatics transcription service"""

transcription_model: Literal["speechmatics/standard"]
"""The model to use for transcription."""
45 changes: 3 additions & 42 deletions src/telnyx/types/calls/transcription_start_request_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,56 +14,17 @@
from .transcription_engine_google_config_param import TranscriptionEngineGoogleConfigParam
from .transcription_engine_telnyx_config_param import TranscriptionEngineTelnyxConfigParam
from .transcription_engine_assemblyai_config_param import TranscriptionEngineAssemblyaiConfigParam
from .transcription_engine_speechmatics_config_param import TranscriptionEngineSpeechmaticsConfigParam

__all__ = [
"TranscriptionStartRequestParam",
"TranscriptionEngineConfig",
"TranscriptionEngineConfigTranscriptionEngineSpeechmaticsConfig",
]


class TranscriptionEngineConfigTranscriptionEngineSpeechmaticsConfig(TypedDict, total=False):
interim_results: bool
"""Whether to send also interim results.

If set to false, only final results will be sent.
"""

language: Literal[
"en",
"ba",
"eu",
"gl",
"ga",
"mt",
"mn",
"sw",
"ug",
"cy",
"ar_en",
"cmn_en",
"en_ms",
"en_ta",
"tl",
"es-bilingual-en",
"cmn_en_ms_ta",
]
"""Language to use for speech recognition"""

transcription_engine: Literal["Speechmatics"]
"""Engine identifier for Speechmatics transcription service"""

transcription_model: Literal["speechmatics/standard"]
"""The model to use for transcription."""

__all__ = ["TranscriptionStartRequestParam", "TranscriptionEngineConfig"]

TranscriptionEngineConfig: TypeAlias = Union[
TranscriptionEngineGoogleConfigParam,
TranscriptionEngineTelnyxConfigParam,
TranscriptionEngineAzureConfigParam,
TranscriptionEngineXaiConfigParam,
TranscriptionEngineAssemblyaiConfigParam,
TranscriptionEngineConfigTranscriptionEngineSpeechmaticsConfig,
TranscriptionEngineSpeechmaticsConfigParam,
TranscriptionEngineAConfigParam,
TranscriptionEngineBConfigParam,
DeepgramNova2ConfigParam,
Expand Down
24 changes: 2 additions & 22 deletions tests/api_resources/ai/test_openai.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,7 @@ def test_method_create_response(self, client: Telnyx) -> None:
def test_method_create_response_with_all_params(self, client: Telnyx) -> None:
openai = client.ai.openai.create_response(
conversation="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
input=[
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Hello, world!",
}
],
}
],
input={"0": "bar"},
instructions="You are a friendly chatbot.",
model="zai-org/GLM-5.1-FP8",
stream=True,
Expand Down Expand Up @@ -112,17 +102,7 @@ async def test_method_create_response(self, async_client: AsyncTelnyx) -> None:
async def test_method_create_response_with_all_params(self, async_client: AsyncTelnyx) -> None:
openai = await async_client.ai.openai.create_response(
conversation="6a09cdc3-8948-47f0-aa62-74ac943d6c58",
input=[
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Hello, world!",
}
],
}
],
input={"0": "bar"},
instructions="You are a friendly chatbot.",
model="zai-org/GLM-5.1-FP8",
stream=True,
Expand Down
Loading
Loading