most-client 1.0.22__tar.gz → 1.0.23__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.
- {most_client-1.0.22/most_client.egg-info → most_client-1.0.23}/PKG-INFO +1 -1
- {most_client-1.0.22 → most_client-1.0.23}/most/api.py +6 -1
- {most_client-1.0.22 → most_client-1.0.23}/most/async_api.py +6 -1
- {most_client-1.0.22 → most_client-1.0.23/most_client.egg-info}/PKG-INFO +1 -1
- {most_client-1.0.22 → most_client-1.0.23}/setup.py +1 -1
- {most_client-1.0.22 → most_client-1.0.23}/MANIFEST.in +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/README.md +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most/__init__.py +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most/score_calculation.py +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most/types.py +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most_client.egg-info/SOURCES.txt +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most_client.egg-info/dependency_links.txt +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most_client.egg-info/requires.txt +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most_client.egg-info/top_level.txt +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/most_client.egg-info/zip-safe +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/requirements.txt +0 -0
- {most_client-1.0.22 → most_client-1.0.23}/setup.cfg +0 -0
@@ -18,7 +18,7 @@ from most.types import (
|
|
18
18
|
Script,
|
19
19
|
StoredAudioData,
|
20
20
|
Text,
|
21
|
-
is_valid_id, SearchParams, ScriptScoreMapping,
|
21
|
+
is_valid_id, SearchParams, ScriptScoreMapping, Dialog,
|
22
22
|
)
|
23
23
|
|
24
24
|
|
@@ -144,6 +144,11 @@ class MostClient(object):
|
|
144
144
|
files={"text": text})
|
145
145
|
return self.retort.load(resp.json(), Text)
|
146
146
|
|
147
|
+
def upload_dialog(self, dialog: Dialog) -> DialogResult:
|
148
|
+
resp = self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_dialog",
|
149
|
+
json={"dialog": dialog})
|
150
|
+
return self.retort.load(resp.json(), DialogResult)
|
151
|
+
|
147
152
|
def upload_audio(self, audio_path) -> Audio:
|
148
153
|
with open(audio_path, 'rb') as f:
|
149
154
|
resp = self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload",
|
@@ -18,7 +18,7 @@ from most.types import (
|
|
18
18
|
Script,
|
19
19
|
StoredAudioData,
|
20
20
|
Text,
|
21
|
-
is_valid_id, SearchParams, ScriptScoreMapping,
|
21
|
+
is_valid_id, SearchParams, ScriptScoreMapping, Dialog,
|
22
22
|
)
|
23
23
|
|
24
24
|
|
@@ -170,6 +170,11 @@ class AsyncMostClient(object):
|
|
170
170
|
json={"text": text})
|
171
171
|
return self.retort.load(resp.json(), Text)
|
172
172
|
|
173
|
+
async def upload_dialog(self, dialog: Dialog) -> DialogResult:
|
174
|
+
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_dialog",
|
175
|
+
json={"dialog": dialog})
|
176
|
+
return self.retort.load(resp.json(), DialogResult)
|
177
|
+
|
173
178
|
async def upload_audio_url(self, audio_url) -> Audio:
|
174
179
|
resp = await self.post(f"https://api.the-most.ai/api/external/{self.client_id}/upload_url",
|
175
180
|
json={"audio_url": audio_url})
|
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
|