sarvamai 0.1.5a5__py3-none-any.whl → 0.1.5a6__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.
- sarvamai/__init__.py +1 -45
- sarvamai/chat/__init__.py +0 -2
- sarvamai/chat/client.py +10 -9
- sarvamai/chat/raw_client.py +37 -48
- sarvamai/client.py +31 -13
- sarvamai/core/__init__.py +0 -5
- sarvamai/core/api_error.py +5 -13
- sarvamai/core/client_wrapper.py +20 -17
- sarvamai/core/http_client.py +24 -70
- sarvamai/core/http_response.py +11 -19
- sarvamai/core/pydantic_utilities.py +108 -69
- sarvamai/environment.py +3 -10
- sarvamai/errors/__init__.py +0 -2
- sarvamai/errors/bad_request_error.py +3 -4
- sarvamai/errors/forbidden_error.py +3 -4
- sarvamai/errors/internal_server_error.py +3 -4
- sarvamai/errors/service_unavailable_error.py +2 -4
- sarvamai/errors/too_many_requests_error.py +3 -4
- sarvamai/errors/unprocessable_entity_error.py +3 -4
- sarvamai/requests/__init__.py +0 -18
- sarvamai/requests/chat_completion_request_message.py +1 -3
- sarvamai/requests/create_chat_completion_response.py +2 -2
- sarvamai/requests/diarized_transcript.py +1 -2
- sarvamai/requests/error_details.py +1 -0
- sarvamai/requests/language_identification_response.py +1 -0
- sarvamai/requests/speech_to_text_response.py +2 -1
- sarvamai/requests/speech_to_text_translate_response.py +1 -0
- sarvamai/requests/text_to_speech_response.py +2 -2
- sarvamai/requests/timestamps_model.py +1 -2
- sarvamai/requests/translation_response.py +1 -0
- sarvamai/requests/transliteration_response.py +1 -0
- sarvamai/speech_to_text/__init__.py +0 -2
- sarvamai/speech_to_text/client.py +14 -13
- sarvamai/speech_to_text/raw_client.py +68 -99
- sarvamai/text/__init__.py +0 -2
- sarvamai/text/client.py +25 -24
- sarvamai/text/raw_client.py +91 -126
- sarvamai/text_to_speech/__init__.py +0 -2
- sarvamai/text_to_speech/client.py +11 -10
- sarvamai/text_to_speech/raw_client.py +38 -49
- sarvamai/types/__init__.py +0 -24
- sarvamai/types/chat_completion_request_assistant_message.py +3 -3
- sarvamai/types/chat_completion_request_message.py +2 -3
- sarvamai/types/chat_completion_request_system_message.py +3 -3
- sarvamai/types/chat_completion_request_user_message.py +3 -3
- sarvamai/types/chat_completion_response_message.py +3 -3
- sarvamai/types/choice.py +4 -4
- sarvamai/types/completion_usage.py +3 -3
- sarvamai/types/create_chat_completion_response.py +3 -3
- sarvamai/types/diarized_entry.py +3 -3
- sarvamai/types/diarized_transcript.py +3 -3
- sarvamai/types/error_details.py +3 -3
- sarvamai/types/error_message.py +4 -4
- sarvamai/types/language_identification_response.py +2 -2
- sarvamai/types/speech_to_text_response.py +3 -3
- sarvamai/types/speech_to_text_translate_response.py +3 -3
- sarvamai/types/text_to_speech_response.py +2 -2
- sarvamai/types/timestamps_model.py +2 -2
- sarvamai/types/translation_response.py +2 -2
- sarvamai/types/transliteration_response.py +2 -2
- sarvamai-0.1.5a6.dist-info/METADATA +174 -0
- sarvamai-0.1.5a6.dist-info/RECORD +106 -0
- sarvamai/core/events.py +0 -30
- sarvamai/core/force_multipart.py +0 -16
- sarvamai/requests/audio_data.py +0 -21
- sarvamai/requests/audio_message.py +0 -8
- sarvamai/requests/error_data.py +0 -15
- sarvamai/requests/events_data.py +0 -17
- sarvamai/requests/speech_to_text_streaming_response.py +0 -10
- sarvamai/requests/speech_to_text_streaming_response_data.py +0 -9
- sarvamai/requests/transcription_data.py +0 -35
- sarvamai/requests/transcription_metrics.py +0 -15
- sarvamai/speech_to_text_streaming/__init__.py +0 -7
- sarvamai/speech_to_text_streaming/client.py +0 -189
- sarvamai/speech_to_text_streaming/raw_client.py +0 -166
- sarvamai/speech_to_text_streaming/socket_client.py +0 -129
- sarvamai/speech_to_text_streaming/types/__init__.py +0 -8
- sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_language_code.py +0 -8
- sarvamai/speech_to_text_streaming/types/speech_to_text_streaming_model.py +0 -5
- sarvamai/types/audio_data.py +0 -33
- sarvamai/types/audio_data_encoding.py +0 -5
- sarvamai/types/audio_message.py +0 -20
- sarvamai/types/error_data.py +0 -27
- sarvamai/types/events_data.py +0 -28
- sarvamai/types/format.py +0 -5
- sarvamai/types/speech_to_text_streaming_response.py +0 -22
- sarvamai/types/speech_to_text_streaming_response_data.py +0 -9
- sarvamai/types/speech_to_text_streaming_response_type.py +0 -5
- sarvamai/types/transcription_data.py +0 -45
- sarvamai/types/transcription_metrics.py +0 -27
- sarvamai-0.1.5a5.dist-info/METADATA +0 -28
- sarvamai-0.1.5a5.dist-info/RECORD +0 -134
- {sarvamai-0.1.5a5.dist-info → sarvamai-0.1.5a6.dist-info}/WHEEL +0 -0
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
|
-
from
|
|
5
|
-
|
|
6
|
-
from ..
|
|
7
|
-
from ..
|
|
8
|
-
from ..
|
|
9
|
-
from ..core.pydantic_utilities import parse_obj_as
|
|
4
|
+
from ..core.client_wrapper import SyncClientWrapper
|
|
5
|
+
from ..types.text_to_speech_language import TextToSpeechLanguage
|
|
6
|
+
from ..types.text_to_speech_speaker import TextToSpeechSpeaker
|
|
7
|
+
from ..types.speech_sample_rate import SpeechSampleRate
|
|
8
|
+
from ..types.text_to_speech_model import TextToSpeechModel
|
|
10
9
|
from ..core.request_options import RequestOptions
|
|
10
|
+
from ..core.http_response import HttpResponse
|
|
11
|
+
from ..types.text_to_speech_response import TextToSpeechResponse
|
|
12
|
+
from ..core.pydantic_utilities import parse_obj_as
|
|
11
13
|
from ..errors.bad_request_error import BadRequestError
|
|
12
14
|
from ..errors.forbidden_error import ForbiddenError
|
|
13
|
-
from ..errors.internal_server_error import InternalServerError
|
|
14
|
-
from ..errors.too_many_requests_error import TooManyRequestsError
|
|
15
15
|
from ..errors.unprocessable_entity_error import UnprocessableEntityError
|
|
16
|
-
from ..
|
|
17
|
-
from ..
|
|
18
|
-
from
|
|
19
|
-
from ..
|
|
20
|
-
from ..
|
|
16
|
+
from ..errors.too_many_requests_error import TooManyRequestsError
|
|
17
|
+
from ..errors.internal_server_error import InternalServerError
|
|
18
|
+
from json.decoder import JSONDecodeError
|
|
19
|
+
from ..core.api_error import ApiError
|
|
20
|
+
from ..core.client_wrapper import AsyncClientWrapper
|
|
21
|
+
from ..core.http_response import AsyncHttpResponse
|
|
21
22
|
|
|
22
23
|
# this is used as the default value for optional parameters
|
|
23
24
|
OMIT = typing.cast(typing.Any, ...)
|
|
@@ -96,7 +97,6 @@ class RawTextToSpeechClient:
|
|
|
96
97
|
"""
|
|
97
98
|
_response = self._client_wrapper.httpx_client.request(
|
|
98
99
|
"text-to-speech",
|
|
99
|
-
base_url=self._client_wrapper.get_environment().base,
|
|
100
100
|
method="POST",
|
|
101
101
|
json={
|
|
102
102
|
"text": text,
|
|
@@ -127,63 +127,58 @@ class RawTextToSpeechClient:
|
|
|
127
127
|
return HttpResponse(response=_response, data=_data)
|
|
128
128
|
if _response.status_code == 400:
|
|
129
129
|
raise BadRequestError(
|
|
130
|
-
|
|
131
|
-
body=typing.cast(
|
|
130
|
+
typing.cast(
|
|
132
131
|
typing.Optional[typing.Any],
|
|
133
132
|
parse_obj_as(
|
|
134
133
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
135
134
|
object_=_response.json(),
|
|
136
135
|
),
|
|
137
|
-
)
|
|
136
|
+
)
|
|
138
137
|
)
|
|
139
138
|
if _response.status_code == 403:
|
|
140
139
|
raise ForbiddenError(
|
|
141
|
-
|
|
142
|
-
body=typing.cast(
|
|
140
|
+
typing.cast(
|
|
143
141
|
typing.Optional[typing.Any],
|
|
144
142
|
parse_obj_as(
|
|
145
143
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
146
144
|
object_=_response.json(),
|
|
147
145
|
),
|
|
148
|
-
)
|
|
146
|
+
)
|
|
149
147
|
)
|
|
150
148
|
if _response.status_code == 422:
|
|
151
149
|
raise UnprocessableEntityError(
|
|
152
|
-
|
|
153
|
-
body=typing.cast(
|
|
150
|
+
typing.cast(
|
|
154
151
|
typing.Optional[typing.Any],
|
|
155
152
|
parse_obj_as(
|
|
156
153
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
157
154
|
object_=_response.json(),
|
|
158
155
|
),
|
|
159
|
-
)
|
|
156
|
+
)
|
|
160
157
|
)
|
|
161
158
|
if _response.status_code == 429:
|
|
162
159
|
raise TooManyRequestsError(
|
|
163
|
-
|
|
164
|
-
body=typing.cast(
|
|
160
|
+
typing.cast(
|
|
165
161
|
typing.Optional[typing.Any],
|
|
166
162
|
parse_obj_as(
|
|
167
163
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
168
164
|
object_=_response.json(),
|
|
169
165
|
),
|
|
170
|
-
)
|
|
166
|
+
)
|
|
171
167
|
)
|
|
172
168
|
if _response.status_code == 500:
|
|
173
169
|
raise InternalServerError(
|
|
174
|
-
|
|
175
|
-
body=typing.cast(
|
|
170
|
+
typing.cast(
|
|
176
171
|
typing.Optional[typing.Any],
|
|
177
172
|
parse_obj_as(
|
|
178
173
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
179
174
|
object_=_response.json(),
|
|
180
175
|
),
|
|
181
|
-
)
|
|
176
|
+
)
|
|
182
177
|
)
|
|
183
178
|
_response_json = _response.json()
|
|
184
179
|
except JSONDecodeError:
|
|
185
|
-
raise ApiError(status_code=_response.status_code,
|
|
186
|
-
raise ApiError(status_code=_response.status_code,
|
|
180
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
181
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
187
182
|
|
|
188
183
|
|
|
189
184
|
class AsyncRawTextToSpeechClient:
|
|
@@ -259,7 +254,6 @@ class AsyncRawTextToSpeechClient:
|
|
|
259
254
|
"""
|
|
260
255
|
_response = await self._client_wrapper.httpx_client.request(
|
|
261
256
|
"text-to-speech",
|
|
262
|
-
base_url=self._client_wrapper.get_environment().base,
|
|
263
257
|
method="POST",
|
|
264
258
|
json={
|
|
265
259
|
"text": text,
|
|
@@ -290,60 +284,55 @@ class AsyncRawTextToSpeechClient:
|
|
|
290
284
|
return AsyncHttpResponse(response=_response, data=_data)
|
|
291
285
|
if _response.status_code == 400:
|
|
292
286
|
raise BadRequestError(
|
|
293
|
-
|
|
294
|
-
body=typing.cast(
|
|
287
|
+
typing.cast(
|
|
295
288
|
typing.Optional[typing.Any],
|
|
296
289
|
parse_obj_as(
|
|
297
290
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
298
291
|
object_=_response.json(),
|
|
299
292
|
),
|
|
300
|
-
)
|
|
293
|
+
)
|
|
301
294
|
)
|
|
302
295
|
if _response.status_code == 403:
|
|
303
296
|
raise ForbiddenError(
|
|
304
|
-
|
|
305
|
-
body=typing.cast(
|
|
297
|
+
typing.cast(
|
|
306
298
|
typing.Optional[typing.Any],
|
|
307
299
|
parse_obj_as(
|
|
308
300
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
309
301
|
object_=_response.json(),
|
|
310
302
|
),
|
|
311
|
-
)
|
|
303
|
+
)
|
|
312
304
|
)
|
|
313
305
|
if _response.status_code == 422:
|
|
314
306
|
raise UnprocessableEntityError(
|
|
315
|
-
|
|
316
|
-
body=typing.cast(
|
|
307
|
+
typing.cast(
|
|
317
308
|
typing.Optional[typing.Any],
|
|
318
309
|
parse_obj_as(
|
|
319
310
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
320
311
|
object_=_response.json(),
|
|
321
312
|
),
|
|
322
|
-
)
|
|
313
|
+
)
|
|
323
314
|
)
|
|
324
315
|
if _response.status_code == 429:
|
|
325
316
|
raise TooManyRequestsError(
|
|
326
|
-
|
|
327
|
-
body=typing.cast(
|
|
317
|
+
typing.cast(
|
|
328
318
|
typing.Optional[typing.Any],
|
|
329
319
|
parse_obj_as(
|
|
330
320
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
331
321
|
object_=_response.json(),
|
|
332
322
|
),
|
|
333
|
-
)
|
|
323
|
+
)
|
|
334
324
|
)
|
|
335
325
|
if _response.status_code == 500:
|
|
336
326
|
raise InternalServerError(
|
|
337
|
-
|
|
338
|
-
body=typing.cast(
|
|
327
|
+
typing.cast(
|
|
339
328
|
typing.Optional[typing.Any],
|
|
340
329
|
parse_obj_as(
|
|
341
330
|
type_=typing.Optional[typing.Any], # type: ignore
|
|
342
331
|
object_=_response.json(),
|
|
343
332
|
),
|
|
344
|
-
)
|
|
333
|
+
)
|
|
345
334
|
)
|
|
346
335
|
_response_json = _response.json()
|
|
347
336
|
except JSONDecodeError:
|
|
348
|
-
raise ApiError(status_code=_response.status_code,
|
|
349
|
-
raise ApiError(status_code=_response.status_code,
|
|
337
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
338
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
sarvamai/types/__init__.py
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
# isort: skip_file
|
|
4
|
-
|
|
5
|
-
from .audio_data import AudioData
|
|
6
|
-
from .audio_data_encoding import AudioDataEncoding
|
|
7
|
-
from .audio_message import AudioMessage
|
|
8
3
|
from .chat_completion_request_assistant_message import ChatCompletionRequestAssistantMessage
|
|
9
4
|
from .chat_completion_request_message import (
|
|
10
5
|
ChatCompletionRequestMessage,
|
|
@@ -21,12 +16,9 @@ from .create_chat_completion_response import CreateChatCompletionResponse
|
|
|
21
16
|
from .diarized_entry import DiarizedEntry
|
|
22
17
|
from .diarized_transcript import DiarizedTranscript
|
|
23
18
|
from .error_code import ErrorCode
|
|
24
|
-
from .error_data import ErrorData
|
|
25
19
|
from .error_details import ErrorDetails
|
|
26
20
|
from .error_message import ErrorMessage
|
|
27
|
-
from .events_data import EventsData
|
|
28
21
|
from .finish_reason import FinishReason
|
|
29
|
-
from .format import Format
|
|
30
22
|
from .language_identification_response import LanguageIdentificationResponse
|
|
31
23
|
from .numerals_format import NumeralsFormat
|
|
32
24
|
from .reasoning_effort import ReasoningEffort
|
|
@@ -36,9 +28,6 @@ from .speech_sample_rate import SpeechSampleRate
|
|
|
36
28
|
from .speech_to_text_language import SpeechToTextLanguage
|
|
37
29
|
from .speech_to_text_model import SpeechToTextModel
|
|
38
30
|
from .speech_to_text_response import SpeechToTextResponse
|
|
39
|
-
from .speech_to_text_streaming_response import SpeechToTextStreamingResponse
|
|
40
|
-
from .speech_to_text_streaming_response_data import SpeechToTextStreamingResponseData
|
|
41
|
-
from .speech_to_text_streaming_response_type import SpeechToTextStreamingResponseType
|
|
42
31
|
from .speech_to_text_translate_language import SpeechToTextTranslateLanguage
|
|
43
32
|
from .speech_to_text_translate_model import SpeechToTextTranslateModel
|
|
44
33
|
from .speech_to_text_translate_response import SpeechToTextTranslateResponse
|
|
@@ -49,8 +38,6 @@ from .text_to_speech_model import TextToSpeechModel
|
|
|
49
38
|
from .text_to_speech_response import TextToSpeechResponse
|
|
50
39
|
from .text_to_speech_speaker import TextToSpeechSpeaker
|
|
51
40
|
from .timestamps_model import TimestampsModel
|
|
52
|
-
from .transcription_data import TranscriptionData
|
|
53
|
-
from .transcription_metrics import TranscriptionMetrics
|
|
54
41
|
from .translate_mode import TranslateMode
|
|
55
42
|
from .translate_model import TranslateModel
|
|
56
43
|
from .translate_source_language import TranslateSourceLanguage
|
|
@@ -63,9 +50,6 @@ from .transliterate_source_language import TransliterateSourceLanguage
|
|
|
63
50
|
from .transliteration_response import TransliterationResponse
|
|
64
51
|
|
|
65
52
|
__all__ = [
|
|
66
|
-
"AudioData",
|
|
67
|
-
"AudioDataEncoding",
|
|
68
|
-
"AudioMessage",
|
|
69
53
|
"ChatCompletionRequestAssistantMessage",
|
|
70
54
|
"ChatCompletionRequestMessage",
|
|
71
55
|
"ChatCompletionRequestMessage_Assistant",
|
|
@@ -80,12 +64,9 @@ __all__ = [
|
|
|
80
64
|
"DiarizedEntry",
|
|
81
65
|
"DiarizedTranscript",
|
|
82
66
|
"ErrorCode",
|
|
83
|
-
"ErrorData",
|
|
84
67
|
"ErrorDetails",
|
|
85
68
|
"ErrorMessage",
|
|
86
|
-
"EventsData",
|
|
87
69
|
"FinishReason",
|
|
88
|
-
"Format",
|
|
89
70
|
"LanguageIdentificationResponse",
|
|
90
71
|
"NumeralsFormat",
|
|
91
72
|
"ReasoningEffort",
|
|
@@ -95,9 +76,6 @@ __all__ = [
|
|
|
95
76
|
"SpeechToTextLanguage",
|
|
96
77
|
"SpeechToTextModel",
|
|
97
78
|
"SpeechToTextResponse",
|
|
98
|
-
"SpeechToTextStreamingResponse",
|
|
99
|
-
"SpeechToTextStreamingResponseData",
|
|
100
|
-
"SpeechToTextStreamingResponseType",
|
|
101
79
|
"SpeechToTextTranslateLanguage",
|
|
102
80
|
"SpeechToTextTranslateModel",
|
|
103
81
|
"SpeechToTextTranslateResponse",
|
|
@@ -108,8 +86,6 @@ __all__ = [
|
|
|
108
86
|
"TextToSpeechResponse",
|
|
109
87
|
"TextToSpeechSpeaker",
|
|
110
88
|
"TimestampsModel",
|
|
111
|
-
"TranscriptionData",
|
|
112
|
-
"TranscriptionMetrics",
|
|
113
89
|
"TranslateMode",
|
|
114
90
|
"TranslateModel",
|
|
115
91
|
"TranslateSourceLanguage",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ChatCompletionRequestAssistantMessage(UniversalBaseModel):
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
|
-
|
|
4
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
5
|
import typing
|
|
6
|
-
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
import pydantic
|
|
8
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class ChatCompletionRequestMessage_Assistant(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ChatCompletionRequestSystemMessage(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ChatCompletionRequestUserMessage(UniversalBaseModel):
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
5
|
from .role import Role
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class ChatCompletionResponseMessage(UniversalBaseModel):
|
sarvamai/types/choice.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
4
|
+
from .finish_reason import FinishReason
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
6
|
from .chat_completion_response_message import ChatCompletionResponseMessage
|
|
8
|
-
from .
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
import typing
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Choice(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class CompletionUsage(UniversalBaseModel):
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
|
|
5
|
+
import typing
|
|
7
6
|
from .choice import Choice
|
|
8
7
|
from .completion_usage import CompletionUsage
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class CreateChatCompletionResponse(UniversalBaseModel):
|
sarvamai/types/diarized_entry.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
5
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
import typing
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class DiarizedEntry(UniversalBaseModel):
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
|
-
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
5
|
from .diarized_entry import DiarizedEntry
|
|
6
|
+
import pydantic
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class DiarizedTranscript(UniversalBaseModel):
|
sarvamai/types/error_details.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
5
4
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
5
|
from .error_code import ErrorCode
|
|
6
|
+
import typing
|
|
7
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class ErrorDetails(UniversalBaseModel):
|
sarvamai/types/error_message.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
7
4
|
from .error_details import ErrorDetails
|
|
5
|
+
import pydantic
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
import typing
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class ErrorMessage(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class LanguageIdentificationResponse(UniversalBaseModel):
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
-
from .diarized_transcript import DiarizedTranscript
|
|
8
6
|
from .timestamps_model import TimestampsModel
|
|
7
|
+
from .diarized_transcript import DiarizedTranscript
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class SpeechToTextResponse(UniversalBaseModel):
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
|
|
7
|
-
from .diarized_transcript import DiarizedTranscript
|
|
8
6
|
from .speech_to_text_translate_language import SpeechToTextTranslateLanguage
|
|
7
|
+
from .diarized_transcript import DiarizedTranscript
|
|
8
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class SpeechToTextTranslateResponse(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class TextToSpeechResponse(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class TimestampsModel(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class TranslationResponse(UniversalBaseModel):
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
+
from ..core.pydantic_utilities import UniversalBaseModel
|
|
3
4
|
import typing
|
|
4
|
-
|
|
5
5
|
import pydantic
|
|
6
|
-
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
6
|
+
from ..core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class TransliterationResponse(UniversalBaseModel):
|