@knowledge-stack/ksapi 1.70.3 → 1.71.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +2 -0
- package/README.md +3 -2
- package/dist/apis/ChunksApi.d.ts +4 -4
- package/dist/apis/ChunksApi.js +2 -2
- package/dist/esm/apis/ChunksApi.d.ts +4 -4
- package/dist/esm/apis/ChunksApi.js +2 -2
- package/dist/esm/models/ChunkSearchRequest.d.ts +20 -1
- package/dist/esm/models/ChunkSearchRequest.js +7 -0
- package/dist/esm/models/HybridSearchProfile.d.ts +26 -0
- package/dist/esm/models/HybridSearchProfile.js +44 -0
- package/dist/esm/models/ScoredChunkResponse.d.ts +2 -2
- package/dist/esm/models/SearchType.d.ts +1 -0
- package/dist/esm/models/SearchType.js +2 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/ChunkSearchRequest.d.ts +20 -1
- package/dist/models/ChunkSearchRequest.js +7 -0
- package/dist/models/HybridSearchProfile.d.ts +26 -0
- package/dist/models/HybridSearchProfile.js +52 -0
- package/dist/models/ScoredChunkResponse.d.ts +2 -2
- package/dist/models/SearchType.d.ts +1 -0
- package/dist/models/SearchType.js +2 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/ChunkSearchRequest.md +7 -1
- package/docs/ChunksApi.md +1 -1
- package/docs/HybridSearchProfile.md +33 -0
- package/docs/ScoredChunkResponse.md +1 -1
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +4 -4
- package/src/models/ChunkSearchRequest.ts +32 -1
- package/src/models/HybridSearchProfile.ts +54 -0
- package/src/models/ScoredChunkResponse.ts +2 -2
- package/src/models/SearchType.ts +2 -1
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -76,6 +76,7 @@ docs/GroupPermissionResponse.md
|
|
|
76
76
|
docs/GroupResponse.md
|
|
77
77
|
docs/HTTPValidationError.md
|
|
78
78
|
docs/HealthCheckResponse.md
|
|
79
|
+
docs/HybridSearchProfile.md
|
|
79
80
|
docs/IdpConfig.md
|
|
80
81
|
docs/IdpType.md
|
|
81
82
|
docs/ImageTaxonomy.md
|
|
@@ -296,6 +297,7 @@ src/models/GroupPermissionResponse.ts
|
|
|
296
297
|
src/models/GroupResponse.ts
|
|
297
298
|
src/models/HTTPValidationError.ts
|
|
298
299
|
src/models/HealthCheckResponse.ts
|
|
300
|
+
src/models/HybridSearchProfile.ts
|
|
299
301
|
src/models/IdpConfig.ts
|
|
300
302
|
src/models/IdpType.ts
|
|
301
303
|
src/models/ImageTaxonomy.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.71.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -255,6 +255,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
255
255
|
- [GroupResponse](docs/GroupResponse.md)
|
|
256
256
|
- [HTTPValidationError](docs/HTTPValidationError.md)
|
|
257
257
|
- [HealthCheckResponse](docs/HealthCheckResponse.md)
|
|
258
|
+
- [HybridSearchProfile](docs/HybridSearchProfile.md)
|
|
258
259
|
- [IdpConfig](docs/IdpConfig.md)
|
|
259
260
|
- [IdpType](docs/IdpType.md)
|
|
260
261
|
- [ImageTaxonomy](docs/ImageTaxonomy.md)
|
|
@@ -385,7 +386,7 @@ and is automatically generated by the
|
|
|
385
386
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
386
387
|
|
|
387
388
|
- API version: `0.1.0`
|
|
388
|
-
- Package version: `1.
|
|
389
|
+
- Package version: `1.71.0`
|
|
389
390
|
- Generator version: `7.21.0`
|
|
390
391
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
391
392
|
|
package/dist/apis/ChunksApi.d.ts
CHANGED
|
@@ -237,7 +237,7 @@ export interface ChunksApiInterface {
|
|
|
237
237
|
*/
|
|
238
238
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
239
239
|
/**
|
|
240
|
-
* Search over chunks using dense vector
|
|
240
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
241
241
|
* @summary Search Chunks Handler
|
|
242
242
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
243
243
|
* @param {string} [authorization]
|
|
@@ -248,7 +248,7 @@ export interface ChunksApiInterface {
|
|
|
248
248
|
*/
|
|
249
249
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
250
250
|
/**
|
|
251
|
-
* Search over chunks using dense vector
|
|
251
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
252
252
|
* Search Chunks Handler
|
|
253
253
|
*/
|
|
254
254
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -400,12 +400,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
|
|
|
400
400
|
*/
|
|
401
401
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
402
402
|
/**
|
|
403
|
-
* Search over chunks using dense vector
|
|
403
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
404
404
|
* Search Chunks Handler
|
|
405
405
|
*/
|
|
406
406
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
407
407
|
/**
|
|
408
|
-
* Search over chunks using dense vector
|
|
408
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
409
409
|
* Search Chunks Handler
|
|
410
410
|
*/
|
|
411
411
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
package/dist/apis/ChunksApi.js
CHANGED
|
@@ -364,7 +364,7 @@ class ChunksApi extends runtime.BaseAPI {
|
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
/**
|
|
367
|
-
* Search over chunks using dense vector
|
|
367
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
368
368
|
* Search Chunks Handler
|
|
369
369
|
*/
|
|
370
370
|
searchChunksRaw(requestParameters, initOverrides) {
|
|
@@ -375,7 +375,7 @@ class ChunksApi extends runtime.BaseAPI {
|
|
|
375
375
|
});
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
|
-
* Search over chunks using dense vector
|
|
378
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
379
379
|
* Search Chunks Handler
|
|
380
380
|
*/
|
|
381
381
|
searchChunks(requestParameters, initOverrides) {
|
|
@@ -237,7 +237,7 @@ export interface ChunksApiInterface {
|
|
|
237
237
|
*/
|
|
238
238
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
239
239
|
/**
|
|
240
|
-
* Search over chunks using dense vector
|
|
240
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
241
241
|
* @summary Search Chunks Handler
|
|
242
242
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
243
243
|
* @param {string} [authorization]
|
|
@@ -248,7 +248,7 @@ export interface ChunksApiInterface {
|
|
|
248
248
|
*/
|
|
249
249
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
250
250
|
/**
|
|
251
|
-
* Search over chunks using dense vector
|
|
251
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
252
252
|
* Search Chunks Handler
|
|
253
253
|
*/
|
|
254
254
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -400,12 +400,12 @@ export declare class ChunksApi extends runtime.BaseAPI implements ChunksApiInter
|
|
|
400
400
|
*/
|
|
401
401
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
402
402
|
/**
|
|
403
|
-
* Search over chunks using dense vector
|
|
403
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
404
404
|
* Search Chunks Handler
|
|
405
405
|
*/
|
|
406
406
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
407
407
|
/**
|
|
408
|
-
* Search over chunks using dense vector
|
|
408
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
409
409
|
* Search Chunks Handler
|
|
410
410
|
*/
|
|
411
411
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -328,7 +328,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
330
|
/**
|
|
331
|
-
* Search over chunks using dense vector
|
|
331
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
332
332
|
* Search Chunks Handler
|
|
333
333
|
*/
|
|
334
334
|
searchChunksRaw(requestParameters, initOverrides) {
|
|
@@ -339,7 +339,7 @@ export class ChunksApi extends runtime.BaseAPI {
|
|
|
339
339
|
});
|
|
340
340
|
}
|
|
341
341
|
/**
|
|
342
|
-
* Search over chunks using dense vector
|
|
342
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
343
343
|
* Search Chunks Handler
|
|
344
344
|
*/
|
|
345
345
|
searchChunks(requestParameters, initOverrides) {
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { HybridSearchProfile } from './HybridSearchProfile';
|
|
12
13
|
import type { ChunkType } from './ChunkType';
|
|
13
14
|
import type { SearchType } from './SearchType';
|
|
14
15
|
/**
|
|
15
|
-
* Request body for chunk search (dense vector
|
|
16
|
+
* Request body for chunk search (dense vector, full-text BM25, or hybrid).
|
|
16
17
|
* @export
|
|
17
18
|
* @interface ChunkSearchRequest
|
|
18
19
|
*/
|
|
@@ -29,6 +30,24 @@ export interface ChunkSearchRequest {
|
|
|
29
30
|
* @memberof ChunkSearchRequest
|
|
30
31
|
*/
|
|
31
32
|
searchType?: SearchType;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {HybridSearchProfile}
|
|
36
|
+
* @memberof ChunkSearchRequest
|
|
37
|
+
*/
|
|
38
|
+
hybridProfile?: HybridSearchProfile;
|
|
39
|
+
/**
|
|
40
|
+
* Optional explicit weight for the dense branch. Must be provided together with sparse_weight and overrides hybrid_profile.
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof ChunkSearchRequest
|
|
43
|
+
*/
|
|
44
|
+
denseWeight?: number | null;
|
|
45
|
+
/**
|
|
46
|
+
* Optional explicit weight for the sparse branch. Must be provided together with dense_weight and overrides hybrid_profile.
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof ChunkSearchRequest
|
|
49
|
+
*/
|
|
50
|
+
sparseWeight?: number | null;
|
|
32
51
|
/**
|
|
33
52
|
* Path part IDs to search within (non-CHUNK types). Defaults to tenant's /shared.
|
|
34
53
|
* @type {Array<string>}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { HybridSearchProfileFromJSON, HybridSearchProfileToJSON, } from './HybridSearchProfile';
|
|
14
15
|
import { ChunkTypeFromJSON, ChunkTypeToJSON, } from './ChunkType';
|
|
15
16
|
import { SearchTypeFromJSON, SearchTypeToJSON, } from './SearchType';
|
|
16
17
|
export const ChunkSearchRequestPropertyValidationAttributesMap = {
|
|
@@ -46,6 +47,9 @@ export function ChunkSearchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
46
47
|
return {
|
|
47
48
|
'query': json['query'],
|
|
48
49
|
'searchType': json['search_type'] == null ? undefined : SearchTypeFromJSON(json['search_type']),
|
|
50
|
+
'hybridProfile': json['hybrid_profile'] == null ? undefined : HybridSearchProfileFromJSON(json['hybrid_profile']),
|
|
51
|
+
'denseWeight': json['dense_weight'] == null ? undefined : json['dense_weight'],
|
|
52
|
+
'sparseWeight': json['sparse_weight'] == null ? undefined : json['sparse_weight'],
|
|
49
53
|
'parentPathIds': json['parent_path_ids'] == null ? undefined : json['parent_path_ids'],
|
|
50
54
|
'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
|
|
51
55
|
'chunkTypes': json['chunk_types'] == null ? undefined : (json['chunk_types'].map(ChunkTypeFromJSON)),
|
|
@@ -66,6 +70,9 @@ export function ChunkSearchRequestToJSONTyped(value, ignoreDiscriminator = false
|
|
|
66
70
|
return {
|
|
67
71
|
'query': value['query'],
|
|
68
72
|
'search_type': SearchTypeToJSON(value['searchType']),
|
|
73
|
+
'hybrid_profile': HybridSearchProfileToJSON(value['hybridProfile']),
|
|
74
|
+
'dense_weight': value['denseWeight'],
|
|
75
|
+
'sparse_weight': value['sparseWeight'],
|
|
69
76
|
'parent_path_ids': value['parentPathIds'],
|
|
70
77
|
'tag_ids': value['tagIds'],
|
|
71
78
|
'chunk_types': value['chunkTypes'] == null ? undefined : (value['chunkTypes'].map(ChunkTypeToJSON)),
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Supported hybrid search weighting presets.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const HybridSearchProfile: {
|
|
17
|
+
readonly Hybrid: "hybrid";
|
|
18
|
+
readonly Dense: "dense";
|
|
19
|
+
readonly Sparse: "sparse";
|
|
20
|
+
};
|
|
21
|
+
export type HybridSearchProfile = typeof HybridSearchProfile[keyof typeof HybridSearchProfile];
|
|
22
|
+
export declare function instanceOfHybridSearchProfile(value: any): boolean;
|
|
23
|
+
export declare function HybridSearchProfileFromJSON(json: any): HybridSearchProfile;
|
|
24
|
+
export declare function HybridSearchProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): HybridSearchProfile;
|
|
25
|
+
export declare function HybridSearchProfileToJSON(value?: HybridSearchProfile | null): any;
|
|
26
|
+
export declare function HybridSearchProfileToJSONTyped(value: any, ignoreDiscriminator: boolean): HybridSearchProfile;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Supported hybrid search weighting presets.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const HybridSearchProfile = {
|
|
19
|
+
Hybrid: 'hybrid',
|
|
20
|
+
Dense: 'dense',
|
|
21
|
+
Sparse: 'sparse'
|
|
22
|
+
};
|
|
23
|
+
export function instanceOfHybridSearchProfile(value) {
|
|
24
|
+
for (const key in HybridSearchProfile) {
|
|
25
|
+
if (Object.prototype.hasOwnProperty.call(HybridSearchProfile, key)) {
|
|
26
|
+
if (HybridSearchProfile[key] === value) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
export function HybridSearchProfileFromJSON(json) {
|
|
34
|
+
return HybridSearchProfileFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function HybridSearchProfileFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
return json;
|
|
38
|
+
}
|
|
39
|
+
export function HybridSearchProfileToJSON(value) {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
export function HybridSearchProfileToJSONTyped(value, ignoreDiscriminator) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
@@ -14,7 +14,7 @@ import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
|
14
14
|
import type { ChunkType } from './ChunkType';
|
|
15
15
|
import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
|
|
16
16
|
/**
|
|
17
|
-
* Chunk response with
|
|
17
|
+
* Chunk response with search ranking score.
|
|
18
18
|
* @export
|
|
19
19
|
* @interface ScoredChunkResponse
|
|
20
20
|
*/
|
|
@@ -128,7 +128,7 @@ export interface ScoredChunkResponse {
|
|
|
128
128
|
*/
|
|
129
129
|
documentVersion?: ChunkDocumentVersionResponse;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Search ranking score returned by Qdrant
|
|
132
132
|
* @type {number}
|
|
133
133
|
* @memberof ScoredChunkResponse
|
|
134
134
|
*/
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
export declare const SearchType: {
|
|
17
17
|
readonly DenseOnly: "dense_only";
|
|
18
18
|
readonly FullText: "full_text";
|
|
19
|
+
readonly Hybrid: "hybrid";
|
|
19
20
|
};
|
|
20
21
|
export type SearchType = typeof SearchType[keyof typeof SearchType];
|
|
21
22
|
export declare function instanceOfSearchType(value: any): boolean;
|
|
@@ -62,6 +62,7 @@ export * from './GroupPermissionResponse';
|
|
|
62
62
|
export * from './GroupResponse';
|
|
63
63
|
export * from './HTTPValidationError';
|
|
64
64
|
export * from './HealthCheckResponse';
|
|
65
|
+
export * from './HybridSearchProfile';
|
|
65
66
|
export * from './IdpConfig';
|
|
66
67
|
export * from './IdpType';
|
|
67
68
|
export * from './ImageTaxonomy';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -64,6 +64,7 @@ export * from './GroupPermissionResponse';
|
|
|
64
64
|
export * from './GroupResponse';
|
|
65
65
|
export * from './HTTPValidationError';
|
|
66
66
|
export * from './HealthCheckResponse';
|
|
67
|
+
export * from './HybridSearchProfile';
|
|
67
68
|
export * from './IdpConfig';
|
|
68
69
|
export * from './IdpType';
|
|
69
70
|
export * from './ImageTaxonomy';
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { HybridSearchProfile } from './HybridSearchProfile';
|
|
12
13
|
import type { ChunkType } from './ChunkType';
|
|
13
14
|
import type { SearchType } from './SearchType';
|
|
14
15
|
/**
|
|
15
|
-
* Request body for chunk search (dense vector
|
|
16
|
+
* Request body for chunk search (dense vector, full-text BM25, or hybrid).
|
|
16
17
|
* @export
|
|
17
18
|
* @interface ChunkSearchRequest
|
|
18
19
|
*/
|
|
@@ -29,6 +30,24 @@ export interface ChunkSearchRequest {
|
|
|
29
30
|
* @memberof ChunkSearchRequest
|
|
30
31
|
*/
|
|
31
32
|
searchType?: SearchType;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {HybridSearchProfile}
|
|
36
|
+
* @memberof ChunkSearchRequest
|
|
37
|
+
*/
|
|
38
|
+
hybridProfile?: HybridSearchProfile;
|
|
39
|
+
/**
|
|
40
|
+
* Optional explicit weight for the dense branch. Must be provided together with sparse_weight and overrides hybrid_profile.
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof ChunkSearchRequest
|
|
43
|
+
*/
|
|
44
|
+
denseWeight?: number | null;
|
|
45
|
+
/**
|
|
46
|
+
* Optional explicit weight for the sparse branch. Must be provided together with dense_weight and overrides hybrid_profile.
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof ChunkSearchRequest
|
|
49
|
+
*/
|
|
50
|
+
sparseWeight?: number | null;
|
|
32
51
|
/**
|
|
33
52
|
* Path part IDs to search within (non-CHUNK types). Defaults to tenant's /shared.
|
|
34
53
|
* @type {Array<string>}
|
|
@@ -19,6 +19,7 @@ exports.ChunkSearchRequestFromJSON = ChunkSearchRequestFromJSON;
|
|
|
19
19
|
exports.ChunkSearchRequestFromJSONTyped = ChunkSearchRequestFromJSONTyped;
|
|
20
20
|
exports.ChunkSearchRequestToJSON = ChunkSearchRequestToJSON;
|
|
21
21
|
exports.ChunkSearchRequestToJSONTyped = ChunkSearchRequestToJSONTyped;
|
|
22
|
+
const HybridSearchProfile_1 = require("./HybridSearchProfile");
|
|
22
23
|
const ChunkType_1 = require("./ChunkType");
|
|
23
24
|
const SearchType_1 = require("./SearchType");
|
|
24
25
|
exports.ChunkSearchRequestPropertyValidationAttributesMap = {
|
|
@@ -54,6 +55,9 @@ function ChunkSearchRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
55
|
return {
|
|
55
56
|
'query': json['query'],
|
|
56
57
|
'searchType': json['search_type'] == null ? undefined : (0, SearchType_1.SearchTypeFromJSON)(json['search_type']),
|
|
58
|
+
'hybridProfile': json['hybrid_profile'] == null ? undefined : (0, HybridSearchProfile_1.HybridSearchProfileFromJSON)(json['hybrid_profile']),
|
|
59
|
+
'denseWeight': json['dense_weight'] == null ? undefined : json['dense_weight'],
|
|
60
|
+
'sparseWeight': json['sparse_weight'] == null ? undefined : json['sparse_weight'],
|
|
57
61
|
'parentPathIds': json['parent_path_ids'] == null ? undefined : json['parent_path_ids'],
|
|
58
62
|
'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
|
|
59
63
|
'chunkTypes': json['chunk_types'] == null ? undefined : (json['chunk_types'].map(ChunkType_1.ChunkTypeFromJSON)),
|
|
@@ -74,6 +78,9 @@ function ChunkSearchRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
74
78
|
return {
|
|
75
79
|
'query': value['query'],
|
|
76
80
|
'search_type': (0, SearchType_1.SearchTypeToJSON)(value['searchType']),
|
|
81
|
+
'hybrid_profile': (0, HybridSearchProfile_1.HybridSearchProfileToJSON)(value['hybridProfile']),
|
|
82
|
+
'dense_weight': value['denseWeight'],
|
|
83
|
+
'sparse_weight': value['sparseWeight'],
|
|
77
84
|
'parent_path_ids': value['parentPathIds'],
|
|
78
85
|
'tag_ids': value['tagIds'],
|
|
79
86
|
'chunk_types': value['chunkTypes'] == null ? undefined : (value['chunkTypes'].map(ChunkType_1.ChunkTypeToJSON)),
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Supported hybrid search weighting presets.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const HybridSearchProfile: {
|
|
17
|
+
readonly Hybrid: "hybrid";
|
|
18
|
+
readonly Dense: "dense";
|
|
19
|
+
readonly Sparse: "sparse";
|
|
20
|
+
};
|
|
21
|
+
export type HybridSearchProfile = typeof HybridSearchProfile[keyof typeof HybridSearchProfile];
|
|
22
|
+
export declare function instanceOfHybridSearchProfile(value: any): boolean;
|
|
23
|
+
export declare function HybridSearchProfileFromJSON(json: any): HybridSearchProfile;
|
|
24
|
+
export declare function HybridSearchProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): HybridSearchProfile;
|
|
25
|
+
export declare function HybridSearchProfileToJSON(value?: HybridSearchProfile | null): any;
|
|
26
|
+
export declare function HybridSearchProfileToJSONTyped(value: any, ignoreDiscriminator: boolean): HybridSearchProfile;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.HybridSearchProfile = void 0;
|
|
17
|
+
exports.instanceOfHybridSearchProfile = instanceOfHybridSearchProfile;
|
|
18
|
+
exports.HybridSearchProfileFromJSON = HybridSearchProfileFromJSON;
|
|
19
|
+
exports.HybridSearchProfileFromJSONTyped = HybridSearchProfileFromJSONTyped;
|
|
20
|
+
exports.HybridSearchProfileToJSON = HybridSearchProfileToJSON;
|
|
21
|
+
exports.HybridSearchProfileToJSONTyped = HybridSearchProfileToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Supported hybrid search weighting presets.
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.HybridSearchProfile = {
|
|
27
|
+
Hybrid: 'hybrid',
|
|
28
|
+
Dense: 'dense',
|
|
29
|
+
Sparse: 'sparse'
|
|
30
|
+
};
|
|
31
|
+
function instanceOfHybridSearchProfile(value) {
|
|
32
|
+
for (const key in exports.HybridSearchProfile) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(exports.HybridSearchProfile, key)) {
|
|
34
|
+
if (exports.HybridSearchProfile[key] === value) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
function HybridSearchProfileFromJSON(json) {
|
|
42
|
+
return HybridSearchProfileFromJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function HybridSearchProfileFromJSONTyped(json, ignoreDiscriminator) {
|
|
45
|
+
return json;
|
|
46
|
+
}
|
|
47
|
+
function HybridSearchProfileToJSON(value) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
function HybridSearchProfileToJSONTyped(value, ignoreDiscriminator) {
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
@@ -14,7 +14,7 @@ import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
|
14
14
|
import type { ChunkType } from './ChunkType';
|
|
15
15
|
import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
|
|
16
16
|
/**
|
|
17
|
-
* Chunk response with
|
|
17
|
+
* Chunk response with search ranking score.
|
|
18
18
|
* @export
|
|
19
19
|
* @interface ScoredChunkResponse
|
|
20
20
|
*/
|
|
@@ -128,7 +128,7 @@ export interface ScoredChunkResponse {
|
|
|
128
128
|
*/
|
|
129
129
|
documentVersion?: ChunkDocumentVersionResponse;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Search ranking score returned by Qdrant
|
|
132
132
|
* @type {number}
|
|
133
133
|
* @memberof ScoredChunkResponse
|
|
134
134
|
*/
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
export declare const SearchType: {
|
|
17
17
|
readonly DenseOnly: "dense_only";
|
|
18
18
|
readonly FullText: "full_text";
|
|
19
|
+
readonly Hybrid: "hybrid";
|
|
19
20
|
};
|
|
20
21
|
export type SearchType = typeof SearchType[keyof typeof SearchType];
|
|
21
22
|
export declare function instanceOfSearchType(value: any): boolean;
|
|
@@ -25,7 +25,8 @@ exports.SearchTypeToJSONTyped = SearchTypeToJSONTyped;
|
|
|
25
25
|
*/
|
|
26
26
|
exports.SearchType = {
|
|
27
27
|
DenseOnly: 'dense_only',
|
|
28
|
-
FullText: 'full_text'
|
|
28
|
+
FullText: 'full_text',
|
|
29
|
+
Hybrid: 'hybrid'
|
|
29
30
|
};
|
|
30
31
|
function instanceOfSearchType(value) {
|
|
31
32
|
for (const key in exports.SearchType) {
|
package/dist/models/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export * from './GroupPermissionResponse';
|
|
|
62
62
|
export * from './GroupResponse';
|
|
63
63
|
export * from './HTTPValidationError';
|
|
64
64
|
export * from './HealthCheckResponse';
|
|
65
|
+
export * from './HybridSearchProfile';
|
|
65
66
|
export * from './IdpConfig';
|
|
66
67
|
export * from './IdpType';
|
|
67
68
|
export * from './ImageTaxonomy';
|
package/dist/models/index.js
CHANGED
|
@@ -80,6 +80,7 @@ __exportStar(require("./GroupPermissionResponse"), exports);
|
|
|
80
80
|
__exportStar(require("./GroupResponse"), exports);
|
|
81
81
|
__exportStar(require("./HTTPValidationError"), exports);
|
|
82
82
|
__exportStar(require("./HealthCheckResponse"), exports);
|
|
83
|
+
__exportStar(require("./HybridSearchProfile"), exports);
|
|
83
84
|
__exportStar(require("./IdpConfig"), exports);
|
|
84
85
|
__exportStar(require("./IdpType"), exports);
|
|
85
86
|
__exportStar(require("./ImageTaxonomy"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# ChunkSearchRequest
|
|
3
3
|
|
|
4
|
-
Request body for chunk search (dense vector
|
|
4
|
+
Request body for chunk search (dense vector, full-text BM25, or hybrid).
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
|
@@ -9,6 +9,9 @@ Name | Type
|
|
|
9
9
|
------------ | -------------
|
|
10
10
|
`query` | string
|
|
11
11
|
`searchType` | [SearchType](SearchType.md)
|
|
12
|
+
`hybridProfile` | [HybridSearchProfile](HybridSearchProfile.md)
|
|
13
|
+
`denseWeight` | number
|
|
14
|
+
`sparseWeight` | number
|
|
12
15
|
`parentPathIds` | Array<string>
|
|
13
16
|
`tagIds` | Array<string>
|
|
14
17
|
`chunkTypes` | [Array<ChunkType>](ChunkType.md)
|
|
@@ -27,6 +30,9 @@ import type { ChunkSearchRequest } from '@knowledge-stack/ksapi'
|
|
|
27
30
|
const example = {
|
|
28
31
|
"query": null,
|
|
29
32
|
"searchType": null,
|
|
33
|
+
"hybridProfile": null,
|
|
34
|
+
"denseWeight": null,
|
|
35
|
+
"sparseWeight": null,
|
|
30
36
|
"parentPathIds": null,
|
|
31
37
|
"tagIds": null,
|
|
32
38
|
"chunkTypes": null,
|
package/docs/ChunksApi.md
CHANGED
|
@@ -478,7 +478,7 @@ No authorization required
|
|
|
478
478
|
|
|
479
479
|
Search Chunks Handler
|
|
480
480
|
|
|
481
|
-
Search over chunks using dense vector
|
|
481
|
+
Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
482
482
|
|
|
483
483
|
### Example
|
|
484
484
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
|
|
2
|
+
# HybridSearchProfile
|
|
3
|
+
|
|
4
|
+
Supported hybrid search weighting presets.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { HybridSearchProfile } from '@knowledge-stack/ksapi'
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
} satisfies HybridSearchProfile
|
|
19
|
+
|
|
20
|
+
console.log(example)
|
|
21
|
+
|
|
22
|
+
// Convert the instance to a JSON string
|
|
23
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
24
|
+
console.log(exampleJSON)
|
|
25
|
+
|
|
26
|
+
// Parse the JSON string back to an object
|
|
27
|
+
const exampleParsed = JSON.parse(exampleJSON) as HybridSearchProfile
|
|
28
|
+
console.log(exampleParsed)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
32
|
+
|
|
33
|
+
|
package/package.json
CHANGED
package/src/apis/ChunksApi.ts
CHANGED
|
@@ -303,7 +303,7 @@ export interface ChunksApiInterface {
|
|
|
303
303
|
searchChunksRequestOpts(requestParameters: SearchChunksRequest): Promise<runtime.RequestOpts>;
|
|
304
304
|
|
|
305
305
|
/**
|
|
306
|
-
* Search over chunks using dense vector
|
|
306
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
307
307
|
* @summary Search Chunks Handler
|
|
308
308
|
* @param {ChunkSearchRequest} chunkSearchRequest
|
|
309
309
|
* @param {string} [authorization]
|
|
@@ -315,7 +315,7 @@ export interface ChunksApiInterface {
|
|
|
315
315
|
searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>>;
|
|
316
316
|
|
|
317
317
|
/**
|
|
318
|
-
* Search over chunks using dense vector
|
|
318
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
319
319
|
* Search Chunks Handler
|
|
320
320
|
*/
|
|
321
321
|
searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>>;
|
|
@@ -743,7 +743,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
743
743
|
}
|
|
744
744
|
|
|
745
745
|
/**
|
|
746
|
-
* Search over chunks using dense vector
|
|
746
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
747
747
|
* Search Chunks Handler
|
|
748
748
|
*/
|
|
749
749
|
async searchChunksRaw(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ScoredChunkResponse>>> {
|
|
@@ -754,7 +754,7 @@ export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
|
754
754
|
}
|
|
755
755
|
|
|
756
756
|
/**
|
|
757
|
-
* Search over chunks using dense vector
|
|
757
|
+
* Search over chunks using dense vector, BM25 full-text, or hybrid retrieval. Combines search with path-based authorization and optional metadata filters. Uses Qdrant for retrieval and hydrates the matched chunks from Postgres.
|
|
758
758
|
* Search Chunks Handler
|
|
759
759
|
*/
|
|
760
760
|
async searchChunks(requestParameters: SearchChunksRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ScoredChunkResponse>> {
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { HybridSearchProfile } from './HybridSearchProfile';
|
|
17
|
+
import {
|
|
18
|
+
HybridSearchProfileFromJSON,
|
|
19
|
+
HybridSearchProfileFromJSONTyped,
|
|
20
|
+
HybridSearchProfileToJSON,
|
|
21
|
+
HybridSearchProfileToJSONTyped,
|
|
22
|
+
} from './HybridSearchProfile';
|
|
16
23
|
import type { ChunkType } from './ChunkType';
|
|
17
24
|
import {
|
|
18
25
|
ChunkTypeFromJSON,
|
|
@@ -29,7 +36,7 @@ import {
|
|
|
29
36
|
} from './SearchType';
|
|
30
37
|
|
|
31
38
|
/**
|
|
32
|
-
* Request body for chunk search (dense vector
|
|
39
|
+
* Request body for chunk search (dense vector, full-text BM25, or hybrid).
|
|
33
40
|
* @export
|
|
34
41
|
* @interface ChunkSearchRequest
|
|
35
42
|
*/
|
|
@@ -46,6 +53,24 @@ export interface ChunkSearchRequest {
|
|
|
46
53
|
* @memberof ChunkSearchRequest
|
|
47
54
|
*/
|
|
48
55
|
searchType?: SearchType;
|
|
56
|
+
/**
|
|
57
|
+
*
|
|
58
|
+
* @type {HybridSearchProfile}
|
|
59
|
+
* @memberof ChunkSearchRequest
|
|
60
|
+
*/
|
|
61
|
+
hybridProfile?: HybridSearchProfile;
|
|
62
|
+
/**
|
|
63
|
+
* Optional explicit weight for the dense branch. Must be provided together with sparse_weight and overrides hybrid_profile.
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof ChunkSearchRequest
|
|
66
|
+
*/
|
|
67
|
+
denseWeight?: number | null;
|
|
68
|
+
/**
|
|
69
|
+
* Optional explicit weight for the sparse branch. Must be provided together with dense_weight and overrides hybrid_profile.
|
|
70
|
+
* @type {number}
|
|
71
|
+
* @memberof ChunkSearchRequest
|
|
72
|
+
*/
|
|
73
|
+
sparseWeight?: number | null;
|
|
49
74
|
/**
|
|
50
75
|
* Path part IDs to search within (non-CHUNK types). Defaults to tenant's /shared.
|
|
51
76
|
* @type {Array<string>}
|
|
@@ -148,6 +173,9 @@ export function ChunkSearchRequestFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
148
173
|
|
|
149
174
|
'query': json['query'],
|
|
150
175
|
'searchType': json['search_type'] == null ? undefined : SearchTypeFromJSON(json['search_type']),
|
|
176
|
+
'hybridProfile': json['hybrid_profile'] == null ? undefined : HybridSearchProfileFromJSON(json['hybrid_profile']),
|
|
177
|
+
'denseWeight': json['dense_weight'] == null ? undefined : json['dense_weight'],
|
|
178
|
+
'sparseWeight': json['sparse_weight'] == null ? undefined : json['sparse_weight'],
|
|
151
179
|
'parentPathIds': json['parent_path_ids'] == null ? undefined : json['parent_path_ids'],
|
|
152
180
|
'tagIds': json['tag_ids'] == null ? undefined : json['tag_ids'],
|
|
153
181
|
'chunkTypes': json['chunk_types'] == null ? undefined : ((json['chunk_types'] as Array<any>).map(ChunkTypeFromJSON)),
|
|
@@ -172,6 +200,9 @@ export function ChunkSearchRequestToJSONTyped(value?: ChunkSearchRequest | null,
|
|
|
172
200
|
|
|
173
201
|
'query': value['query'],
|
|
174
202
|
'search_type': SearchTypeToJSON(value['searchType']),
|
|
203
|
+
'hybrid_profile': HybridSearchProfileToJSON(value['hybridProfile']),
|
|
204
|
+
'dense_weight': value['denseWeight'],
|
|
205
|
+
'sparse_weight': value['sparseWeight'],
|
|
175
206
|
'parent_path_ids': value['parentPathIds'],
|
|
176
207
|
'tag_ids': value['tagIds'],
|
|
177
208
|
'chunk_types': value['chunkTypes'] == null ? undefined : ((value['chunkTypes'] as Array<any>).map(ChunkTypeToJSON)),
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Supported hybrid search weighting presets.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const HybridSearchProfile = {
|
|
21
|
+
Hybrid: 'hybrid',
|
|
22
|
+
Dense: 'dense',
|
|
23
|
+
Sparse: 'sparse'
|
|
24
|
+
} as const;
|
|
25
|
+
export type HybridSearchProfile = typeof HybridSearchProfile[keyof typeof HybridSearchProfile];
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export function instanceOfHybridSearchProfile(value: any): boolean {
|
|
29
|
+
for (const key in HybridSearchProfile) {
|
|
30
|
+
if (Object.prototype.hasOwnProperty.call(HybridSearchProfile, key)) {
|
|
31
|
+
if (HybridSearchProfile[key as keyof typeof HybridSearchProfile] === value) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function HybridSearchProfileFromJSON(json: any): HybridSearchProfile {
|
|
40
|
+
return HybridSearchProfileFromJSONTyped(json, false);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function HybridSearchProfileFromJSONTyped(json: any, ignoreDiscriminator: boolean): HybridSearchProfile {
|
|
44
|
+
return json as HybridSearchProfile;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function HybridSearchProfileToJSON(value?: HybridSearchProfile | null): any {
|
|
48
|
+
return value as any;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function HybridSearchProfileToJSONTyped(value: any, ignoreDiscriminator: boolean): HybridSearchProfile {
|
|
52
|
+
return value as HybridSearchProfile;
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
} from './ChunkDocumentVersionResponse';
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* Chunk response with
|
|
46
|
+
* Chunk response with search ranking score.
|
|
47
47
|
* @export
|
|
48
48
|
* @interface ScoredChunkResponse
|
|
49
49
|
*/
|
|
@@ -157,7 +157,7 @@ export interface ScoredChunkResponse {
|
|
|
157
157
|
*/
|
|
158
158
|
documentVersion?: ChunkDocumentVersionResponse;
|
|
159
159
|
/**
|
|
160
|
-
*
|
|
160
|
+
* Search ranking score returned by Qdrant
|
|
161
161
|
* @type {number}
|
|
162
162
|
* @memberof ScoredChunkResponse
|
|
163
163
|
*/
|
package/src/models/SearchType.ts
CHANGED
package/src/models/index.ts
CHANGED
|
@@ -64,6 +64,7 @@ export * from './GroupPermissionResponse';
|
|
|
64
64
|
export * from './GroupResponse';
|
|
65
65
|
export * from './HTTPValidationError';
|
|
66
66
|
export * from './HealthCheckResponse';
|
|
67
|
+
export * from './HybridSearchProfile';
|
|
67
68
|
export * from './IdpConfig';
|
|
68
69
|
export * from './IdpType';
|
|
69
70
|
export * from './ImageTaxonomy';
|