@@ -56,6 +56,7 @@ def execute(
5656 include_summary : bool | NotGiven = NOT_GIVEN ,
5757 limit : int | NotGiven = NOT_GIVEN ,
5858 only_matching_chunks : bool | NotGiven = NOT_GIVEN ,
59+ rerank : bool | NotGiven = NOT_GIVEN ,
5960 rewrite_query : bool | NotGiven = NOT_GIVEN ,
6061 user_id : str | NotGiven = NOT_GIVEN ,
6162 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -95,6 +96,9 @@ def execute(
9596 previous and next chunk to provide more context for LLMs. If you only want the
9697 matching chunk, set this to true.
9798
99+ rerank: If true, rerank the results based on the query. This is helpful if you want to
100+ ensure the most relevant results are returned.
101+
98102 rewrite_query: If true, rewrites the query to make it easier to find documents. This increases
99103 the latency by about 400ms
100104
@@ -122,6 +126,7 @@ def execute(
122126 "include_summary" : include_summary ,
123127 "limit" : limit ,
124128 "only_matching_chunks" : only_matching_chunks ,
129+ "rerank" : rerank ,
125130 "rewrite_query" : rewrite_query ,
126131 "user_id" : user_id ,
127132 },
@@ -166,6 +171,7 @@ async def execute(
166171 include_summary : bool | NotGiven = NOT_GIVEN ,
167172 limit : int | NotGiven = NOT_GIVEN ,
168173 only_matching_chunks : bool | NotGiven = NOT_GIVEN ,
174+ rerank : bool | NotGiven = NOT_GIVEN ,
169175 rewrite_query : bool | NotGiven = NOT_GIVEN ,
170176 user_id : str | NotGiven = NOT_GIVEN ,
171177 # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -205,6 +211,9 @@ async def execute(
205211 previous and next chunk to provide more context for LLMs. If you only want the
206212 matching chunk, set this to true.
207213
214+ rerank: If true, rerank the results based on the query. This is helpful if you want to
215+ ensure the most relevant results are returned.
216+
208217 rewrite_query: If true, rewrites the query to make it easier to find documents. This increases
209218 the latency by about 400ms
210219
@@ -232,6 +241,7 @@ async def execute(
232241 "include_summary" : include_summary ,
233242 "limit" : limit ,
234243 "only_matching_chunks" : only_matching_chunks ,
244+ "rerank" : rerank ,
235245 "rewrite_query" : rewrite_query ,
236246 "user_id" : user_id ,
237247 },
0 commit comments