@@ -168,9 +168,9 @@ export namespace QueryTopSnippetsResponse {
168168 */
169169 export interface Result {
170170 /**
171- * If requested, this contains the full string content of this snippet.
171+ * The full string content of this snippet.
172172 */
173- content : string | null ;
173+ content : string ;
174174
175175 /**
176176 * The end index of this snippet.
@@ -214,8 +214,7 @@ export interface QueryTopDocumentsParams {
214214 k : number ;
215215
216216 /**
217- * The natural language query to search with. This cannot exceed 4096 characters (A
218- * single UTF-8 codepoint, is considered to be 1 character).
217+ * The natural language query to search with. This cannot exceed 4096 UTF-8 bytes.
219218 */
220219 query : string ;
221220
@@ -239,6 +238,13 @@ export interface QueryTopDocumentsParams {
239238 * result quality.
240239 */
241240 latency_mode ?: 'low' | 'high' ;
241+
242+ /**
243+ * The reranker to use after initial retrieval. The default is `null`. You can find
244+ * available model ids along with more information at
245+ * [/models/rerank](/api-reference/models/rerank).
246+ */
247+ reranker ?: string | null ;
242248}
243249
244250export interface QueryTopPagesParams {
@@ -249,14 +255,13 @@ export interface QueryTopPagesParams {
249255
250256 /**
251257 * The number of pages to return. If there are not enough pages matching your
252- * filters, then fewer may be returned. This number must be between 1 and 2048 ,
258+ * filters, then fewer may be returned. This number must be between 1 and 1024 ,
253259 * inclusive.
254260 */
255261 k : number ;
256262
257263 /**
258- * The natural language query to search with. This cannot exceed 4096 characters (A
259- * single UTF-8 codepoint, is considered to be 1 character).
264+ * The natural language query to search with. This cannot exceed 4096 UTF-8 bytes.
260265 */
261266 query : string ;
262267
@@ -289,7 +294,7 @@ export interface QueryTopSnippetsParams {
289294
290295 /**
291296 * The number of snippets to return. If there are not enough snippets matching your
292- * filters, then fewer may be returned. This number must be between 1 and 2048 ,
297+ * filters, then fewer may be returned. This number must be between 1 and 128 ,
293298 * inclusive.
294299 */
295300 k : number ;
@@ -313,22 +318,20 @@ export interface QueryTopSnippetsParams {
313318 */
314319 include_document_metadata ?: boolean ;
315320
316- /**
317- * Note that for Top K Snippets, only latency_mode "low" is available. This option
318- * selects between our latency modes. The higher latency mode takes longer, but can
319- * allow for more accurate responses. If desired, test both to customize your
320- * search experience for your particular use-case, or use the default of "low" and
321- * only swap if you need an additional improvement in search result quality.
322- */
323- latency_mode ?: 'low' ;
324-
325321 /**
326322 * Enable precise responses. Precise responses will have higher latency, but
327323 * provide much more precise snippets. When `precise_responses` is set to `true`,
328324 * the responses will average 200 characters. If set to `false`, the responses will
329325 * average 2000 characters. The default is `false`.
330326 */
331327 precise_responses ?: boolean ;
328+
329+ /**
330+ * The reranker to use after initial retrieval. The default is `null`. You can find
331+ * available model ids, along with more information, at
332+ * [/models/rerank](/api-reference/models/rerank).
333+ */
334+ reranker ?: string | null ;
332335}
333336
334337export declare namespace Queries {
0 commit comments