sarvamai 0.1.23a5__py3-none-any.whl → 0.1.23a7__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 (46) hide show
  1. sarvamai/__init__.py +56 -0
  2. sarvamai/client.py +3 -0
  3. sarvamai/core/client_wrapper.py +2 -2
  4. sarvamai/doc_digitization_job/__init__.py +4 -0
  5. sarvamai/doc_digitization_job/client.py +570 -0
  6. sarvamai/doc_digitization_job/raw_client.py +1176 -0
  7. sarvamai/requests/__init__.py +20 -0
  8. sarvamai/requests/doc_digitization_create_job_response.py +25 -0
  9. sarvamai/requests/doc_digitization_download_files_response.py +37 -0
  10. sarvamai/requests/doc_digitization_error_details.py +21 -0
  11. sarvamai/requests/doc_digitization_error_message.py +11 -0
  12. sarvamai/requests/doc_digitization_job_detail.py +64 -0
  13. sarvamai/requests/doc_digitization_job_parameters.py +21 -0
  14. sarvamai/requests/doc_digitization_job_status_response.py +65 -0
  15. sarvamai/requests/doc_digitization_page_error.py +24 -0
  16. sarvamai/requests/doc_digitization_upload_files_response.py +34 -0
  17. sarvamai/requests/doc_digitization_webhook_callback.py +19 -0
  18. sarvamai/speech_to_text_streaming/__init__.py +2 -0
  19. sarvamai/speech_to_text_streaming/client.py +15 -0
  20. sarvamai/speech_to_text_streaming/raw_client.py +15 -0
  21. sarvamai/speech_to_text_streaming/types/__init__.py +2 -0
  22. sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_input_audio_codec.py +7 -0
  23. sarvamai/speech_to_text_translate_streaming/__init__.py +2 -0
  24. sarvamai/speech_to_text_translate_streaming/client.py +15 -0
  25. sarvamai/speech_to_text_translate_streaming/raw_client.py +15 -0
  26. sarvamai/speech_to_text_translate_streaming/types/__init__.py +2 -0
  27. sarvamai/speech_to_text_translate_streaming/types/speech_to_text_translate_streaming_input_audio_codec.py +7 -0
  28. sarvamai/types/__init__.py +30 -0
  29. sarvamai/types/doc_digitization_create_job_response.py +37 -0
  30. sarvamai/types/doc_digitization_download_files_response.py +47 -0
  31. sarvamai/types/doc_digitization_error_code.py +15 -0
  32. sarvamai/types/doc_digitization_error_details.py +33 -0
  33. sarvamai/types/doc_digitization_error_message.py +23 -0
  34. sarvamai/types/doc_digitization_job_detail.py +74 -0
  35. sarvamai/types/doc_digitization_job_detail_state.py +7 -0
  36. sarvamai/types/doc_digitization_job_parameters.py +33 -0
  37. sarvamai/types/doc_digitization_job_state.py +7 -0
  38. sarvamai/types/doc_digitization_job_status_response.py +75 -0
  39. sarvamai/types/doc_digitization_output_format.py +5 -0
  40. sarvamai/types/doc_digitization_page_error.py +36 -0
  41. sarvamai/types/doc_digitization_supported_language.py +32 -0
  42. sarvamai/types/doc_digitization_upload_files_response.py +44 -0
  43. sarvamai/types/doc_digitization_webhook_callback.py +31 -0
  44. {sarvamai-0.1.23a5.dist-info → sarvamai-0.1.23a7.dist-info}/METADATA +1 -1
  45. {sarvamai-0.1.23a5.dist-info → sarvamai-0.1.23a7.dist-info}/RECORD +46 -16
  46. {sarvamai-0.1.23a5.dist-info → sarvamai-0.1.23a7.dist-info}/WHEEL +0 -0
