sarvamai 0.1.22a4__py3-none-any.whl → 0.1.23a2__py3-none-any.whl

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.
Files changed (56) hide show
  1. sarvamai/__init__.py +405 -200
  2. sarvamai/chat/raw_client.py +20 -20
  3. sarvamai/client.py +186 -34
  4. sarvamai/core/__init__.py +76 -21
  5. sarvamai/core/client_wrapper.py +19 -3
  6. sarvamai/core/force_multipart.py +4 -2
  7. sarvamai/core/http_client.py +217 -97
  8. sarvamai/core/http_response.py +1 -1
  9. sarvamai/core/http_sse/__init__.py +42 -0
  10. sarvamai/core/http_sse/_api.py +112 -0
  11. sarvamai/core/http_sse/_decoders.py +61 -0
  12. sarvamai/core/http_sse/_exceptions.py +7 -0
  13. sarvamai/core/http_sse/_models.py +17 -0
  14. sarvamai/core/jsonable_encoder.py +8 -0
  15. sarvamai/core/pydantic_utilities.py +110 -4
  16. sarvamai/errors/__init__.py +40 -6
  17. sarvamai/errors/bad_request_error.py +1 -1
  18. sarvamai/errors/forbidden_error.py +1 -1
  19. sarvamai/errors/internal_server_error.py +1 -1
  20. sarvamai/errors/service_unavailable_error.py +1 -1
  21. sarvamai/errors/too_many_requests_error.py +1 -1
  22. sarvamai/errors/unprocessable_entity_error.py +1 -1
  23. sarvamai/requests/__init__.py +150 -62
  24. sarvamai/requests/audio_data.py +0 -6
  25. sarvamai/requests/error_response_data.py +1 -1
  26. sarvamai/requests/file_signed_url_details.py +1 -1
  27. sarvamai/requests/speech_to_text_transcription_data.py +2 -2
  28. sarvamai/speech_to_text/raw_client.py +54 -52
  29. sarvamai/speech_to_text_job/raw_client.py +120 -120
  30. sarvamai/speech_to_text_streaming/__init__.py +38 -8
  31. sarvamai/speech_to_text_streaming/client.py +0 -13
  32. sarvamai/speech_to_text_streaming/raw_client.py +0 -13
  33. sarvamai/speech_to_text_streaming/types/__init__.py +36 -6
  34. sarvamai/speech_to_text_translate_job/raw_client.py +120 -120
  35. sarvamai/speech_to_text_translate_streaming/__init__.py +36 -7
  36. sarvamai/speech_to_text_translate_streaming/client.py +0 -13
  37. sarvamai/speech_to_text_translate_streaming/raw_client.py +0 -13
  38. sarvamai/speech_to_text_translate_streaming/types/__init__.py +36 -5
  39. sarvamai/text/client.py +0 -12
  40. sarvamai/text/raw_client.py +60 -72
  41. sarvamai/text_to_speech/client.py +18 -0
  42. sarvamai/text_to_speech/raw_client.py +38 -20
  43. sarvamai/text_to_speech_streaming/__init__.py +28 -1
  44. sarvamai/text_to_speech_streaming/types/__init__.py +30 -1
  45. sarvamai/types/__init__.py +222 -100
  46. sarvamai/types/audio_data.py +0 -6
  47. sarvamai/types/chat_completion_request_message.py +6 -2
  48. sarvamai/types/error_response_data.py +1 -1
  49. sarvamai/types/file_signed_url_details.py +1 -1
  50. sarvamai/types/speech_to_text_transcription_data.py +2 -2
  51. {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/METADATA +2 -1
  52. {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/RECORD +53 -51
  53. sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +0 -33
  54. sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +0 -33
  55. sarvamai/types/audio_data_input_audio_codec.py +0 -33
  56. {sarvamai-0.1.22a4.dist-info → sarvamai-0.1.23a2.dist-info}/WHEEL +0 -0
@@ -95,9 +95,9 @@ class RawSpeechToTextTranslateJobClient:
95
95
  raise BadRequestError(
96
96
  headers=dict(_response.headers),
97
97
  body=typing.cast(
98
- typing.Optional[typing.Any],
98
+ typing.Any,
99
99
  parse_obj_as(
100
- type_=typing.Optional[typing.Any], # type: ignore
100
+ type_=typing.Any, # type: ignore
101
101
  object_=_response.json(),
102
102
  ),
103
103
  ),
@@ -106,9 +106,9 @@ class RawSpeechToTextTranslateJobClient:
106
106
  raise ForbiddenError(
107
107
  headers=dict(_response.headers),
108
108
  body=typing.cast(
109
- typing.Optional[typing.Any],
109
+ typing.Any,
110
110
  parse_obj_as(
111
- type_=typing.Optional[typing.Any], # type: ignore
111
+ type_=typing.Any, # type: ignore
112
112
  object_=_response.json(),
113
113
  ),
114
114
  ),
@@ -117,9 +117,9 @@ class RawSpeechToTextTranslateJobClient:
117
117
  raise UnprocessableEntityError(
118
118
  headers=dict(_response.headers),
119
119
  body=typing.cast(
120
- typing.Optional[typing.Any],
120
+ typing.Any,
121
121
  parse_obj_as(
122
- type_=typing.Optional[typing.Any], # type: ignore
122
+ type_=typing.Any, # type: ignore
123
123
  object_=_response.json(),
124
124
  ),
125
125
  ),
@@ -128,9 +128,9 @@ class RawSpeechToTextTranslateJobClient:
128
128
  raise TooManyRequestsError(
129
129
  headers=dict(_response.headers),
130
130
  body=typing.cast(
131
- typing.Optional[typing.Any],
131
+ typing.Any,
132
132
  parse_obj_as(
133
- type_=typing.Optional[typing.Any], # type: ignore
133
+ type_=typing.Any, # type: ignore
134
134
  object_=_response.json(),
135
135
  ),
136
136
  ),
@@ -139,9 +139,9 @@ class RawSpeechToTextTranslateJobClient:
139
139
  raise InternalServerError(
140
140
  headers=dict(_response.headers),
141
141
  body=typing.cast(
142
- typing.Optional[typing.Any],
142
+ typing.Any,
143
143
  parse_obj_as(
144
- type_=typing.Optional[typing.Any], # type: ignore
144
+ type_=typing.Any, # type: ignore
145
145
  object_=_response.json(),
146
146
  ),
147
147
  ),
@@ -150,9 +150,9 @@ class RawSpeechToTextTranslateJobClient:
150
150
  raise ServiceUnavailableError(
151
151
  headers=dict(_response.headers),
152
152
  body=typing.cast(
153
- typing.Optional[typing.Any],
153
+ typing.Any,
154
154
  parse_obj_as(
155
- type_=typing.Optional[typing.Any], # type: ignore
155
+ type_=typing.Any, # type: ignore
156
156
  object_=_response.json(),
157
157
  ),
158
158
  ),
@@ -203,9 +203,9 @@ class RawSpeechToTextTranslateJobClient:
203
203
  raise BadRequestError(
204
204
  headers=dict(_response.headers),
205
205
  body=typing.cast(
206
- typing.Optional[typing.Any],
206
+ typing.Any,
207
207
  parse_obj_as(
208
- type_=typing.Optional[typing.Any], # type: ignore
208
+ type_=typing.Any, # type: ignore
209
209
  object_=_response.json(),
210
210
  ),
211
211
  ),
@@ -214,9 +214,9 @@ class RawSpeechToTextTranslateJobClient:
214
214
  raise ForbiddenError(
215
215
  headers=dict(_response.headers),
216
216
  body=typing.cast(
217
- typing.Optional[typing.Any],
217
+ typing.Any,
218
218
  parse_obj_as(
219
- type_=typing.Optional[typing.Any], # type: ignore
219
+ type_=typing.Any, # type: ignore
220
220
  object_=_response.json(),
221
221
  ),
222
222
  ),
@@ -225,9 +225,9 @@ class RawSpeechToTextTranslateJobClient:
225
225
  raise UnprocessableEntityError(
226
226
  headers=dict(_response.headers),
227
227
  body=typing.cast(
228
- typing.Optional[typing.Any],
228
+ typing.Any,
229
229
  parse_obj_as(
230
- type_=typing.Optional[typing.Any], # type: ignore
230
+ type_=typing.Any, # type: ignore
231
231
  object_=_response.json(),
232
232
  ),
233
233
  ),
@@ -236,9 +236,9 @@ class RawSpeechToTextTranslateJobClient:
236
236
  raise TooManyRequestsError(
237
237
  headers=dict(_response.headers),
238
238
  body=typing.cast(
239
- typing.Optional[typing.Any],
239
+ typing.Any,
240
240
  parse_obj_as(
241
- type_=typing.Optional[typing.Any], # type: ignore
241
+ type_=typing.Any, # type: ignore
242
242
  object_=_response.json(),
243
243
  ),
244
244
  ),
@@ -247,9 +247,9 @@ class RawSpeechToTextTranslateJobClient:
247
247
  raise InternalServerError(
248
248
  headers=dict(_response.headers),
249
249
  body=typing.cast(
250
- typing.Optional[typing.Any],
250
+ typing.Any,
251
251
  parse_obj_as(
252
- type_=typing.Optional[typing.Any], # type: ignore
252
+ type_=typing.Any, # type: ignore
253
253
  object_=_response.json(),
254
254
  ),
255
255
  ),
@@ -258,9 +258,9 @@ class RawSpeechToTextTranslateJobClient:
258
258
  raise ServiceUnavailableError(
259
259
  headers=dict(_response.headers),
260
260
  body=typing.cast(
261
- typing.Optional[typing.Any],
261
+ typing.Any,
262
262
  parse_obj_as(
263
- type_=typing.Optional[typing.Any], # type: ignore
263
+ type_=typing.Any, # type: ignore
264
264
  object_=_response.json(),
265
265
  ),
266
266
  ),
@@ -318,9 +318,9 @@ class RawSpeechToTextTranslateJobClient:
318
318
  raise BadRequestError(
319
319
  headers=dict(_response.headers),
320
320
  body=typing.cast(
321
- typing.Optional[typing.Any],
321
+ typing.Any,
322
322
  parse_obj_as(
323
- type_=typing.Optional[typing.Any], # type: ignore
323
+ type_=typing.Any, # type: ignore
324
324
  object_=_response.json(),
325
325
  ),
326
326
  ),
@@ -329,9 +329,9 @@ class RawSpeechToTextTranslateJobClient:
329
329
  raise ForbiddenError(
330
330
  headers=dict(_response.headers),
331
331
  body=typing.cast(
332
- typing.Optional[typing.Any],
332
+ typing.Any,
333
333
  parse_obj_as(
334
- type_=typing.Optional[typing.Any], # type: ignore
334
+ type_=typing.Any, # type: ignore
335
335
  object_=_response.json(),
336
336
  ),
337
337
  ),
@@ -340,9 +340,9 @@ class RawSpeechToTextTranslateJobClient:
340
340
  raise UnprocessableEntityError(
341
341
  headers=dict(_response.headers),
342
342
  body=typing.cast(
343
- typing.Optional[typing.Any],
343
+ typing.Any,
344
344
  parse_obj_as(
345
- type_=typing.Optional[typing.Any], # type: ignore
345
+ type_=typing.Any, # type: ignore
346
346
  object_=_response.json(),
347
347
  ),
348
348
  ),
@@ -351,9 +351,9 @@ class RawSpeechToTextTranslateJobClient:
351
351
  raise TooManyRequestsError(
352
352
  headers=dict(_response.headers),
353
353
  body=typing.cast(
354
- typing.Optional[typing.Any],
354
+ typing.Any,
355
355
  parse_obj_as(
356
- type_=typing.Optional[typing.Any], # type: ignore
356
+ type_=typing.Any, # type: ignore
357
357
  object_=_response.json(),
358
358
  ),
359
359
  ),
@@ -362,9 +362,9 @@ class RawSpeechToTextTranslateJobClient:
362
362
  raise InternalServerError(
363
363
  headers=dict(_response.headers),
364
364
  body=typing.cast(
365
- typing.Optional[typing.Any],
365
+ typing.Any,
366
366
  parse_obj_as(
367
- type_=typing.Optional[typing.Any], # type: ignore
367
+ type_=typing.Any, # type: ignore
368
368
  object_=_response.json(),
369
369
  ),
370
370
  ),
@@ -373,9 +373,9 @@ class RawSpeechToTextTranslateJobClient:
373
373
  raise ServiceUnavailableError(
374
374
  headers=dict(_response.headers),
375
375
  body=typing.cast(
376
- typing.Optional[typing.Any],
376
+ typing.Any,
377
377
  parse_obj_as(
378
- type_=typing.Optional[typing.Any], # type: ignore
378
+ type_=typing.Any, # type: ignore
379
379
  object_=_response.json(),
380
380
  ),
381
381
  ),
@@ -443,9 +443,9 @@ class RawSpeechToTextTranslateJobClient:
443
443
  raise BadRequestError(
444
444
  headers=dict(_response.headers),
445
445
  body=typing.cast(
446
- typing.Optional[typing.Any],
446
+ typing.Any,
447
447
  parse_obj_as(
448
- type_=typing.Optional[typing.Any], # type: ignore
448
+ type_=typing.Any, # type: ignore
449
449
  object_=_response.json(),
450
450
  ),
451
451
  ),
@@ -454,9 +454,9 @@ class RawSpeechToTextTranslateJobClient:
454
454
  raise ForbiddenError(
455
455
  headers=dict(_response.headers),
456
456
  body=typing.cast(
457
- typing.Optional[typing.Any],
457
+ typing.Any,
458
458
  parse_obj_as(
459
- type_=typing.Optional[typing.Any], # type: ignore
459
+ type_=typing.Any, # type: ignore
460
460
  object_=_response.json(),
461
461
  ),
462
462
  ),
@@ -465,9 +465,9 @@ class RawSpeechToTextTranslateJobClient:
465
465
  raise UnprocessableEntityError(
466
466
  headers=dict(_response.headers),
467
467
  body=typing.cast(
468
- typing.Optional[typing.Any],
468
+ typing.Any,
469
469
  parse_obj_as(
470
- type_=typing.Optional[typing.Any], # type: ignore
470
+ type_=typing.Any, # type: ignore
471
471
  object_=_response.json(),
472
472
  ),
473
473
  ),
@@ -476,9 +476,9 @@ class RawSpeechToTextTranslateJobClient:
476
476
  raise TooManyRequestsError(
477
477
  headers=dict(_response.headers),
478
478
  body=typing.cast(
479
- typing.Optional[typing.Any],
479
+ typing.Any,
480
480
  parse_obj_as(
481
- type_=typing.Optional[typing.Any], # type: ignore
481
+ type_=typing.Any, # type: ignore
482
482
  object_=_response.json(),
483
483
  ),
484
484
  ),
@@ -487,9 +487,9 @@ class RawSpeechToTextTranslateJobClient:
487
487
  raise InternalServerError(
488
488
  headers=dict(_response.headers),
489
489
  body=typing.cast(
490
- typing.Optional[typing.Any],
490
+ typing.Any,
491
491
  parse_obj_as(
492
- type_=typing.Optional[typing.Any], # type: ignore
492
+ type_=typing.Any, # type: ignore
493
493
  object_=_response.json(),
494
494
  ),
495
495
  ),
@@ -498,9 +498,9 @@ class RawSpeechToTextTranslateJobClient:
498
498
  raise ServiceUnavailableError(
499
499
  headers=dict(_response.headers),
500
500
  body=typing.cast(
501
- typing.Optional[typing.Any],
501
+ typing.Any,
502
502
  parse_obj_as(
503
- type_=typing.Optional[typing.Any], # type: ignore
503
+ type_=typing.Any, # type: ignore
504
504
  object_=_response.json(),
505
505
  ),
506
506
  ),
@@ -568,9 +568,9 @@ class RawSpeechToTextTranslateJobClient:
568
568
  raise BadRequestError(
569
569
  headers=dict(_response.headers),
570
570
  body=typing.cast(
571
- typing.Optional[typing.Any],
571
+ typing.Any,
572
572
  parse_obj_as(
573
- type_=typing.Optional[typing.Any], # type: ignore
573
+ type_=typing.Any, # type: ignore
574
574
  object_=_response.json(),
575
575
  ),
576
576
  ),
@@ -579,9 +579,9 @@ class RawSpeechToTextTranslateJobClient:
579
579
  raise ForbiddenError(
580
580
  headers=dict(_response.headers),
581
581
  body=typing.cast(
582
- typing.Optional[typing.Any],
582
+ typing.Any,
583
583
  parse_obj_as(
584
- type_=typing.Optional[typing.Any], # type: ignore
584
+ type_=typing.Any, # type: ignore
585
585
  object_=_response.json(),
586
586
  ),
587
587
  ),
@@ -590,9 +590,9 @@ class RawSpeechToTextTranslateJobClient:
590
590
  raise UnprocessableEntityError(
591
591
  headers=dict(_response.headers),
592
592
  body=typing.cast(
593
- typing.Optional[typing.Any],
593
+ typing.Any,
594
594
  parse_obj_as(
595
- type_=typing.Optional[typing.Any], # type: ignore
595
+ type_=typing.Any, # type: ignore
596
596
  object_=_response.json(),
597
597
  ),
598
598
  ),
@@ -601,9 +601,9 @@ class RawSpeechToTextTranslateJobClient:
601
601
  raise TooManyRequestsError(
602
602
  headers=dict(_response.headers),
603
603
  body=typing.cast(
604
- typing.Optional[typing.Any],
604
+ typing.Any,
605
605
  parse_obj_as(
606
- type_=typing.Optional[typing.Any], # type: ignore
606
+ type_=typing.Any, # type: ignore
607
607
  object_=_response.json(),
608
608
  ),
609
609
  ),
@@ -612,9 +612,9 @@ class RawSpeechToTextTranslateJobClient:
612
612
  raise InternalServerError(
613
613
  headers=dict(_response.headers),
614
614
  body=typing.cast(
615
- typing.Optional[typing.Any],
615
+ typing.Any,
616
616
  parse_obj_as(
617
- type_=typing.Optional[typing.Any], # type: ignore
617
+ type_=typing.Any, # type: ignore
618
618
  object_=_response.json(),
619
619
  ),
620
620
  ),
@@ -623,9 +623,9 @@ class RawSpeechToTextTranslateJobClient:
623
623
  raise ServiceUnavailableError(
624
624
  headers=dict(_response.headers),
625
625
  body=typing.cast(
626
- typing.Optional[typing.Any],
626
+ typing.Any,
627
627
  parse_obj_as(
628
- type_=typing.Optional[typing.Any], # type: ignore
628
+ type_=typing.Any, # type: ignore
629
629
  object_=_response.json(),
630
630
  ),
631
631
  ),
@@ -704,9 +704,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
704
704
  raise BadRequestError(
705
705
  headers=dict(_response.headers),
706
706
  body=typing.cast(
707
- typing.Optional[typing.Any],
707
+ typing.Any,
708
708
  parse_obj_as(
709
- type_=typing.Optional[typing.Any], # type: ignore
709
+ type_=typing.Any, # type: ignore
710
710
  object_=_response.json(),
711
711
  ),
712
712
  ),
@@ -715,9 +715,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
715
715
  raise ForbiddenError(
716
716
  headers=dict(_response.headers),
717
717
  body=typing.cast(
718
- typing.Optional[typing.Any],
718
+ typing.Any,
719
719
  parse_obj_as(
720
- type_=typing.Optional[typing.Any], # type: ignore
720
+ type_=typing.Any, # type: ignore
721
721
  object_=_response.json(),
722
722
  ),
723
723
  ),
@@ -726,9 +726,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
726
726
  raise UnprocessableEntityError(
727
727
  headers=dict(_response.headers),
728
728
  body=typing.cast(
729
- typing.Optional[typing.Any],
729
+ typing.Any,
730
730
  parse_obj_as(
731
- type_=typing.Optional[typing.Any], # type: ignore
731
+ type_=typing.Any, # type: ignore
732
732
  object_=_response.json(),
733
733
  ),
734
734
  ),
@@ -737,9 +737,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
737
737
  raise TooManyRequestsError(
738
738
  headers=dict(_response.headers),
739
739
  body=typing.cast(
740
- typing.Optional[typing.Any],
740
+ typing.Any,
741
741
  parse_obj_as(
742
- type_=typing.Optional[typing.Any], # type: ignore
742
+ type_=typing.Any, # type: ignore
743
743
  object_=_response.json(),
744
744
  ),
745
745
  ),
@@ -748,9 +748,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
748
748
  raise InternalServerError(
749
749
  headers=dict(_response.headers),
750
750
  body=typing.cast(
751
- typing.Optional[typing.Any],
751
+ typing.Any,
752
752
  parse_obj_as(
753
- type_=typing.Optional[typing.Any], # type: ignore
753
+ type_=typing.Any, # type: ignore
754
754
  object_=_response.json(),
755
755
  ),
756
756
  ),
@@ -759,9 +759,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
759
759
  raise ServiceUnavailableError(
760
760
  headers=dict(_response.headers),
761
761
  body=typing.cast(
762
- typing.Optional[typing.Any],
762
+ typing.Any,
763
763
  parse_obj_as(
764
- type_=typing.Optional[typing.Any], # type: ignore
764
+ type_=typing.Any, # type: ignore
765
765
  object_=_response.json(),
766
766
  ),
767
767
  ),
@@ -812,9 +812,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
812
812
  raise BadRequestError(
813
813
  headers=dict(_response.headers),
814
814
  body=typing.cast(
815
- typing.Optional[typing.Any],
815
+ typing.Any,
816
816
  parse_obj_as(
817
- type_=typing.Optional[typing.Any], # type: ignore
817
+ type_=typing.Any, # type: ignore
818
818
  object_=_response.json(),
819
819
  ),
820
820
  ),
@@ -823,9 +823,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
823
823
  raise ForbiddenError(
824
824
  headers=dict(_response.headers),
825
825
  body=typing.cast(
826
- typing.Optional[typing.Any],
826
+ typing.Any,
827
827
  parse_obj_as(
828
- type_=typing.Optional[typing.Any], # type: ignore
828
+ type_=typing.Any, # type: ignore
829
829
  object_=_response.json(),
830
830
  ),
831
831
  ),
@@ -834,9 +834,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
834
834
  raise UnprocessableEntityError(
835
835
  headers=dict(_response.headers),
836
836
  body=typing.cast(
837
- typing.Optional[typing.Any],
837
+ typing.Any,
838
838
  parse_obj_as(
839
- type_=typing.Optional[typing.Any], # type: ignore
839
+ type_=typing.Any, # type: ignore
840
840
  object_=_response.json(),
841
841
  ),
842
842
  ),
@@ -845,9 +845,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
845
845
  raise TooManyRequestsError(
846
846
  headers=dict(_response.headers),
847
847
  body=typing.cast(
848
- typing.Optional[typing.Any],
848
+ typing.Any,
849
849
  parse_obj_as(
850
- type_=typing.Optional[typing.Any], # type: ignore
850
+ type_=typing.Any, # type: ignore
851
851
  object_=_response.json(),
852
852
  ),
853
853
  ),
@@ -856,9 +856,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
856
856
  raise InternalServerError(
857
857
  headers=dict(_response.headers),
858
858
  body=typing.cast(
859
- typing.Optional[typing.Any],
859
+ typing.Any,
860
860
  parse_obj_as(
861
- type_=typing.Optional[typing.Any], # type: ignore
861
+ type_=typing.Any, # type: ignore
862
862
  object_=_response.json(),
863
863
  ),
864
864
  ),
@@ -867,9 +867,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
867
867
  raise ServiceUnavailableError(
868
868
  headers=dict(_response.headers),
869
869
  body=typing.cast(
870
- typing.Optional[typing.Any],
870
+ typing.Any,
871
871
  parse_obj_as(
872
- type_=typing.Optional[typing.Any], # type: ignore
872
+ type_=typing.Any, # type: ignore
873
873
  object_=_response.json(),
874
874
  ),
875
875
  ),
@@ -927,9 +927,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
927
927
  raise BadRequestError(
928
928
  headers=dict(_response.headers),
929
929
  body=typing.cast(
930
- typing.Optional[typing.Any],
930
+ typing.Any,
931
931
  parse_obj_as(
932
- type_=typing.Optional[typing.Any], # type: ignore
932
+ type_=typing.Any, # type: ignore
933
933
  object_=_response.json(),
934
934
  ),
935
935
  ),
@@ -938,9 +938,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
938
938
  raise ForbiddenError(
939
939
  headers=dict(_response.headers),
940
940
  body=typing.cast(
941
- typing.Optional[typing.Any],
941
+ typing.Any,
942
942
  parse_obj_as(
943
- type_=typing.Optional[typing.Any], # type: ignore
943
+ type_=typing.Any, # type: ignore
944
944
  object_=_response.json(),
945
945
  ),
946
946
  ),
@@ -949,9 +949,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
949
949
  raise UnprocessableEntityError(
950
950
  headers=dict(_response.headers),
951
951
  body=typing.cast(
952
- typing.Optional[typing.Any],
952
+ typing.Any,
953
953
  parse_obj_as(
954
- type_=typing.Optional[typing.Any], # type: ignore
954
+ type_=typing.Any, # type: ignore
955
955
  object_=_response.json(),
956
956
  ),
957
957
  ),
@@ -960,9 +960,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
960
960
  raise TooManyRequestsError(
961
961
  headers=dict(_response.headers),
962
962
  body=typing.cast(
963
- typing.Optional[typing.Any],
963
+ typing.Any,
964
964
  parse_obj_as(
965
- type_=typing.Optional[typing.Any], # type: ignore
965
+ type_=typing.Any, # type: ignore
966
966
  object_=_response.json(),
967
967
  ),
968
968
  ),
@@ -971,9 +971,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
971
971
  raise InternalServerError(
972
972
  headers=dict(_response.headers),
973
973
  body=typing.cast(
974
- typing.Optional[typing.Any],
974
+ typing.Any,
975
975
  parse_obj_as(
976
- type_=typing.Optional[typing.Any], # type: ignore
976
+ type_=typing.Any, # type: ignore
977
977
  object_=_response.json(),
978
978
  ),
979
979
  ),
@@ -982,9 +982,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
982
982
  raise ServiceUnavailableError(
983
983
  headers=dict(_response.headers),
984
984
  body=typing.cast(
985
- typing.Optional[typing.Any],
985
+ typing.Any,
986
986
  parse_obj_as(
987
- type_=typing.Optional[typing.Any], # type: ignore
987
+ type_=typing.Any, # type: ignore
988
988
  object_=_response.json(),
989
989
  ),
990
990
  ),
@@ -1052,9 +1052,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1052
1052
  raise BadRequestError(
1053
1053
  headers=dict(_response.headers),
1054
1054
  body=typing.cast(
1055
- typing.Optional[typing.Any],
1055
+ typing.Any,
1056
1056
  parse_obj_as(
1057
- type_=typing.Optional[typing.Any], # type: ignore
1057
+ type_=typing.Any, # type: ignore
1058
1058
  object_=_response.json(),
1059
1059
  ),
1060
1060
  ),
@@ -1063,9 +1063,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1063
1063
  raise ForbiddenError(
1064
1064
  headers=dict(_response.headers),
1065
1065
  body=typing.cast(
1066
- typing.Optional[typing.Any],
1066
+ typing.Any,
1067
1067
  parse_obj_as(
1068
- type_=typing.Optional[typing.Any], # type: ignore
1068
+ type_=typing.Any, # type: ignore
1069
1069
  object_=_response.json(),
1070
1070
  ),
1071
1071
  ),
@@ -1074,9 +1074,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1074
1074
  raise UnprocessableEntityError(
1075
1075
  headers=dict(_response.headers),
1076
1076
  body=typing.cast(
1077
- typing.Optional[typing.Any],
1077
+ typing.Any,
1078
1078
  parse_obj_as(
1079
- type_=typing.Optional[typing.Any], # type: ignore
1079
+ type_=typing.Any, # type: ignore
1080
1080
  object_=_response.json(),
1081
1081
  ),
1082
1082
  ),
@@ -1085,9 +1085,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1085
1085
  raise TooManyRequestsError(
1086
1086
  headers=dict(_response.headers),
1087
1087
  body=typing.cast(
1088
- typing.Optional[typing.Any],
1088
+ typing.Any,
1089
1089
  parse_obj_as(
1090
- type_=typing.Optional[typing.Any], # type: ignore
1090
+ type_=typing.Any, # type: ignore
1091
1091
  object_=_response.json(),
1092
1092
  ),
1093
1093
  ),
@@ -1096,9 +1096,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1096
1096
  raise InternalServerError(
1097
1097
  headers=dict(_response.headers),
1098
1098
  body=typing.cast(
1099
- typing.Optional[typing.Any],
1099
+ typing.Any,
1100
1100
  parse_obj_as(
1101
- type_=typing.Optional[typing.Any], # type: ignore
1101
+ type_=typing.Any, # type: ignore
1102
1102
  object_=_response.json(),
1103
1103
  ),
1104
1104
  ),
@@ -1107,9 +1107,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1107
1107
  raise ServiceUnavailableError(
1108
1108
  headers=dict(_response.headers),
1109
1109
  body=typing.cast(
1110
- typing.Optional[typing.Any],
1110
+ typing.Any,
1111
1111
  parse_obj_as(
1112
- type_=typing.Optional[typing.Any], # type: ignore
1112
+ type_=typing.Any, # type: ignore
1113
1113
  object_=_response.json(),
1114
1114
  ),
1115
1115
  ),
@@ -1177,9 +1177,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1177
1177
  raise BadRequestError(
1178
1178
  headers=dict(_response.headers),
1179
1179
  body=typing.cast(
1180
- typing.Optional[typing.Any],
1180
+ typing.Any,
1181
1181
  parse_obj_as(
1182
- type_=typing.Optional[typing.Any], # type: ignore
1182
+ type_=typing.Any, # type: ignore
1183
1183
  object_=_response.json(),
1184
1184
  ),
1185
1185
  ),
@@ -1188,9 +1188,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1188
1188
  raise ForbiddenError(
1189
1189
  headers=dict(_response.headers),
1190
1190
  body=typing.cast(
1191
- typing.Optional[typing.Any],
1191
+ typing.Any,
1192
1192
  parse_obj_as(
1193
- type_=typing.Optional[typing.Any], # type: ignore
1193
+ type_=typing.Any, # type: ignore
1194
1194
  object_=_response.json(),
1195
1195
  ),
1196
1196
  ),
@@ -1199,9 +1199,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1199
1199
  raise UnprocessableEntityError(
1200
1200
  headers=dict(_response.headers),
1201
1201
  body=typing.cast(
1202
- typing.Optional[typing.Any],
1202
+ typing.Any,
1203
1203
  parse_obj_as(
1204
- type_=typing.Optional[typing.Any], # type: ignore
1204
+ type_=typing.Any, # type: ignore
1205
1205
  object_=_response.json(),
1206
1206
  ),
1207
1207
  ),
@@ -1210,9 +1210,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1210
1210
  raise TooManyRequestsError(
1211
1211
  headers=dict(_response.headers),
1212
1212
  body=typing.cast(
1213
- typing.Optional[typing.Any],
1213
+ typing.Any,
1214
1214
  parse_obj_as(
1215
- type_=typing.Optional[typing.Any], # type: ignore
1215
+ type_=typing.Any, # type: ignore
1216
1216
  object_=_response.json(),
1217
1217
  ),
1218
1218
  ),
@@ -1221,9 +1221,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1221
1221
  raise InternalServerError(
1222
1222
  headers=dict(_response.headers),
1223
1223
  body=typing.cast(
1224
- typing.Optional[typing.Any],
1224
+ typing.Any,
1225
1225
  parse_obj_as(
1226
- type_=typing.Optional[typing.Any], # type: ignore
1226
+ type_=typing.Any, # type: ignore
1227
1227
  object_=_response.json(),
1228
1228
  ),
1229
1229
  ),
@@ -1232,9 +1232,9 @@ class AsyncRawSpeechToTextTranslateJobClient:
1232
1232
  raise ServiceUnavailableError(
1233
1233
  headers=dict(_response.headers),
1234
1234
  body=typing.cast(
1235
- typing.Optional[typing.Any],
1235
+ typing.Any,
1236
1236
  parse_obj_as(
1237
- type_=typing.Optional[typing.Any], # type: ignore
1237
+ type_=typing.Any, # type: ignore
1238
1238
  object_=_response.json(),
1239
1239
  ),
1240
1240
  ),