diff --git a/videodb/__about__.py b/videodb/__about__.py index f7bd32b..4189509 100644 --- a/videodb/__about__.py +++ b/videodb/__about__.py @@ -1,7 +1,7 @@ """ About information for videodb sdk""" -__version__ = "0.2.5" +__version__ = "0.2.6" __title__ = "videodb" __author__ = "videodb" __email__ = "contact@videodb.io" diff --git a/videodb/_constants.py b/videodb/_constants.py index 0f469c6..b5eab1c 100644 --- a/videodb/_constants.py +++ b/videodb/_constants.py @@ -15,6 +15,7 @@ class SearchType: semantic = "semantic" keyword = "keyword" scene = "scene" + llm = "llm" class IndexType: @@ -68,6 +69,7 @@ class ApiPath: describe = "describe" storage = "storage" download = "download" + title = "title" class Status: diff --git a/videodb/collection.py b/videodb/collection.py index b610009..db45f24 100644 --- a/videodb/collection.py +++ b/videodb/collection.py @@ -117,6 +117,19 @@ def search( dynamic_score_percentage=dynamic_score_percentage, ) + def search_title(self, query) -> List[Video]: + search_data = self._connection.post( + path=f"{ApiPath.collection}/{self.id}/{ApiPath.search}/{ApiPath.title}", + data={ + "query": query, + "search_type": SearchType.llm, + }, + ) + return [ + {"video": Video(self._connection, **result.get("video"))} + for result in search_data + ] + def upload( self, file_path: str = None,