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 @@
{
".": "5.34.0"
".": "5.35.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 74
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell/retell-65010a06af8b943109f17d3535a54342571a12295012ebfef0f0d67407b32600.yml
configured_endpoints: 75
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/retell/retell-12451a2b14cd9c215cb73f2112aa40775cbe48358390072bea2c1f24cba39c30.yml
openapi_spec_hash: bf87b12f54c30051abf0517dfbc2d593
config_hash: 2f10343088303baf299a329675caff74
config_hash: e09b48401947e98c9cb604f34983bf1d
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.35.0 (2026-05-08)

Full Changelog: [v5.34.0...v5.35.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.34.0...v5.35.0)

### Features

* **api:** api update ([d6f6e03](https://github.com/RetellAI/retell-python-sdk/commit/d6f6e03394a0f9c57fbf3fc73c7dcbc365a499a3))

## 5.34.0 (2026-05-08)

Full Changelog: [v5.33.0...v5.34.0](https://github.com/RetellAI/retell-python-sdk/compare/v5.33.0...v5.34.0)
Expand Down
1 change: 1 addition & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Methods:
- <code title="get /get-chat/{chat_id}">client.chat.<a href="./src/retell/resources/chat.py">retrieve</a>(chat_id) -> <a href="./src/retell/types/chat_response.py">ChatResponse</a></code>
- <code title="patch /update-chat/{chat_id}">client.chat.<a href="./src/retell/resources/chat.py">update</a>(chat_id, \*\*<a href="src/retell/types/chat_update_params.py">params</a>) -> <a href="./src/retell/types/chat_response.py">ChatResponse</a></code>
- <code title="get /list-chat">client.chat.<a href="./src/retell/resources/chat.py">list</a>(\*\*<a href="src/retell/types/chat_list_params.py">params</a>) -> <a href="./src/retell/types/chat_list_response.py">ChatListResponse</a></code>
- <code title="delete /delete-chat/{chat_id}">client.chat.<a href="./src/retell/resources/chat.py">delete</a>(chat_id) -> None</code>
- <code title="post /create-chat-completion">client.chat.<a href="./src/retell/resources/chat.py">create_chat_completion</a>(\*\*<a href="src/retell/types/chat_create_chat_completion_params.py">params</a>) -> <a href="./src/retell/types/chat_create_chat_completion_response.py">ChatCreateChatCompletionResponse</a></code>
- <code title="post /create-sms-chat">client.chat.<a href="./src/retell/resources/chat.py">create_sms_chat</a>(\*\*<a href="src/retell/types/chat_create_sms_chat_params.py">params</a>) -> <a href="./src/retell/types/chat_response.py">ChatResponse</a></code>
- <code title="patch /end-chat/{chat_id}">client.chat.<a href="./src/retell/resources/chat.py">end</a>(chat_id) -> None</code>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "retell-sdk"
version = "5.34.0"
version = "5.35.0"
description = "The official Python library for the retell API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/retell/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "retell"
__version__ = "5.34.0" # x-release-please-version
__version__ = "5.35.0" # x-release-please-version
80 changes: 80 additions & 0 deletions src/retell/resources/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,40 @@ def list(
cast_to=ChatListResponse,
)

def delete(
self,
chat_id: str,
*,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Delete an existing chat

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not chat_id:
raise ValueError(f"Expected a non-empty value for `chat_id` but received {chat_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return self._delete(
path_template("/delete-chat/{chat_id}", chat_id=chat_id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=NoneType,
)

def create_chat_completion(
self,
*,
Expand Down Expand Up @@ -643,6 +677,40 @@ async def list(
cast_to=ChatListResponse,
)

async def delete(
self,
chat_id: str,
*,
# 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,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> None:
"""
Delete an existing chat

Args:
extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not chat_id:
raise ValueError(f"Expected a non-empty value for `chat_id` but received {chat_id!r}")
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
return await self._delete(
path_template("/delete-chat/{chat_id}", chat_id=chat_id),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=NoneType,
)

async def create_chat_completion(
self,
*,
Expand Down Expand Up @@ -810,6 +878,9 @@ def __init__(self, chat: ChatResource) -> None:
chat.list, # pyright: ignore[reportDeprecated],
)
)
self.delete = to_raw_response_wrapper(
chat.delete,
)
self.create_chat_completion = to_raw_response_wrapper(
chat.create_chat_completion,
)
Expand Down Expand Up @@ -839,6 +910,9 @@ def __init__(self, chat: AsyncChatResource) -> None:
chat.list, # pyright: ignore[reportDeprecated],
)
)
self.delete = async_to_raw_response_wrapper(
chat.delete,
)
self.create_chat_completion = async_to_raw_response_wrapper(
chat.create_chat_completion,
)
Expand Down Expand Up @@ -868,6 +942,9 @@ def __init__(self, chat: ChatResource) -> None:
chat.list, # pyright: ignore[reportDeprecated],
)
)
self.delete = to_streamed_response_wrapper(
chat.delete,
)
self.create_chat_completion = to_streamed_response_wrapper(
chat.create_chat_completion,
)
Expand Down Expand Up @@ -897,6 +974,9 @@ def __init__(self, chat: AsyncChatResource) -> None:
chat.list, # pyright: ignore[reportDeprecated],
)
)
self.delete = async_to_streamed_response_wrapper(
chat.delete,
)
self.create_chat_completion = async_to_streamed_response_wrapper(
chat.create_chat_completion,
)
Expand Down
84 changes: 84 additions & 0 deletions tests/api_resources/test_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,48 @@ def test_streaming_response_list(self, client: Retell) -> None:

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_delete(self, client: Retell) -> None:
chat = client.chat.delete(
"16b980523634a6dc504898cda492e939",
)
assert chat is None

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_raw_response_delete(self, client: Retell) -> None:
response = client.chat.with_raw_response.delete(
"16b980523634a6dc504898cda492e939",
)

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
chat = response.parse()
assert chat is None

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_streaming_response_delete(self, client: Retell) -> None:
with client.chat.with_streaming_response.delete(
"16b980523634a6dc504898cda492e939",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

chat = response.parse()
assert chat is None

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_path_params_delete(self, client: Retell) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `chat_id` but received ''"):
client.chat.with_raw_response.delete(
"",
)

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
def test_method_create_chat_completion(self, client: Retell) -> None:
Expand Down Expand Up @@ -540,6 +582,48 @@ async def test_streaming_response_list(self, async_client: AsyncRetell) -> None:

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_delete(self, async_client: AsyncRetell) -> None:
chat = await async_client.chat.delete(
"16b980523634a6dc504898cda492e939",
)
assert chat is None

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_raw_response_delete(self, async_client: AsyncRetell) -> None:
response = await async_client.chat.with_raw_response.delete(
"16b980523634a6dc504898cda492e939",
)

assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
chat = await response.parse()
assert chat is None

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_streaming_response_delete(self, async_client: AsyncRetell) -> None:
async with async_client.chat.with_streaming_response.delete(
"16b980523634a6dc504898cda492e939",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"

chat = await response.parse()
assert chat is None

assert cast(Any, response.is_closed) is True

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_path_params_delete(self, async_client: AsyncRetell) -> None:
with pytest.raises(ValueError, match=r"Expected a non-empty value for `chat_id` but received ''"):
await async_client.chat.with_raw_response.delete(
"",
)

@pytest.mark.skip(reason="Mock server tests are disabled")
@parametrize
async def test_method_create_chat_completion(self, async_client: AsyncRetell) -> None:
Expand Down