You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clients/ts-sdk/openapi.json
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1297,7 +1297,7 @@
1297
1297
"Chunk"
1298
1298
],
1299
1299
"summary": "Search",
1300
-
"description": "This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b><mark>` tags for sub-sentence highlighting.",
1300
+
"description": "This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<mark><b>` or custom specified tags for sub-sentence highlighting.",
1301
1301
"operationId": "search_chunks",
1302
1302
"parameters": [
1303
1303
{
@@ -9634,7 +9634,7 @@
9634
9634
},
9635
9635
"highlight_results": {
9636
9636
"type": "boolean",
9637
-
"description": "Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits.",
9637
+
"description": "Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<mark><b>` tags to the chunk_html of the chunks to highlight matching splits.",
9638
9638
"nullable": true
9639
9639
},
9640
9640
"image_config": {
@@ -10221,7 +10221,7 @@
10221
10221
},
10222
10222
"highlight_results": {
10223
10223
"type": "boolean",
10224
-
"description": "Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response.",
10224
+
"description": "Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<mark><b>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response.",
10225
10225
"nullable": true
10226
10226
},
10227
10227
"highlight_strategy": {
@@ -10244,6 +10244,16 @@
10244
10244
"description": "Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response's highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once. This parameter can be overriden to respect the highlight_max_length param.",
10245
10245
"nullable": true,
10246
10246
"minimum": 0
10247
+
},
10248
+
"post_tag": {
10249
+
"type": "string",
10250
+
"description": "Custom html tag which should appear after highlights. If not specified, this defaults to '</mark></b>'.",
10251
+
"nullable": true
10252
+
},
10253
+
"pre_tag": {
10254
+
"type": "string",
10255
+
"description": "Custom html tag which should appear before highlights. If not specified, this defaults to '<mark><b>'.",
Copy file name to clipboardExpand all lines: clients/ts-sdk/src/types.gen.ts
+10-2Lines changed: 10 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1152,7 +1152,7 @@ export type GenerateOffChunksReqPayload = {
1152
1152
*/
1153
1153
frequency_penalty?: (number)|null;
1154
1154
/**
1155
-
* Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits.
1155
+
* Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<mark><b>` tags to the chunk_html of the chunks to highlight matching splits.
1156
1156
*/
1157
1157
highlight_results?: (boolean)|null;
1158
1158
image_config?: ((ImageConfig)|null);
@@ -1351,7 +1351,7 @@ export type HighlightOptions = {
1351
1351
*/
1352
1352
highlight_max_num?: (number)|null;
1353
1353
/**
1354
-
* Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response.
1354
+
* Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<mark><b>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response.
1355
1355
*/
1356
1356
highlight_results?: (boolean)|null;
1357
1357
highlight_strategy?: ((HighlightStrategy)|null);
@@ -1363,6 +1363,14 @@ export type HighlightOptions = {
1363
1363
* Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response's highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once. This parameter can be overriden to respect the highlight_max_length param.
1364
1364
*/
1365
1365
highlight_window?: (number)|null;
1366
+
/**
1367
+
* Custom html tag which should appear after highlights. If not specified, this defaults to '</mark></b>'.
1368
+
*/
1369
+
post_tag?: (string)|null;
1370
+
/**
1371
+
* Custom html tag which should appear before highlights. If not specified, this defaults to '<mark><b>'.
/// Highlight Options lets you specify different methods to highlight the chunks in the result set. If not specified, this defaults to the score of the chunks.
5850
5850
pubstructHighlightOptions{
5851
-
/// Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response.
5851
+
/// Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<mark><b>` tags to the chunk_html of the chunks to highlight matching splits and return the highlights on each scored chunk in the response.
5852
5852
pubhighlight_results:Option<bool>,
5853
5853
/// Set highlight_exact_match to true to highlight exact matches from your query.
/// Set highlight_window to a number to control the amount of words that are returned around the matched phrases. If not specified, this defaults to 0. This is useful for when you want to show more context around the matched words. When specified, window/2 whitespace separated words are added before and after each highlight in the response's highlights array. If an extended highlight overlaps with another highlight, the overlapping words are only included once. This parameter can be overriden to respect the highlight_max_length param.
5864
5864
pubhighlight_window:Option<u32>,
5865
+
/// Custom html tag which should appear before highlights. If not specified, this defaults to '<mark><b>'.
5866
+
pubpre_tag:Option<String>,
5867
+
/// Custom html tag which should appear after highlights. If not specified, this defaults to '</mark></b>'.
Copy file name to clipboardExpand all lines: server/src/handlers/chunk_handler.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1138,7 +1138,7 @@ pub fn parse_query(
1138
1138
1139
1139
/// Search
1140
1140
///
1141
-
/// This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<b><mark>` tags for sub-sentence highlighting.
1141
+
/// This route provides the primary search functionality for the API. It can be used to search for chunks by semantic similarity, full-text similarity, or a combination of both. Results' `chunk_html` values will be modified with `<mark><b>` or custom specified tags for sub-sentence highlighting.
/// Whether or not to stream the response. If this is set to true or not included, the response will be a stream. If this is set to false, the response will be a normal JSON response. Default is true.
2333
2333
pubstream_response:Option<bool>,
2334
-
/// Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<b><mark>` tags to the chunk_html of the chunks to highlight matching splits.
2334
+
/// Set highlight_results to false for a slight latency improvement (1-10ms). If not specified, this defaults to true. This will add `<mark><b>` tags to the chunk_html of the chunks to highlight matching splits.
2335
2335
pubhighlight_results:Option<bool>,
2336
2336
/// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. Default is 0.5.
0 commit comments