diff --git a/.stats.yml b/.stats.yml index e335795..c623f55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 9 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lmnt-kaikato-aryp6r%2Flmnt-com-cd6e35232b72c91b7c58a77e81bc12247f69f118ebfe24ee5b6bad5d59683ff6.yml -openapi_spec_hash: 657b7065d43bc0c630785b37195ff1e6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lmnt-kaikato-aryp6r%2Flmnt-com-827123076176f4f90fe4bd0edfd38c6060c27a8266a249138a8bbd1f0340c411.yml +openapi_spec_hash: d46d69263715343fadacfedddde95b86 config_hash: ad76a808facacf5f53e58d591653bac6 diff --git a/.sync_state b/.sync_state index af94a4b..3670516 100644 --- a/.sync_state +++ b/.sync_state @@ -1 +1 @@ -19a70f2d3733fb0c101046c37e116227f6f594f0 +032105e41bd630ca3d0284654538b9065fa7c6ac diff --git a/tests/api_resources/test_speech.py b/tests/api_resources/test_speech.py index 5227364..a92eaba 100644 --- a/tests/api_resources/test_speech.py +++ b/tests/api_resources/test_speech.py @@ -33,7 +33,7 @@ def test_method_convert(self, client: Lmnt, respx_mock: MockRouter) -> None: respx_mock.post("/v1/ai/speech/convert").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = client.speech.convert( audio=b"raw file contents", - voice="ava", + voice="leah", ) assert speech.is_closed assert speech.json() == {"foo": "bar"} @@ -46,7 +46,7 @@ def test_method_convert_with_all_params(self, client: Lmnt, respx_mock: MockRout respx_mock.post("/v1/ai/speech/convert").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = client.speech.convert( audio=b"raw file contents", - voice="ava", + voice="leah", format="aac", language="auto", sample_rate=8000, @@ -63,7 +63,7 @@ def test_raw_response_convert(self, client: Lmnt, respx_mock: MockRouter) -> Non speech = client.speech.with_raw_response.convert( audio=b"raw file contents", - voice="ava", + voice="leah", ) assert speech.is_closed is True @@ -77,7 +77,7 @@ def test_streaming_response_convert(self, client: Lmnt, respx_mock: MockRouter) respx_mock.post("/v1/ai/speech/convert").mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.speech.with_streaming_response.convert( audio=b"raw file contents", - voice="ava", + voice="leah", ) as speech: assert not speech.is_closed assert speech.http_request.headers.get("X-Stainless-Lang") == "python" @@ -94,7 +94,7 @@ def test_method_generate(self, client: Lmnt, respx_mock: MockRouter) -> None: respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = client.speech.generate( text="hello world.", - voice="ava", + voice="leah", ) assert speech.is_closed assert speech.json() == {"foo": "bar"} @@ -107,7 +107,7 @@ def test_method_generate_with_all_params(self, client: Lmnt, respx_mock: MockRou respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = client.speech.generate( text="hello world.", - voice="ava", + voice="leah", format="aac", language="auto", model="blizzard", @@ -128,7 +128,7 @@ def test_raw_response_generate(self, client: Lmnt, respx_mock: MockRouter) -> No speech = client.speech.with_raw_response.generate( text="hello world.", - voice="ava", + voice="leah", ) assert speech.is_closed is True @@ -142,7 +142,7 @@ def test_streaming_response_generate(self, client: Lmnt, respx_mock: MockRouter) respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(200, json={"foo": "bar"})) with client.speech.with_streaming_response.generate( text="hello world.", - voice="ava", + voice="leah", ) as speech: assert not speech.is_closed assert speech.http_request.headers.get("X-Stainless-Lang") == "python" @@ -157,7 +157,7 @@ def test_streaming_response_generate(self, client: Lmnt, respx_mock: MockRouter) def test_method_generate_detailed(self, client: Lmnt) -> None: speech = client.speech.generate_detailed( text="hello world.", - voice="ava", + voice="leah", ) assert_matches_type(SpeechGenerateDetailedResponse, speech, path=["response"]) @@ -165,7 +165,7 @@ def test_method_generate_detailed(self, client: Lmnt) -> None: def test_method_generate_detailed_with_all_params(self, client: Lmnt) -> None: speech = client.speech.generate_detailed( text="hello world.", - voice="ava", + voice="leah", format="aac", language="auto", model="blizzard", @@ -181,7 +181,7 @@ def test_method_generate_detailed_with_all_params(self, client: Lmnt) -> None: def test_raw_response_generate_detailed(self, client: Lmnt) -> None: response = client.speech.with_raw_response.generate_detailed( text="hello world.", - voice="ava", + voice="leah", ) assert response.is_closed is True @@ -193,7 +193,7 @@ def test_raw_response_generate_detailed(self, client: Lmnt) -> None: def test_streaming_response_generate_detailed(self, client: Lmnt) -> None: with client.speech.with_streaming_response.generate_detailed( text="hello world.", - voice="ava", + voice="leah", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -215,7 +215,7 @@ async def test_method_convert(self, async_client: AsyncLmnt, respx_mock: MockRou respx_mock.post("/v1/ai/speech/convert").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = await async_client.speech.convert( audio=b"raw file contents", - voice="ava", + voice="leah", ) assert speech.is_closed assert await speech.json() == {"foo": "bar"} @@ -228,7 +228,7 @@ async def test_method_convert_with_all_params(self, async_client: AsyncLmnt, res respx_mock.post("/v1/ai/speech/convert").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = await async_client.speech.convert( audio=b"raw file contents", - voice="ava", + voice="leah", format="aac", language="auto", sample_rate=8000, @@ -245,7 +245,7 @@ async def test_raw_response_convert(self, async_client: AsyncLmnt, respx_mock: M speech = await async_client.speech.with_raw_response.convert( audio=b"raw file contents", - voice="ava", + voice="leah", ) assert speech.is_closed is True @@ -259,7 +259,7 @@ async def test_streaming_response_convert(self, async_client: AsyncLmnt, respx_m respx_mock.post("/v1/ai/speech/convert").mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.speech.with_streaming_response.convert( audio=b"raw file contents", - voice="ava", + voice="leah", ) as speech: assert not speech.is_closed assert speech.http_request.headers.get("X-Stainless-Lang") == "python" @@ -276,7 +276,7 @@ async def test_method_generate(self, async_client: AsyncLmnt, respx_mock: MockRo respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = await async_client.speech.generate( text="hello world.", - voice="ava", + voice="leah", ) assert speech.is_closed assert await speech.json() == {"foo": "bar"} @@ -289,7 +289,7 @@ async def test_method_generate_with_all_params(self, async_client: AsyncLmnt, re respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(200, json={"foo": "bar"})) speech = await async_client.speech.generate( text="hello world.", - voice="ava", + voice="leah", format="aac", language="auto", model="blizzard", @@ -310,7 +310,7 @@ async def test_raw_response_generate(self, async_client: AsyncLmnt, respx_mock: speech = await async_client.speech.with_raw_response.generate( text="hello world.", - voice="ava", + voice="leah", ) assert speech.is_closed is True @@ -324,7 +324,7 @@ async def test_streaming_response_generate(self, async_client: AsyncLmnt, respx_ respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(200, json={"foo": "bar"})) async with async_client.speech.with_streaming_response.generate( text="hello world.", - voice="ava", + voice="leah", ) as speech: assert not speech.is_closed assert speech.http_request.headers.get("X-Stainless-Lang") == "python" @@ -339,7 +339,7 @@ async def test_streaming_response_generate(self, async_client: AsyncLmnt, respx_ async def test_method_generate_detailed(self, async_client: AsyncLmnt) -> None: speech = await async_client.speech.generate_detailed( text="hello world.", - voice="ava", + voice="leah", ) assert_matches_type(SpeechGenerateDetailedResponse, speech, path=["response"]) @@ -347,7 +347,7 @@ async def test_method_generate_detailed(self, async_client: AsyncLmnt) -> None: async def test_method_generate_detailed_with_all_params(self, async_client: AsyncLmnt) -> None: speech = await async_client.speech.generate_detailed( text="hello world.", - voice="ava", + voice="leah", format="aac", language="auto", model="blizzard", @@ -363,7 +363,7 @@ async def test_method_generate_detailed_with_all_params(self, async_client: Asyn async def test_raw_response_generate_detailed(self, async_client: AsyncLmnt) -> None: response = await async_client.speech.with_raw_response.generate_detailed( text="hello world.", - voice="ava", + voice="leah", ) assert response.is_closed is True @@ -375,7 +375,7 @@ async def test_raw_response_generate_detailed(self, async_client: AsyncLmnt) -> async def test_streaming_response_generate_detailed(self, async_client: AsyncLmnt) -> None: async with async_client.speech.with_streaming_response.generate_detailed( text="hello world.", - voice="ava", + voice="leah", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/test_client.py b/tests/test_client.py index de66e57..627b946 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -699,7 +699,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - client.speech.with_streaming_response.generate(text="hello world.", voice="ava").__enter__() + client.speech.with_streaming_response.generate(text="hello world.", voice="leah").__enter__() assert _get_open_connections(self.client) == 0 @@ -709,7 +709,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - client.speech.with_streaming_response.generate(text="hello world.", voice="ava").__enter__() + client.speech.with_streaming_response.generate(text="hello world.", voice="leah").__enter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -738,7 +738,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=retry_handler) - response = client.speech.with_raw_response.generate(text="hello world.", voice="ava") + response = client.speech.with_raw_response.generate(text="hello world.", voice="leah") assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success @@ -761,7 +761,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=retry_handler) response = client.speech.with_raw_response.generate( - text="hello world.", voice="ava", extra_headers={"x-stainless-retry-count": Omit()} + text="hello world.", voice="leah", extra_headers={"x-stainless-retry-count": Omit()} ) assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 @@ -786,7 +786,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=retry_handler) response = client.speech.with_raw_response.generate( - text="hello world.", voice="ava", extra_headers={"x-stainless-retry-count": "42"} + text="hello world.", voice="leah", extra_headers={"x-stainless-retry-count": "42"} ) assert response.http_request.headers.get("x-stainless-retry-count") == "42" @@ -1496,7 +1496,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=httpx.TimeoutException("Test timeout error")) with pytest.raises(APITimeoutError): - await async_client.speech.with_streaming_response.generate(text="hello world.", voice="ava").__aenter__() + await async_client.speech.with_streaming_response.generate(text="hello world.", voice="leah").__aenter__() assert _get_open_connections(self.client) == 0 @@ -1506,7 +1506,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, respx_mock.post("/v1/ai/speech/bytes").mock(return_value=httpx.Response(500)) with pytest.raises(APIStatusError): - await async_client.speech.with_streaming_response.generate(text="hello world.", voice="ava").__aenter__() + await async_client.speech.with_streaming_response.generate(text="hello world.", voice="leah").__aenter__() assert _get_open_connections(self.client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @@ -1536,7 +1536,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=retry_handler) - response = await client.speech.with_raw_response.generate(text="hello world.", voice="ava") + response = await client.speech.with_raw_response.generate(text="hello world.", voice="leah") assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success @@ -1562,7 +1562,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=retry_handler) response = await client.speech.with_raw_response.generate( - text="hello world.", voice="ava", extra_headers={"x-stainless-retry-count": Omit()} + text="hello world.", voice="leah", extra_headers={"x-stainless-retry-count": Omit()} ) assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 @@ -1588,7 +1588,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: respx_mock.post("/v1/ai/speech/bytes").mock(side_effect=retry_handler) response = await client.speech.with_raw_response.generate( - text="hello world.", voice="ava", extra_headers={"x-stainless-retry-count": "42"} + text="hello world.", voice="leah", extra_headers={"x-stainless-retry-count": "42"} ) assert response.http_request.headers.get("x-stainless-retry-count") == "42"