sarvamai/__init__.py CHANGED
@@ -33,6 +33,21 @@ from .types import (
33
33
  CreateChatCompletionResponse,
34
34
  DiarizedEntry,
35
35
  DiarizedTranscript,
36
+ DocDigitizationCreateJobResponse,
37
+ DocDigitizationDownloadFilesResponse,
38
+ DocDigitizationErrorCode,
39
+ DocDigitizationErrorDetails,
40
+ DocDigitizationErrorMessage,
41
+ DocDigitizationJobDetail,
42
+ DocDigitizationJobDetailState,
43
+ DocDigitizationJobParameters,
44
+ DocDigitizationJobState,
45
+ DocDigitizationJobStatusResponse,
46
+ DocDigitizationOutputFormat,
47
+ DocDigitizationPageError,
48
+ DocDigitizationSupportedLanguage,
49
+ DocDigitizationUploadFilesResponse,
50
+ DocDigitizationWebhookCallback,
36
51
  ErrorCode,
37
52
  ErrorData,
38
53
  ErrorDetails,
@@ -112,6 +127,7 @@ from .errors import (
112
127
  )
113
128
  from . import (
114
129
  chat,
130
+ doc_digitization_job,
115
131
  speech_to_text,
116
132
  speech_to_text_job,
117
133
  speech_to_text_streaming,
@@ -147,6 +163,16 @@ from .requests import (
147
163
  CreateChatCompletionResponseParams,
148
164
  DiarizedEntryParams,
149
165
  DiarizedTranscriptParams,
166
+ DocDigitizationCreateJobResponseParams,
167
+ DocDigitizationDownloadFilesResponseParams,
168
+ DocDigitizationErrorDetailsParams,
169
+ DocDigitizationErrorMessageParams,
170
+ DocDigitizationJobDetailParams,
171
+ DocDigitizationJobParametersParams,
172
+ DocDigitizationJobStatusResponseParams,
173
+ DocDigitizationPageErrorParams,
174
+ DocDigitizationUploadFilesResponseParams,
175
+ DocDigitizationWebhookCallbackParams,
150
176
  ErrorDataParams,
151
177
  ErrorDetailsParams,
152
178
  ErrorMessageParams,
@@ -188,6 +214,7 @@ from .requests import (
188
214
  from .speech_to_text_streaming import (
189
215
  SpeechToTextStreamingFlushSignal,
190
216
  SpeechToTextStreamingHighVadSensitivity,
217
+ SpeechToTextStreamingInputAudioCodec,
191
218
  SpeechToTextStreamingLanguageCode,
192
219
  SpeechToTextStreamingMode,
193
220
  SpeechToTextStreamingModel,
@@ -196,6 +223,7 @@ from .speech_to_text_streaming import (
196
223
  from .speech_to_text_translate_streaming import (
197
224
  SpeechToTextTranslateStreamingFlushSignal,
198
225
  SpeechToTextTranslateStreamingHighVadSensitivity,
226
+ SpeechToTextTranslateStreamingInputAudioCodec,
199
227
  SpeechToTextTranslateStreamingVadSignals,
200
228
  )
201
229
  from .text_to_speech_streaming import TextToSpeechStreamingModel, TextToSpeechStreamingSendCompletionEvent
@@ -257,6 +285,31 @@ __all__ = [
257
285
  "DiarizedEntryParams",
258
286
  "DiarizedTranscript",
259
287
  "DiarizedTranscriptParams",
288
+ "DocDigitizationCreateJobResponse",
289
+ "DocDigitizationCreateJobResponseParams",
290
+ "DocDigitizationDownloadFilesResponse",
291
+ "DocDigitizationDownloadFilesResponseParams",
292
+ "DocDigitizationErrorCode",
293
+ "DocDigitizationErrorDetails",
294
+ "DocDigitizationErrorDetailsParams",
295
+ "DocDigitizationErrorMessage",
296
+ "DocDigitizationErrorMessageParams",
297
+ "DocDigitizationJobDetail",
298
+ "DocDigitizationJobDetailParams",
299
+ "DocDigitizationJobDetailState",
300
+ "DocDigitizationJobParameters",
301
+ "DocDigitizationJobParametersParams",
302
+ "DocDigitizationJobState",
303
+ "DocDigitizationJobStatusResponse",
304
+ "DocDigitizationJobStatusResponseParams",
305
+ "DocDigitizationOutputFormat",
306
+ "DocDigitizationPageError",
307
+ "DocDigitizationPageErrorParams",
308
+ "DocDigitizationSupportedLanguage",
309
+ "DocDigitizationUploadFilesResponse",
310
+ "DocDigitizationUploadFilesResponseParams",
311
+ "DocDigitizationWebhookCallback",
312
+ "DocDigitizationWebhookCallbackParams",
260
313
  "ErrorCode",
261
314
  "ErrorData",
262
315
  "ErrorDataParams",
@@ -320,6 +373,7 @@ __all__ = [
320
373
  "SpeechToTextResponseParams",
321
374
  "SpeechToTextStreamingFlushSignal",
322
375
  "SpeechToTextStreamingHighVadSensitivity",
376
+ "SpeechToTextStreamingInputAudioCodec",
323
377
  "SpeechToTextStreamingLanguageCode",
324
378
  "SpeechToTextStreamingMode",
325
379
  "SpeechToTextStreamingModel",
@@ -338,6 +392,7 @@ __all__ = [
338
392
  "SpeechToTextTranslateResponseParams",
339
393
  "SpeechToTextTranslateStreamingFlushSignal",
340
394
  "SpeechToTextTranslateStreamingHighVadSensitivity",
395
+ "SpeechToTextTranslateStreamingInputAudioCodec",
341
396
  "SpeechToTextTranslateStreamingResponse",
342
397
  "SpeechToTextTranslateStreamingResponseParams",
343
398
  "SpeechToTextTranslateStreamingVadSignals",
@@ -382,6 +437,7 @@ __all__ = [
382
437
  "UnprocessableEntityError",
383
438
  "__version__",
384
439
  "chat",
440
+ "doc_digitization_job",
385
441
  "speech_to_text",
386
442
  "speech_to_text_job",
387
443
  "speech_to_text_streaming",
sarvamai/client.py CHANGED
@@ -7,6 +7,7 @@ import httpx
7
7
  from .chat.client import AsyncChatClient, ChatClient
8
8
  from .core.api_error import ApiError
9
9
  from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
10
+ from .doc_digitization_job.client import AsyncDocDigitizationJobClient, DocDigitizationJobClient
10
11
  from .environment import SarvamAIEnvironment
11
12
  from .speech_to_text.client import AsyncSpeechToTextClient, SpeechToTextClient
12
13
  from .speech_to_text_job.client import AsyncSpeechToTextJobClient, SpeechToTextJobClient
@@ -92,6 +93,7 @@ class SarvamAI:
92
93
  self.chat = ChatClient(client_wrapper=self._client_wrapper)
93
94
  self.speech_to_text_job = SpeechToTextJobClient(client_wrapper=self._client_wrapper)
94
95
  self.speech_to_text_translate_job = SpeechToTextTranslateJobClient(client_wrapper=self._client_wrapper)
96
+ self.doc_digitization_job = DocDigitizationJobClient(client_wrapper=self._client_wrapper)
95
97
  self.speech_to_text_streaming = SpeechToTextStreamingClient(client_wrapper=self._client_wrapper)
96
98
  self.speech_to_text_translate_streaming = SpeechToTextTranslateStreamingClient(
97
99
  client_wrapper=self._client_wrapper
@@ -170,6 +172,7 @@ class AsyncSarvamAI:
170
172
  self.chat = AsyncChatClient(client_wrapper=self._client_wrapper)
171
173
  self.speech_to_text_job = AsyncSpeechToTextJobClient(client_wrapper=self._client_wrapper)
172
174
  self.speech_to_text_translate_job = AsyncSpeechToTextTranslateJobClient(client_wrapper=self._client_wrapper)
175
+ self.doc_digitization_job = AsyncDocDigitizationJobClient(client_wrapper=self._client_wrapper)
173
176
  self.speech_to_text_streaming = AsyncSpeechToTextStreamingClient(client_wrapper=self._client_wrapper)
174
177
  self.speech_to_text_translate_streaming = AsyncSpeechToTextTranslateStreamingClient(
175
178
  client_wrapper=self._client_wrapper
@@ -23,10 +23,10 @@ class BaseClientWrapper:
23
23
 
24
24
  def get_headers(self) -> typing.Dict[str, str]:
25
25
  headers: typing.Dict[str, str] = {
26
- "User-Agent": "sarvamai/0.1.23a5",
26
+ "User-Agent": "sarvamai/0.1.23a7",
27
27
  "X-Fern-Language": "Python",
28
28
  "X-Fern-SDK-Name": "sarvamai",
29
- "X-Fern-SDK-Version": "0.1.23a5",
29
+ "X-Fern-SDK-Version": "0.1.23a7",
30
30
  **(self.get_custom_headers() or {}),
31
31
  }
32
32
  headers["api-subscription-key"] = self.api_subscription_key
@@ -0,0 +1,4 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+