File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -106,18 +106,6 @@ def search(
106106 score_threshold : Optional [float ] = None ,
107107 dynamic_score_percentage : Optional [float ] = None ,
108108 ) -> SearchResult :
109- if search_type == SearchType .llm :
110- search_data = self ._connection .post (
111- path = f"{ ApiPath .collection } /{ self .id } /{ ApiPath .search } /{ ApiPath .title } " ,
112- data = {
113- "query" : query ,
114- "search_type" : search_type ,
115- },
116- )
117- return [
118- Video (self ._connection , ** result .get ("video" )) for result in search_data
119- ]
120-
121109 search = SearchFactory (self ._connection ).get_search (search_type )
122110 return search .search_inside_collection (
123111 collection_id = self .id ,
@@ -129,6 +117,18 @@ def search(
129117 dynamic_score_percentage = dynamic_score_percentage ,
130118 )
131119
120+ def search_title (self , query ) -> List [Video ]:
121+ search_data = self ._connection .post (
122+ path = f"{ ApiPath .collection } /{ self .id } /{ ApiPath .search } /{ ApiPath .title } " ,
123+ data = {
124+ "query" : query ,
125+ "search_type" : SearchType .llm ,
126+ },
127+ )
128+ return [
129+ Video (self ._connection , ** result .get ("video" )) for result in search_data
130+ ]
131+
132132 def upload (
133133 self ,
134134 file_path : str = None ,
You can’t perform that action at this time.
0 commit comments