spitch 1.4.0__tar.gz → 1.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of spitch might be problematic. Click here for more details.
- spitch-1.5.0/.release-please-manifest.json +3 -0
- {spitch-1.4.0 → spitch-1.5.0}/CHANGELOG.md +8 -0
- {spitch-1.4.0 → spitch-1.5.0}/PKG-INFO +16 -9
- {spitch-1.4.0 → spitch-1.5.0}/README.md +15 -8
- {spitch-1.4.0 → spitch-1.5.0}/pyproject.toml +1 -1
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_version.py +1 -1
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_client.py +28 -28
- spitch-1.4.0/.release-please-manifest.json +0 -3
- {spitch-1.4.0 → spitch-1.5.0}/.gitignore +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/CONTRIBUTING.md +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/LICENSE +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/SECURITY.md +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/api.md +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/bin/check-release-environment +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/bin/publish-pypi +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/examples/.keep +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/examples/example.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/mypy.ini +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/noxfile.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/release-please-config.json +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/requirements-dev.lock +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/requirements.lock +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/__init__.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_base_client.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_client.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_compat.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_constants.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_exceptions.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_files.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_models.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_qs.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_resource.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_response.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_streaming.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_types.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/__init__.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_logs.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_proxy.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_reflection.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_streams.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_sync.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_transform.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_typing.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/_utils/_utils.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/lib/.keep +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/py.typed +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/resources/__init__.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/resources/speech.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/resources/text.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/types/__init__.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/types/speech_generate_params.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/types/speech_transcibe_params.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/src/spitch/types/text_tone_mark_params.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/__init__.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/api_resources/__init__.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/api_resources/test_speech.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/api_resources/test_text.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/conftest.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/sample_file.txt +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_deepcopy.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_extract_files.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_files.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_models.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_qs.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_required_args.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_response.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_streaming.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_transform.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_utils/test_proxy.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/test_utils/test_typing.py +0 -0
- {spitch-1.4.0 → spitch-1.5.0}/tests/utils.py +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.0 (2024-10-07)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.4.0...v1.5.0](https://github.com/spi-tch/spitch-python/compare/v1.4.0...v1.5.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** update via SDK Studio ([#26](https://github.com/spi-tch/spitch-python/issues/26)) ([1fb1268](https://github.com/spi-tch/spitch-python/commit/1fb12681c9bbdadd7dd4cb41f06ee03d38be235f))
|
|
10
|
+
|
|
3
11
|
## 1.4.0 (2024-10-07)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.3.0...v1.4.0](https://github.com/spi-tch/spitch-python/compare/v1.3.0...v1.4.0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: spitch
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.0
|
|
4
4
|
Summary: The official Python library for the spitch API
|
|
5
5
|
Project-URL: Homepage, https://github.com/spi-tch/spitch-python
|
|
6
6
|
Project-URL: Repository, https://github.com/spi-tch/spitch-python
|
|
@@ -66,8 +66,9 @@ client = Spitch(
|
|
|
66
66
|
api_key=os.environ.get("SPITCH_API_KEY"),
|
|
67
67
|
)
|
|
68
68
|
|
|
69
|
-
response = client.speech.
|
|
69
|
+
response = client.speech.generate(
|
|
70
70
|
language="yo",
|
|
71
|
+
text="text",
|
|
71
72
|
)
|
|
72
73
|
```
|
|
73
74
|
|
|
@@ -92,8 +93,9 @@ client = AsyncSpitch(
|
|
|
92
93
|
|
|
93
94
|
|
|
94
95
|
async def main() -> None:
|
|
95
|
-
response = await client.speech.
|
|
96
|
+
response = await client.speech.generate(
|
|
96
97
|
language="yo",
|
|
98
|
+
text="text",
|
|
97
99
|
)
|
|
98
100
|
|
|
99
101
|
|
|
@@ -127,8 +129,9 @@ from spitch import Spitch
|
|
|
127
129
|
client = Spitch()
|
|
128
130
|
|
|
129
131
|
try:
|
|
130
|
-
client.speech.
|
|
132
|
+
client.speech.generate(
|
|
131
133
|
language="yo",
|
|
134
|
+
text="text",
|
|
132
135
|
)
|
|
133
136
|
except spitch.APIConnectionError as e:
|
|
134
137
|
print("The server could not be reached")
|
|
@@ -172,8 +175,9 @@ client = Spitch(
|
|
|
172
175
|
)
|
|
173
176
|
|
|
174
177
|
# Or, configure per-request:
|
|
175
|
-
client.with_options(max_retries=5).speech.
|
|
178
|
+
client.with_options(max_retries=5).speech.generate(
|
|
176
179
|
language="yo",
|
|
180
|
+
text="text",
|
|
177
181
|
)
|
|
178
182
|
```
|
|
179
183
|
|
|
@@ -197,8 +201,9 @@ client = Spitch(
|
|
|
197
201
|
)
|
|
198
202
|
|
|
199
203
|
# Override per-request:
|
|
200
|
-
client.with_options(timeout=5.0).speech.
|
|
204
|
+
client.with_options(timeout=5.0).speech.generate(
|
|
201
205
|
language="yo",
|
|
206
|
+
text="text",
|
|
202
207
|
)
|
|
203
208
|
```
|
|
204
209
|
|
|
@@ -238,12 +243,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
238
243
|
from spitch import Spitch
|
|
239
244
|
|
|
240
245
|
client = Spitch()
|
|
241
|
-
response = client.speech.with_raw_response.
|
|
246
|
+
response = client.speech.with_raw_response.generate(
|
|
242
247
|
language="yo",
|
|
248
|
+
text="text",
|
|
243
249
|
)
|
|
244
250
|
print(response.headers.get('X-My-Header'))
|
|
245
251
|
|
|
246
|
-
speech = response.parse() # get the object that `speech.
|
|
252
|
+
speech = response.parse() # get the object that `speech.generate()` would have returned
|
|
247
253
|
print(speech)
|
|
248
254
|
```
|
|
249
255
|
|
|
@@ -258,8 +264,9 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
258
264
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
259
265
|
|
|
260
266
|
```python
|
|
261
|
-
with client.speech.with_streaming_response.
|
|
267
|
+
with client.speech.with_streaming_response.generate(
|
|
262
268
|
language="yo",
|
|
269
|
+
text="text",
|
|
263
270
|
) as response:
|
|
264
271
|
print(response.headers.get("X-My-Header"))
|
|
265
272
|
|
|
@@ -32,8 +32,9 @@ client = Spitch(
|
|
|
32
32
|
api_key=os.environ.get("SPITCH_API_KEY"),
|
|
33
33
|
)
|
|
34
34
|
|
|
35
|
-
response = client.speech.
|
|
35
|
+
response = client.speech.generate(
|
|
36
36
|
language="yo",
|
|
37
|
+
text="text",
|
|
37
38
|
)
|
|
38
39
|
```
|
|
39
40
|
|
|
@@ -58,8 +59,9 @@ client = AsyncSpitch(
|
|
|
58
59
|
|
|
59
60
|
|
|
60
61
|
async def main() -> None:
|
|
61
|
-
response = await client.speech.
|
|
62
|
+
response = await client.speech.generate(
|
|
62
63
|
language="yo",
|
|
64
|
+
text="text",
|
|
63
65
|
)
|
|
64
66
|
|
|
65
67
|
|
|
@@ -93,8 +95,9 @@ from spitch import Spitch
|
|
|
93
95
|
client = Spitch()
|
|
94
96
|
|
|
95
97
|
try:
|
|
96
|
-
client.speech.
|
|
98
|
+
client.speech.generate(
|
|
97
99
|
language="yo",
|
|
100
|
+
text="text",
|
|
98
101
|
)
|
|
99
102
|
except spitch.APIConnectionError as e:
|
|
100
103
|
print("The server could not be reached")
|
|
@@ -138,8 +141,9 @@ client = Spitch(
|
|
|
138
141
|
)
|
|
139
142
|
|
|
140
143
|
# Or, configure per-request:
|
|
141
|
-
client.with_options(max_retries=5).speech.
|
|
144
|
+
client.with_options(max_retries=5).speech.generate(
|
|
142
145
|
language="yo",
|
|
146
|
+
text="text",
|
|
143
147
|
)
|
|
144
148
|
```
|
|
145
149
|
|
|
@@ -163,8 +167,9 @@ client = Spitch(
|
|
|
163
167
|
)
|
|
164
168
|
|
|
165
169
|
# Override per-request:
|
|
166
|
-
client.with_options(timeout=5.0).speech.
|
|
170
|
+
client.with_options(timeout=5.0).speech.generate(
|
|
167
171
|
language="yo",
|
|
172
|
+
text="text",
|
|
168
173
|
)
|
|
169
174
|
```
|
|
170
175
|
|
|
@@ -204,12 +209,13 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
|
|
|
204
209
|
from spitch import Spitch
|
|
205
210
|
|
|
206
211
|
client = Spitch()
|
|
207
|
-
response = client.speech.with_raw_response.
|
|
212
|
+
response = client.speech.with_raw_response.generate(
|
|
208
213
|
language="yo",
|
|
214
|
+
text="text",
|
|
209
215
|
)
|
|
210
216
|
print(response.headers.get('X-My-Header'))
|
|
211
217
|
|
|
212
|
-
speech = response.parse() # get the object that `speech.
|
|
218
|
+
speech = response.parse() # get the object that `speech.generate()` would have returned
|
|
213
219
|
print(speech)
|
|
214
220
|
```
|
|
215
221
|
|
|
@@ -224,8 +230,9 @@ The above interface eagerly reads the full response body when you make the reque
|
|
|
224
230
|
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
|
|
225
231
|
|
|
226
232
|
```python
|
|
227
|
-
with client.speech.with_streaming_response.
|
|
233
|
+
with client.speech.with_streaming_response.generate(
|
|
228
234
|
language="yo",
|
|
235
|
+
text="text",
|
|
229
236
|
) as response:
|
|
230
237
|
print(response.headers.get("X-My-Header"))
|
|
231
238
|
|
|
@@ -699,12 +699,12 @@ class TestSpitch:
|
|
|
699
699
|
@mock.patch("spitch._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
700
700
|
@pytest.mark.respx(base_url=base_url)
|
|
701
701
|
def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
|
|
702
|
-
respx_mock.post("/v1/
|
|
702
|
+
respx_mock.post("/v1/speech").mock(side_effect=httpx.TimeoutException("Test timeout error"))
|
|
703
703
|
|
|
704
704
|
with pytest.raises(APITimeoutError):
|
|
705
705
|
self.client.post(
|
|
706
|
-
"/v1/
|
|
707
|
-
body=cast(object, dict(language="yo")),
|
|
706
|
+
"/v1/speech",
|
|
707
|
+
body=cast(object, dict(language="yo", text="text")),
|
|
708
708
|
cast_to=httpx.Response,
|
|
709
709
|
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
|
|
710
710
|
)
|
|
@@ -714,12 +714,12 @@ class TestSpitch:
|
|
|
714
714
|
@mock.patch("spitch._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
715
715
|
@pytest.mark.respx(base_url=base_url)
|
|
716
716
|
def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
|
|
717
|
-
respx_mock.post("/v1/
|
|
717
|
+
respx_mock.post("/v1/speech").mock(return_value=httpx.Response(500))
|
|
718
718
|
|
|
719
719
|
with pytest.raises(APIStatusError):
|
|
720
720
|
self.client.post(
|
|
721
|
-
"/v1/
|
|
722
|
-
body=cast(object, dict(language="yo")),
|
|
721
|
+
"/v1/speech",
|
|
722
|
+
body=cast(object, dict(language="yo", text="text")),
|
|
723
723
|
cast_to=httpx.Response,
|
|
724
724
|
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
|
|
725
725
|
)
|
|
@@ -741,9 +741,9 @@ class TestSpitch:
|
|
|
741
741
|
return httpx.Response(500)
|
|
742
742
|
return httpx.Response(200)
|
|
743
743
|
|
|
744
|
-
respx_mock.post("/v1/
|
|
744
|
+
respx_mock.post("/v1/speech").mock(side_effect=retry_handler)
|
|
745
745
|
|
|
746
|
-
response = client.speech.with_raw_response.
|
|
746
|
+
response = client.speech.with_raw_response.generate(language="yo", text="text")
|
|
747
747
|
|
|
748
748
|
assert response.retries_taken == failures_before_success
|
|
749
749
|
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
|
|
@@ -765,10 +765,10 @@ class TestSpitch:
|
|
|
765
765
|
return httpx.Response(500)
|
|
766
766
|
return httpx.Response(200)
|
|
767
767
|
|
|
768
|
-
respx_mock.post("/v1/
|
|
768
|
+
respx_mock.post("/v1/speech").mock(side_effect=retry_handler)
|
|
769
769
|
|
|
770
|
-
response = client.speech.with_raw_response.
|
|
771
|
-
language="yo", extra_headers={"x-stainless-retry-count": Omit()}
|
|
770
|
+
response = client.speech.with_raw_response.generate(
|
|
771
|
+
language="yo", text="text", extra_headers={"x-stainless-retry-count": Omit()}
|
|
772
772
|
)
|
|
773
773
|
|
|
774
774
|
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
|
|
@@ -790,10 +790,10 @@ class TestSpitch:
|
|
|
790
790
|
return httpx.Response(500)
|
|
791
791
|
return httpx.Response(200)
|
|
792
792
|
|
|
793
|
-
respx_mock.post("/v1/
|
|
793
|
+
respx_mock.post("/v1/speech").mock(side_effect=retry_handler)
|
|
794
794
|
|
|
795
|
-
response = client.speech.with_raw_response.
|
|
796
|
-
language="yo", extra_headers={"x-stainless-retry-count": "42"}
|
|
795
|
+
response = client.speech.with_raw_response.generate(
|
|
796
|
+
language="yo", text="text", extra_headers={"x-stainless-retry-count": "42"}
|
|
797
797
|
)
|
|
798
798
|
|
|
799
799
|
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
|
|
@@ -1469,12 +1469,12 @@ class TestAsyncSpitch:
|
|
|
1469
1469
|
@mock.patch("spitch._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
1470
1470
|
@pytest.mark.respx(base_url=base_url)
|
|
1471
1471
|
async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
|
|
1472
|
-
respx_mock.post("/v1/
|
|
1472
|
+
respx_mock.post("/v1/speech").mock(side_effect=httpx.TimeoutException("Test timeout error"))
|
|
1473
1473
|
|
|
1474
1474
|
with pytest.raises(APITimeoutError):
|
|
1475
1475
|
await self.client.post(
|
|
1476
|
-
"/v1/
|
|
1477
|
-
body=cast(object, dict(language="yo")),
|
|
1476
|
+
"/v1/speech",
|
|
1477
|
+
body=cast(object, dict(language="yo", text="text")),
|
|
1478
1478
|
cast_to=httpx.Response,
|
|
1479
1479
|
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
|
|
1480
1480
|
)
|
|
@@ -1484,12 +1484,12 @@ class TestAsyncSpitch:
|
|
|
1484
1484
|
@mock.patch("spitch._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout)
|
|
1485
1485
|
@pytest.mark.respx(base_url=base_url)
|
|
1486
1486
|
async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None:
|
|
1487
|
-
respx_mock.post("/v1/
|
|
1487
|
+
respx_mock.post("/v1/speech").mock(return_value=httpx.Response(500))
|
|
1488
1488
|
|
|
1489
1489
|
with pytest.raises(APIStatusError):
|
|
1490
1490
|
await self.client.post(
|
|
1491
|
-
"/v1/
|
|
1492
|
-
body=cast(object, dict(language="yo")),
|
|
1491
|
+
"/v1/speech",
|
|
1492
|
+
body=cast(object, dict(language="yo", text="text")),
|
|
1493
1493
|
cast_to=httpx.Response,
|
|
1494
1494
|
options={"headers": {RAW_RESPONSE_HEADER: "stream"}},
|
|
1495
1495
|
)
|
|
@@ -1514,9 +1514,9 @@ class TestAsyncSpitch:
|
|
|
1514
1514
|
return httpx.Response(500)
|
|
1515
1515
|
return httpx.Response(200)
|
|
1516
1516
|
|
|
1517
|
-
respx_mock.post("/v1/
|
|
1517
|
+
respx_mock.post("/v1/speech").mock(side_effect=retry_handler)
|
|
1518
1518
|
|
|
1519
|
-
response = await client.speech.with_raw_response.
|
|
1519
|
+
response = await client.speech.with_raw_response.generate(language="yo", text="text")
|
|
1520
1520
|
|
|
1521
1521
|
assert response.retries_taken == failures_before_success
|
|
1522
1522
|
assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success
|
|
@@ -1539,10 +1539,10 @@ class TestAsyncSpitch:
|
|
|
1539
1539
|
return httpx.Response(500)
|
|
1540
1540
|
return httpx.Response(200)
|
|
1541
1541
|
|
|
1542
|
-
respx_mock.post("/v1/
|
|
1542
|
+
respx_mock.post("/v1/speech").mock(side_effect=retry_handler)
|
|
1543
1543
|
|
|
1544
|
-
response = await client.speech.with_raw_response.
|
|
1545
|
-
language="yo", extra_headers={"x-stainless-retry-count": Omit()}
|
|
1544
|
+
response = await client.speech.with_raw_response.generate(
|
|
1545
|
+
language="yo", text="text", extra_headers={"x-stainless-retry-count": Omit()}
|
|
1546
1546
|
)
|
|
1547
1547
|
|
|
1548
1548
|
assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0
|
|
@@ -1565,10 +1565,10 @@ class TestAsyncSpitch:
|
|
|
1565
1565
|
return httpx.Response(500)
|
|
1566
1566
|
return httpx.Response(200)
|
|
1567
1567
|
|
|
1568
|
-
respx_mock.post("/v1/
|
|
1568
|
+
respx_mock.post("/v1/speech").mock(side_effect=retry_handler)
|
|
1569
1569
|
|
|
1570
|
-
response = await client.speech.with_raw_response.
|
|
1571
|
-
language="yo", extra_headers={"x-stainless-retry-count": "42"}
|
|
1570
|
+
response = await client.speech.with_raw_response.generate(
|
|
1571
|
+
language="yo", text="text", extra_headers={"x-stainless-retry-count": "42"}
|
|
1572
1572
|
)
|
|
1573
1573
|
|
|
1574
1574
|
assert response.http_request.headers.get("x-stainless-retry-count") == "42"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|