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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: most-client
3
- Version: 1.0.22
3
+ Version: 1.0.23
4
4
  Summary: Most AI API for https://the-most.ai
5
5
  Home-page: https://github.com/the-most-ai/most-client
6
6
  Author: George Kasparyants
@@ -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})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: most-client
3
- Version: 1.0.22
3
+ Version: 1.0.23
4
4
  Summary: Most AI API for https://the-most.ai
5
5
  Home-page: https://github.com/the-most-ai/most-client
6
6
  Author: George Kasparyants
@@ -8,7 +8,7 @@ with open('requirements.txt', 'r') as f:
8
8
 
9
9
  setup(
10
10
  name='most-client',
11
- version='1.0.22',
11
+ version='1.0.23',
12
12
  python_requires=f'>=3.6',
13
13
  description='Most AI API for https://the-most.ai',
14
14
  url='https://github.com/the-most-ai/most-client',
File without changes
File without changes
File without changes
File without changes