dwani 0.1.18__tar.gz → 0.1.19__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.
- {dwani-0.1.18 → dwani-0.1.19}/PKG-INFO +1 -1
- {dwani-0.1.18 → dwani-0.1.19}/dwani/asr.py +2 -1
- {dwani-0.1.18 → dwani-0.1.19}/dwani/audio.py +2 -1
- {dwani-0.1.18 → dwani-0.1.19}/dwani/chat.py +4 -2
- {dwani-0.1.18 → dwani-0.1.19}/dwani/docs.py +6 -6
- {dwani-0.1.18 → dwani-0.1.19}/dwani/translate.py +2 -1
- {dwani-0.1.18 → dwani-0.1.19}/dwani/vision.py +4 -2
- {dwani-0.1.18 → dwani-0.1.19}/pyproject.toml +1 -1
- {dwani-0.1.18 → dwani-0.1.19}/LICENSE +0 -0
- {dwani-0.1.18 → dwani-0.1.19}/MANIFEST.in +0 -0
- {dwani-0.1.18 → dwani-0.1.19}/README.md +0 -0
- {dwani-0.1.18 → dwani-0.1.19}/dwani/__init__.py +0 -0
- {dwani-0.1.18 → dwani-0.1.19}/dwani/client.py +0 -0
- {dwani-0.1.18 → dwani-0.1.19}/dwani/exceptions.py +0 -0
- {dwani-0.1.18 → dwani-0.1.19}/dwani.egg-info/SOURCES.txt +0 -0
- {dwani-0.1.18 → dwani-0.1.19}/setup.cfg +0 -0
@@ -42,7 +42,8 @@ def asr_transcribe(client, file_path, language):
|
|
42
42
|
resp = requests.post(
|
43
43
|
f"{client.api_base}/v1/transcribe/?language={api_language}",
|
44
44
|
headers=client._headers(),
|
45
|
-
files=files
|
45
|
+
files=files,
|
46
|
+
timeout=90
|
46
47
|
)
|
47
48
|
if resp.status_code != 200:
|
48
49
|
raise DwaniAPIError(resp)
|
@@ -12,7 +12,8 @@ def audio_speech(client, input, response_format="mp3", output_file=None, languag
|
|
12
12
|
headers={**client._headers(), "accept": "application/json"},
|
13
13
|
params=params,
|
14
14
|
data='', # Empty body, as in the curl example
|
15
|
-
stream=True
|
15
|
+
stream=True,
|
16
|
+
timeout=90
|
16
17
|
)
|
17
18
|
if resp.status_code != 200:
|
18
19
|
raise DwaniAPIError(resp)
|
@@ -46,7 +46,8 @@ def chat_direct(client, prompt, model="gemma3", system_prompt=""):
|
|
46
46
|
resp = requests.post(
|
47
47
|
url,
|
48
48
|
headers={**client._headers(), "Content-Type": "application/json"},
|
49
|
-
json=payload
|
49
|
+
json=payload,
|
50
|
+
timeout=90
|
50
51
|
)
|
51
52
|
if resp.status_code != 200:
|
52
53
|
raise DwaniAPIError(resp)
|
@@ -72,7 +73,8 @@ def chat_create(client, prompt, src_lang, tgt_lang, model="gemma3"):
|
|
72
73
|
resp = requests.post(
|
73
74
|
url,
|
74
75
|
headers={**client._headers(), "Content-Type": "application/json"},
|
75
|
-
json=payload
|
76
|
+
json=payload,
|
77
|
+
timeout=90
|
76
78
|
)
|
77
79
|
if resp.status_code != 200:
|
78
80
|
raise DwaniAPIError(resp)
|
@@ -56,7 +56,7 @@ def document_ocr_all(client, file_path, model="gemma3"):
|
|
56
56
|
headers=client._headers(),
|
57
57
|
files=files,
|
58
58
|
data=data,
|
59
|
-
timeout=
|
59
|
+
timeout=90
|
60
60
|
)
|
61
61
|
resp.raise_for_status()
|
62
62
|
except requests.RequestException as e:
|
@@ -85,7 +85,7 @@ def document_ocr_number(client, file_path, page_number, model="gemma3"):
|
|
85
85
|
headers=client._headers(),
|
86
86
|
files=files,
|
87
87
|
params=params,
|
88
|
-
timeout=
|
88
|
+
timeout=90
|
89
89
|
)
|
90
90
|
resp.raise_for_status()
|
91
91
|
except requests.RequestException as e:
|
@@ -124,7 +124,7 @@ def document_summarize(client, file_path, page_number=1, src_lang="eng_Latn", tg
|
|
124
124
|
headers=headers,
|
125
125
|
files=files,
|
126
126
|
data=data,
|
127
|
-
timeout=
|
127
|
+
timeout=90
|
128
128
|
)
|
129
129
|
resp.raise_for_status()
|
130
130
|
except requests.RequestException as e:
|
@@ -165,7 +165,7 @@ def extract(client, file_path, page_number=1, src_lang="eng_Latn", tgt_lang="kan
|
|
165
165
|
headers=headers,
|
166
166
|
files=files,
|
167
167
|
data=data,
|
168
|
-
timeout=
|
168
|
+
timeout=90
|
169
169
|
)
|
170
170
|
resp.raise_for_status()
|
171
171
|
except requests.RequestException as e:
|
@@ -217,7 +217,7 @@ def doc_query(
|
|
217
217
|
headers=headers,
|
218
218
|
files=files,
|
219
219
|
data=data,
|
220
|
-
timeout=
|
220
|
+
timeout=90
|
221
221
|
)
|
222
222
|
resp.raise_for_status()
|
223
223
|
except requests.RequestException as e:
|
@@ -269,7 +269,7 @@ def doc_query_kannada(
|
|
269
269
|
headers=headers,
|
270
270
|
files=files,
|
271
271
|
data=data,
|
272
|
-
timeout=
|
272
|
+
timeout=90
|
273
273
|
)
|
274
274
|
resp.raise_for_status()
|
275
275
|
except requests.RequestException as e:
|
@@ -66,7 +66,8 @@ def run_translate(client, sentences, src_lang, tgt_lang):
|
|
66
66
|
resp = requests.post(
|
67
67
|
url,
|
68
68
|
headers={**client._headers(), "Content-Type": "application/json", "accept": "application/json"},
|
69
|
-
json=payload
|
69
|
+
json=payload,
|
70
|
+
timeout=90
|
70
71
|
)
|
71
72
|
if resp.status_code != 200:
|
72
73
|
raise DwaniAPIError(resp)
|
@@ -52,7 +52,8 @@ def vision_direct(client, file_path, query="describe this image", model="gemma3"
|
|
52
52
|
url,
|
53
53
|
headers=headers,
|
54
54
|
files=files,
|
55
|
-
data=data
|
55
|
+
data=data,
|
56
|
+
timeout=90
|
56
57
|
)
|
57
58
|
if resp.status_code != 200:
|
58
59
|
raise DwaniAPIError(resp)
|
@@ -84,7 +85,8 @@ def vision_caption(client, file_path, query="describe the image", src_lang="eng_
|
|
84
85
|
url,
|
85
86
|
headers=headers,
|
86
87
|
files=files,
|
87
|
-
data=data
|
88
|
+
data=data,
|
89
|
+
timeout=90
|
88
90
|
)
|
89
91
|
if resp.status_code != 200:
|
90
92
|
raise DwaniAPIError(resp)
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
5
5
|
[project]
|
6
6
|
name = "dwani"
|
7
7
|
|
8
|
-
version = "0.1.
|
8
|
+
version = "0.1.19"
|
9
9
|
description = "Multimodal API for Indian + European languages (Chat, Vision, TTS, ASR, Translate, Docs)"
|
10
10
|
authors = [
|
11
11
|
{ name="sachin", email="python@dwani.ai" }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|