most-client 1.0.44__tar.gz → 1.0.45__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.
Files changed (27) hide show
  1. {most_client-1.0.44/most_client.egg-info → most_client-1.0.45}/PKG-INFO +1 -1
  2. {most_client-1.0.44 → most_client-1.0.45}/most/api.py +8 -0
  3. {most_client-1.0.44 → most_client-1.0.45}/most/async_api.py +8 -0
  4. {most_client-1.0.44 → most_client-1.0.45/most_client.egg-info}/PKG-INFO +1 -1
  5. {most_client-1.0.44 → most_client-1.0.45}/setup.py +1 -1
  6. {most_client-1.0.44 → most_client-1.0.45}/MANIFEST.in +0 -0
  7. {most_client-1.0.44 → most_client-1.0.45}/README.md +0 -0
  8. {most_client-1.0.44 → most_client-1.0.45}/most/__init__.py +0 -0
  9. {most_client-1.0.44 → most_client-1.0.45}/most/_constrants.py +0 -0
  10. {most_client-1.0.44 → most_client-1.0.45}/most/async_catalog.py +0 -0
  11. {most_client-1.0.44 → most_client-1.0.45}/most/async_glossary.py +0 -0
  12. {most_client-1.0.44 → most_client-1.0.45}/most/async_searcher.py +0 -0
  13. {most_client-1.0.44 → most_client-1.0.45}/most/async_trainer_api.py +0 -0
  14. {most_client-1.0.44 → most_client-1.0.45}/most/catalog.py +0 -0
  15. {most_client-1.0.44 → most_client-1.0.45}/most/glossary.py +0 -0
  16. {most_client-1.0.44 → most_client-1.0.45}/most/score_calculation.py +0 -0
  17. {most_client-1.0.44 → most_client-1.0.45}/most/search_types.py +0 -0
  18. {most_client-1.0.44 → most_client-1.0.45}/most/searcher.py +0 -0
  19. {most_client-1.0.44 → most_client-1.0.45}/most/trainer_api.py +0 -0
  20. {most_client-1.0.44 → most_client-1.0.45}/most/types.py +0 -0
  21. {most_client-1.0.44 → most_client-1.0.45}/most_client.egg-info/SOURCES.txt +0 -0
  22. {most_client-1.0.44 → most_client-1.0.45}/most_client.egg-info/dependency_links.txt +0 -0
  23. {most_client-1.0.44 → most_client-1.0.45}/most_client.egg-info/requires.txt +0 -0
  24. {most_client-1.0.44 → most_client-1.0.45}/most_client.egg-info/top_level.txt +0 -0
  25. {most_client-1.0.44 → most_client-1.0.45}/most_client.egg-info/zip-safe +0 -0
  26. {most_client-1.0.44 → most_client-1.0.45}/requirements.txt +0 -0
  27. {most_client-1.0.44 → most_client-1.0.45}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: most-client
3
- Version: 1.0.44
3
+ Version: 1.0.45
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
@@ -454,6 +454,14 @@ class MostClient(object):
454
454
  raise RuntimeError("Audio can't be indexed")
455
455
  return None
456
456
 
457
+ def search_by_indexed_audio(self, query: str, limit: int) -> List:
458
+ resp = self.get(f"/{self.client_id}/model/{self.model_id}/search_elastic",
459
+ params={"query": query,
460
+ "limit": limit})
461
+ if resp.status_code >= 400:
462
+ raise RuntimeError("Audio can't be indexed")
463
+ return resp.json()
464
+
457
465
  def get_usage(self,
458
466
  start_dt: datetime,
459
467
  end_dt: datetime):
@@ -462,6 +462,14 @@ class AsyncMostClient(object):
462
462
  raise RuntimeError("Audio can't be indexed")
463
463
  return None
464
464
 
465
+ async def search_by_indexed_audio(self, query: str, limit: int) -> List:
466
+ resp = await self.get(f"/{self.client_id}/model/{self.model_id}/search_elastic",
467
+ params={"query": query,
468
+ "limit": limit})
469
+ if resp.status_code >= 400:
470
+ raise RuntimeError("Audio can't be indexed")
471
+ return resp.json()
472
+
465
473
  async def get_usage(self,
466
474
  start_dt: datetime,
467
475
  end_dt: datetime):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: most-client
3
- Version: 1.0.44
3
+ Version: 1.0.45
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.44',
11
+ version='1.0.45',
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