File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ class SearchType:
1515 semantic = "semantic"
1616 keyword = "keyword"
1717 scene = "scene"
18+ llm = "llm"
1819
1920
2021class IndexType :
@@ -68,6 +69,7 @@ class ApiPath:
6869 describe = "describe"
6970 storage = "storage"
7071 download = "download"
72+ title = "title"
7173
7274
7375class Status :
Original file line number Diff line number Diff line change @@ -106,6 +106,18 @@ 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+
109121 search = SearchFactory (self ._connection ).get_search (search_type )
110122 return search .search_inside_collection (
111123 collection_id = self .id ,
You can’t perform that action at this time.
0 commit comments