@knowledge-stack/ksapi 1.47.0 → 1.48.1
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 +8 -0
- package/README.md +6 -2
- package/dist/esm/models/ChunkBulkResponse.d.ts +8 -6
- package/dist/esm/models/ChunkBulkResponse.js +6 -4
- package/dist/esm/models/ChunkDocumentResponse.d.ts +67 -0
- package/dist/esm/models/ChunkDocumentResponse.js +58 -0
- package/dist/esm/models/ChunkDocumentVersionResponse.d.ts +59 -0
- package/dist/esm/models/ChunkDocumentVersionResponse.js +52 -0
- package/dist/esm/models/ChunkResponse.d.ts +8 -6
- package/dist/esm/models/ChunkResponse.js +6 -4
- package/dist/esm/models/EnrichedCitation.d.ts +101 -0
- package/dist/esm/models/EnrichedCitation.js +73 -0
- package/dist/esm/models/EnrichedThreadMessageContent.d.ts +54 -0
- package/dist/esm/models/EnrichedThreadMessageContent.js +47 -0
- package/dist/esm/models/ScoredChunkResponse.d.ts +8 -6
- package/dist/esm/models/ScoredChunkResponse.js +6 -4
- package/dist/esm/models/ThreadMessageResponse.d.ts +3 -3
- package/dist/esm/models/ThreadMessageResponse.js +3 -3
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.js +4 -0
- package/dist/models/ChunkBulkResponse.d.ts +8 -6
- package/dist/models/ChunkBulkResponse.js +6 -4
- package/dist/models/ChunkDocumentResponse.d.ts +67 -0
- package/dist/models/ChunkDocumentResponse.js +66 -0
- package/dist/models/ChunkDocumentVersionResponse.d.ts +59 -0
- package/dist/models/ChunkDocumentVersionResponse.js +60 -0
- package/dist/models/ChunkResponse.d.ts +8 -6
- package/dist/models/ChunkResponse.js +6 -4
- package/dist/models/EnrichedCitation.d.ts +101 -0
- package/dist/models/EnrichedCitation.js +81 -0
- package/dist/models/EnrichedThreadMessageContent.d.ts +54 -0
- package/dist/models/EnrichedThreadMessageContent.js +55 -0
- package/dist/models/ScoredChunkResponse.d.ts +8 -6
- package/dist/models/ScoredChunkResponse.js +6 -4
- package/dist/models/ThreadMessageResponse.d.ts +3 -3
- package/dist/models/ThreadMessageResponse.js +3 -3
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/docs/ChunkBulkResponse.md +4 -4
- package/docs/ChunkDocumentResponse.md +41 -0
- package/docs/ChunkDocumentVersionResponse.md +39 -0
- package/docs/ChunkResponse.md +4 -4
- package/docs/EnrichedCitation.md +53 -0
- package/docs/EnrichedThreadMessageContent.md +37 -0
- package/docs/ScoredChunkResponse.md +4 -4
- package/docs/ThreadMessageResponse.md +1 -1
- package/package.json +1 -1
- package/src/models/ChunkBulkResponse.ts +24 -10
- package/src/models/ChunkDocumentResponse.ts +127 -0
- package/src/models/ChunkDocumentVersionResponse.ts +101 -0
- package/src/models/ChunkResponse.ts +24 -10
- package/src/models/EnrichedCitation.ts +162 -0
- package/src/models/EnrichedThreadMessageContent.ts +99 -0
- package/src/models/ScoredChunkResponse.ts +24 -10
- package/src/models/ThreadMessageResponse.ts +11 -11
- package/src/models/index.ts +4 -0
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
* Citation with optional document context, populated at read time.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface EnrichedCitation
|
|
16
|
+
*/
|
|
17
|
+
export interface EnrichedCitation {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof EnrichedCitation
|
|
22
|
+
*/
|
|
23
|
+
chunkId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The quote from the chunk
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof EnrichedCitation
|
|
28
|
+
*/
|
|
29
|
+
quote: string;
|
|
30
|
+
/**
|
|
31
|
+
* The 0-based start character of the quote in the chunk
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof EnrichedCitation
|
|
34
|
+
*/
|
|
35
|
+
startChar: number;
|
|
36
|
+
/**
|
|
37
|
+
* The length of the quote
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof EnrichedCitation
|
|
40
|
+
*/
|
|
41
|
+
length: number;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof EnrichedCitation
|
|
46
|
+
*/
|
|
47
|
+
documentId?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof EnrichedCitation
|
|
52
|
+
*/
|
|
53
|
+
documentVersionId?: string | null;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {string}
|
|
57
|
+
* @memberof EnrichedCitation
|
|
58
|
+
*/
|
|
59
|
+
documentName?: string | null;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof EnrichedCitation
|
|
64
|
+
*/
|
|
65
|
+
versionNumber?: number | null;
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
* @type {string}
|
|
69
|
+
* @memberof EnrichedCitation
|
|
70
|
+
*/
|
|
71
|
+
pathPartId?: string | null;
|
|
72
|
+
/**
|
|
73
|
+
*
|
|
74
|
+
* @type {string}
|
|
75
|
+
* @memberof EnrichedCitation
|
|
76
|
+
*/
|
|
77
|
+
materializedPath?: string | null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Check if a given object implements the EnrichedCitation interface.
|
|
81
|
+
*/
|
|
82
|
+
export declare function instanceOfEnrichedCitation(value: object): value is EnrichedCitation;
|
|
83
|
+
export declare function EnrichedCitationFromJSON(json: any): EnrichedCitation;
|
|
84
|
+
export declare function EnrichedCitationFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrichedCitation;
|
|
85
|
+
export declare function EnrichedCitationToJSON(json: any): EnrichedCitation;
|
|
86
|
+
export declare function EnrichedCitationToJSONTyped(value?: EnrichedCitation | null, ignoreDiscriminator?: boolean): any;
|
|
87
|
+
export declare const EnrichedCitationPropertyValidationAttributesMap: {
|
|
88
|
+
[property: string]: {
|
|
89
|
+
maxLength?: number;
|
|
90
|
+
minLength?: number;
|
|
91
|
+
pattern?: string;
|
|
92
|
+
maximum?: number;
|
|
93
|
+
exclusiveMaximum?: boolean;
|
|
94
|
+
minimum?: number;
|
|
95
|
+
exclusiveMinimum?: boolean;
|
|
96
|
+
multipleOf?: number;
|
|
97
|
+
maxItems?: number;
|
|
98
|
+
minItems?: number;
|
|
99
|
+
uniqueItems?: boolean;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
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.EnrichedCitationPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfEnrichedCitation = instanceOfEnrichedCitation;
|
|
18
|
+
exports.EnrichedCitationFromJSON = EnrichedCitationFromJSON;
|
|
19
|
+
exports.EnrichedCitationFromJSONTyped = EnrichedCitationFromJSONTyped;
|
|
20
|
+
exports.EnrichedCitationToJSON = EnrichedCitationToJSON;
|
|
21
|
+
exports.EnrichedCitationToJSONTyped = EnrichedCitationToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the EnrichedCitation interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfEnrichedCitation(value) {
|
|
26
|
+
if (!('chunkId' in value) || value['chunkId'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('quote' in value) || value['quote'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('startChar' in value) || value['startChar'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('length' in value) || value['length'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
function EnrichedCitationFromJSON(json) {
|
|
37
|
+
return EnrichedCitationFromJSONTyped(json, false);
|
|
38
|
+
}
|
|
39
|
+
function EnrichedCitationFromJSONTyped(json, ignoreDiscriminator) {
|
|
40
|
+
if (json == null) {
|
|
41
|
+
return json;
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
'chunkId': json['chunk_id'],
|
|
45
|
+
'quote': json['quote'],
|
|
46
|
+
'startChar': json['start_char'],
|
|
47
|
+
'length': json['length'],
|
|
48
|
+
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
49
|
+
'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
|
|
50
|
+
'documentName': json['document_name'] == null ? undefined : json['document_name'],
|
|
51
|
+
'versionNumber': json['version_number'] == null ? undefined : json['version_number'],
|
|
52
|
+
'pathPartId': json['path_part_id'] == null ? undefined : json['path_part_id'],
|
|
53
|
+
'materializedPath': json['materialized_path'] == null ? undefined : json['materialized_path'],
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function EnrichedCitationToJSON(json) {
|
|
57
|
+
return EnrichedCitationToJSONTyped(json, false);
|
|
58
|
+
}
|
|
59
|
+
function EnrichedCitationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
60
|
+
if (value == null) {
|
|
61
|
+
return value;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
'chunk_id': value['chunkId'],
|
|
65
|
+
'quote': value['quote'],
|
|
66
|
+
'start_char': value['startChar'],
|
|
67
|
+
'length': value['length'],
|
|
68
|
+
'document_id': value['documentId'],
|
|
69
|
+
'document_version_id': value['documentVersionId'],
|
|
70
|
+
'document_name': value['documentName'],
|
|
71
|
+
'version_number': value['versionNumber'],
|
|
72
|
+
'path_part_id': value['pathPartId'],
|
|
73
|
+
'materialized_path': value['materializedPath'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
exports.EnrichedCitationPropertyValidationAttributesMap = {
|
|
77
|
+
startChar: {
|
|
78
|
+
minimum: 0,
|
|
79
|
+
exclusiveMinimum: false,
|
|
80
|
+
},
|
|
81
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
import type { EnrichedCitation } from './EnrichedCitation';
|
|
13
|
+
/**
|
|
14
|
+
* ThreadMessageContent with enriched citations for API responses.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface EnrichedThreadMessageContent
|
|
17
|
+
*/
|
|
18
|
+
export interface EnrichedThreadMessageContent {
|
|
19
|
+
/**
|
|
20
|
+
* The text content of the message
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof EnrichedThreadMessageContent
|
|
23
|
+
*/
|
|
24
|
+
text: string;
|
|
25
|
+
/**
|
|
26
|
+
* A list of citations with document context
|
|
27
|
+
* @type {Array<EnrichedCitation>}
|
|
28
|
+
* @memberof EnrichedThreadMessageContent
|
|
29
|
+
*/
|
|
30
|
+
citations?: Array<EnrichedCitation> | null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the EnrichedThreadMessageContent interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfEnrichedThreadMessageContent(value: object): value is EnrichedThreadMessageContent;
|
|
36
|
+
export declare function EnrichedThreadMessageContentFromJSON(json: any): EnrichedThreadMessageContent;
|
|
37
|
+
export declare function EnrichedThreadMessageContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrichedThreadMessageContent;
|
|
38
|
+
export declare function EnrichedThreadMessageContentToJSON(json: any): EnrichedThreadMessageContent;
|
|
39
|
+
export declare function EnrichedThreadMessageContentToJSONTyped(value?: EnrichedThreadMessageContent | null, ignoreDiscriminator?: boolean): any;
|
|
40
|
+
export declare const EnrichedThreadMessageContentPropertyValidationAttributesMap: {
|
|
41
|
+
[property: string]: {
|
|
42
|
+
maxLength?: number;
|
|
43
|
+
minLength?: number;
|
|
44
|
+
pattern?: string;
|
|
45
|
+
maximum?: number;
|
|
46
|
+
exclusiveMaximum?: boolean;
|
|
47
|
+
minimum?: number;
|
|
48
|
+
exclusiveMinimum?: boolean;
|
|
49
|
+
multipleOf?: number;
|
|
50
|
+
maxItems?: number;
|
|
51
|
+
minItems?: number;
|
|
52
|
+
uniqueItems?: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
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.EnrichedThreadMessageContentPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfEnrichedThreadMessageContent = instanceOfEnrichedThreadMessageContent;
|
|
18
|
+
exports.EnrichedThreadMessageContentFromJSON = EnrichedThreadMessageContentFromJSON;
|
|
19
|
+
exports.EnrichedThreadMessageContentFromJSONTyped = EnrichedThreadMessageContentFromJSONTyped;
|
|
20
|
+
exports.EnrichedThreadMessageContentToJSON = EnrichedThreadMessageContentToJSON;
|
|
21
|
+
exports.EnrichedThreadMessageContentToJSONTyped = EnrichedThreadMessageContentToJSONTyped;
|
|
22
|
+
const EnrichedCitation_1 = require("./EnrichedCitation");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the EnrichedThreadMessageContent interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfEnrichedThreadMessageContent(value) {
|
|
27
|
+
if (!('text' in value) || value['text'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function EnrichedThreadMessageContentFromJSON(json) {
|
|
32
|
+
return EnrichedThreadMessageContentFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function EnrichedThreadMessageContentFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'text': json['text'],
|
|
40
|
+
'citations': json['citations'] == null ? undefined : (json['citations'].map(EnrichedCitation_1.EnrichedCitationFromJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function EnrichedThreadMessageContentToJSON(json) {
|
|
44
|
+
return EnrichedThreadMessageContentToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function EnrichedThreadMessageContentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'text': value['text'],
|
|
52
|
+
'citations': value['citations'] == null ? undefined : (value['citations'].map(EnrichedCitation_1.EnrichedCitationToJSON)),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
exports.EnrichedThreadMessageContentPropertyValidationAttributesMap = {};
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
|
|
12
13
|
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
13
14
|
import type { ChunkType } from './ChunkType';
|
|
15
|
+
import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
|
|
14
16
|
/**
|
|
15
17
|
* Chunk response with similarity score.
|
|
16
18
|
* @export
|
|
@@ -108,17 +110,17 @@ export interface ScoredChunkResponse {
|
|
|
108
110
|
*/
|
|
109
111
|
assetS3Urls?: Array<string>;
|
|
110
112
|
/**
|
|
111
|
-
*
|
|
112
|
-
* @type {
|
|
113
|
+
*
|
|
114
|
+
* @type {ChunkDocumentResponse}
|
|
113
115
|
* @memberof ScoredChunkResponse
|
|
114
116
|
*/
|
|
115
|
-
|
|
117
|
+
document?: ChunkDocumentResponse;
|
|
116
118
|
/**
|
|
117
|
-
*
|
|
118
|
-
* @type {
|
|
119
|
+
*
|
|
120
|
+
* @type {ChunkDocumentVersionResponse}
|
|
119
121
|
* @memberof ScoredChunkResponse
|
|
120
122
|
*/
|
|
121
|
-
|
|
123
|
+
documentVersion?: ChunkDocumentVersionResponse;
|
|
122
124
|
/**
|
|
123
125
|
* Cosine similarity score (1 - cosine_distance)
|
|
124
126
|
* @type {number}
|
|
@@ -19,8 +19,10 @@ exports.ScoredChunkResponseFromJSON = ScoredChunkResponseFromJSON;
|
|
|
19
19
|
exports.ScoredChunkResponseFromJSONTyped = ScoredChunkResponseFromJSONTyped;
|
|
20
20
|
exports.ScoredChunkResponseToJSON = ScoredChunkResponseToJSON;
|
|
21
21
|
exports.ScoredChunkResponseToJSONTyped = ScoredChunkResponseToJSONTyped;
|
|
22
|
+
const ChunkDocumentResponse_1 = require("./ChunkDocumentResponse");
|
|
22
23
|
const ChunkMetadataOutput_1 = require("./ChunkMetadataOutput");
|
|
23
24
|
const ChunkType_1 = require("./ChunkType");
|
|
25
|
+
const ChunkDocumentVersionResponse_1 = require("./ChunkDocumentVersionResponse");
|
|
24
26
|
/**
|
|
25
27
|
* Check if a given object implements the ScoredChunkResponse interface.
|
|
26
28
|
*/
|
|
@@ -76,8 +78,8 @@ function ScoredChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
76
78
|
'createdAt': (new Date(json['created_at'])),
|
|
77
79
|
'updatedAt': (new Date(json['updated_at'])),
|
|
78
80
|
'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
|
|
79
|
-
'
|
|
80
|
-
'
|
|
81
|
+
'document': json['document'] == null ? undefined : (0, ChunkDocumentResponse_1.ChunkDocumentResponseFromJSON)(json['document']),
|
|
82
|
+
'documentVersion': json['document_version'] == null ? undefined : (0, ChunkDocumentVersionResponse_1.ChunkDocumentVersionResponseFromJSON)(json['document_version']),
|
|
81
83
|
'score': json['score'],
|
|
82
84
|
};
|
|
83
85
|
}
|
|
@@ -104,8 +106,8 @@ function ScoredChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
104
106
|
'created_at': value['createdAt'].toISOString(),
|
|
105
107
|
'updated_at': value['updatedAt'].toISOString(),
|
|
106
108
|
'asset_s3_urls': value['assetS3Urls'],
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
+
'document': (0, ChunkDocumentResponse_1.ChunkDocumentResponseToJSON)(value['document']),
|
|
110
|
+
'document_version': (0, ChunkDocumentVersionResponse_1.ChunkDocumentVersionResponseToJSON)(value['documentVersion']),
|
|
109
111
|
'score': value['score'],
|
|
110
112
|
};
|
|
111
113
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { EnrichedThreadMessageContent } from './EnrichedThreadMessageContent';
|
|
12
13
|
import type { MessageRole } from './MessageRole';
|
|
13
14
|
import type { ThreadMessageDetailsOutput } from './ThreadMessageDetailsOutput';
|
|
14
|
-
import type { ThreadMessageContent } from './ThreadMessageContent';
|
|
15
15
|
/**
|
|
16
16
|
* Thread message response model.
|
|
17
17
|
* @export
|
|
@@ -44,10 +44,10 @@ export interface ThreadMessageResponse {
|
|
|
44
44
|
role: MessageRole;
|
|
45
45
|
/**
|
|
46
46
|
*
|
|
47
|
-
* @type {
|
|
47
|
+
* @type {EnrichedThreadMessageContent}
|
|
48
48
|
* @memberof ThreadMessageResponse
|
|
49
49
|
*/
|
|
50
|
-
content:
|
|
50
|
+
content: EnrichedThreadMessageContent;
|
|
51
51
|
/**
|
|
52
52
|
*
|
|
53
53
|
* @type {ThreadMessageDetailsOutput}
|
|
@@ -19,9 +19,9 @@ exports.ThreadMessageResponseFromJSON = ThreadMessageResponseFromJSON;
|
|
|
19
19
|
exports.ThreadMessageResponseFromJSONTyped = ThreadMessageResponseFromJSONTyped;
|
|
20
20
|
exports.ThreadMessageResponseToJSON = ThreadMessageResponseToJSON;
|
|
21
21
|
exports.ThreadMessageResponseToJSONTyped = ThreadMessageResponseToJSONTyped;
|
|
22
|
+
const EnrichedThreadMessageContent_1 = require("./EnrichedThreadMessageContent");
|
|
22
23
|
const MessageRole_1 = require("./MessageRole");
|
|
23
24
|
const ThreadMessageDetailsOutput_1 = require("./ThreadMessageDetailsOutput");
|
|
24
|
-
const ThreadMessageContent_1 = require("./ThreadMessageContent");
|
|
25
25
|
/**
|
|
26
26
|
* Check if a given object implements the ThreadMessageResponse interface.
|
|
27
27
|
*/
|
|
@@ -60,7 +60,7 @@ function ThreadMessageResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
60
|
'pathPartId': json['path_part_id'],
|
|
61
61
|
'sequence': json['sequence'],
|
|
62
62
|
'role': (0, MessageRole_1.MessageRoleFromJSON)(json['role']),
|
|
63
|
-
'content': (0,
|
|
63
|
+
'content': (0, EnrichedThreadMessageContent_1.EnrichedThreadMessageContentFromJSON)(json['content']),
|
|
64
64
|
'details': json['details'] == null ? undefined : (0, ThreadMessageDetailsOutput_1.ThreadMessageDetailsOutputFromJSON)(json['details']),
|
|
65
65
|
'parentPathId': json['parent_path_id'],
|
|
66
66
|
'materializedPath': json['materialized_path'],
|
|
@@ -81,7 +81,7 @@ function ThreadMessageResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
81
81
|
'path_part_id': value['pathPartId'],
|
|
82
82
|
'sequence': value['sequence'],
|
|
83
83
|
'role': (0, MessageRole_1.MessageRoleToJSON)(value['role']),
|
|
84
|
-
'content': (0,
|
|
84
|
+
'content': (0, EnrichedThreadMessageContent_1.EnrichedThreadMessageContentToJSON)(value['content']),
|
|
85
85
|
'details': (0, ThreadMessageDetailsOutput_1.ThreadMessageDetailsOutputToJSON)(value['details']),
|
|
86
86
|
'parent_path_id': value['parentPathId'],
|
|
87
87
|
'materialized_path': value['materializedPath'],
|
package/dist/models/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export * from './Args';
|
|
|
4
4
|
export * from './BulkTagRequest';
|
|
5
5
|
export * from './ChunkBulkResponse';
|
|
6
6
|
export * from './ChunkContentItem';
|
|
7
|
+
export * from './ChunkDocumentResponse';
|
|
8
|
+
export * from './ChunkDocumentVersionResponse';
|
|
7
9
|
export * from './ChunkLineageResponse';
|
|
8
10
|
export * from './ChunkMetadataInput';
|
|
9
11
|
export * from './ChunkMetadataOutput';
|
|
@@ -33,6 +35,8 @@ export * from './DocumentVersionMetadataUpdate';
|
|
|
33
35
|
export * from './DocumentVersionResponse';
|
|
34
36
|
export * from './EmailSentResponse';
|
|
35
37
|
export * from './EmailVerificationRequest';
|
|
38
|
+
export * from './EnrichedCitation';
|
|
39
|
+
export * from './EnrichedThreadMessageContent';
|
|
36
40
|
export * from './FolderAction';
|
|
37
41
|
export * from './FolderActionResponse';
|
|
38
42
|
export * from './FolderResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -22,6 +22,8 @@ __exportStar(require("./Args"), exports);
|
|
|
22
22
|
__exportStar(require("./BulkTagRequest"), exports);
|
|
23
23
|
__exportStar(require("./ChunkBulkResponse"), exports);
|
|
24
24
|
__exportStar(require("./ChunkContentItem"), exports);
|
|
25
|
+
__exportStar(require("./ChunkDocumentResponse"), exports);
|
|
26
|
+
__exportStar(require("./ChunkDocumentVersionResponse"), exports);
|
|
25
27
|
__exportStar(require("./ChunkLineageResponse"), exports);
|
|
26
28
|
__exportStar(require("./ChunkMetadataInput"), exports);
|
|
27
29
|
__exportStar(require("./ChunkMetadataOutput"), exports);
|
|
@@ -51,6 +53,8 @@ __exportStar(require("./DocumentVersionMetadataUpdate"), exports);
|
|
|
51
53
|
__exportStar(require("./DocumentVersionResponse"), exports);
|
|
52
54
|
__exportStar(require("./EmailSentResponse"), exports);
|
|
53
55
|
__exportStar(require("./EmailVerificationRequest"), exports);
|
|
56
|
+
__exportStar(require("./EnrichedCitation"), exports);
|
|
57
|
+
__exportStar(require("./EnrichedThreadMessageContent"), exports);
|
|
54
58
|
__exportStar(require("./FolderAction"), exports);
|
|
55
59
|
__exportStar(require("./FolderActionResponse"), exports);
|
|
56
60
|
__exportStar(require("./FolderResponse"), exports);
|
|
@@ -22,8 +22,8 @@ Name | Type
|
|
|
22
22
|
`createdAt` | Date
|
|
23
23
|
`updatedAt` | Date
|
|
24
24
|
`assetS3Urls` | Array<string>
|
|
25
|
-
`
|
|
26
|
-
`
|
|
25
|
+
`document` | [ChunkDocumentResponse](ChunkDocumentResponse.md)
|
|
26
|
+
`documentVersion` | [ChunkDocumentVersionResponse](ChunkDocumentVersionResponse.md)
|
|
27
27
|
`pathPartIdSegments` | Array<string>
|
|
28
28
|
|
|
29
29
|
## Example
|
|
@@ -48,8 +48,8 @@ const example = {
|
|
|
48
48
|
"createdAt": null,
|
|
49
49
|
"updatedAt": null,
|
|
50
50
|
"assetS3Urls": null,
|
|
51
|
-
"
|
|
52
|
-
"
|
|
51
|
+
"document": null,
|
|
52
|
+
"documentVersion": null,
|
|
53
53
|
"pathPartIdSegments": null,
|
|
54
54
|
} satisfies ChunkBulkResponse
|
|
55
55
|
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkDocumentResponse
|
|
3
|
+
|
|
4
|
+
Lightweight document info attached to a chunk response.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`name` | string
|
|
12
|
+
`documentType` | [DocumentType](DocumentType.md)
|
|
13
|
+
`documentOrigin` | [DocumentOrigin](DocumentOrigin.md)
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { ChunkDocumentResponse } from '@knowledge-stack/ksapi'
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"id": null,
|
|
23
|
+
"name": null,
|
|
24
|
+
"documentType": null,
|
|
25
|
+
"documentOrigin": null,
|
|
26
|
+
} satisfies ChunkDocumentResponse
|
|
27
|
+
|
|
28
|
+
console.log(example)
|
|
29
|
+
|
|
30
|
+
// Convert the instance to a JSON string
|
|
31
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
32
|
+
console.log(exampleJSON)
|
|
33
|
+
|
|
34
|
+
// Parse the JSON string back to an object
|
|
35
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChunkDocumentResponse
|
|
36
|
+
console.log(exampleParsed)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
|
|
2
|
+
# ChunkDocumentVersionResponse
|
|
3
|
+
|
|
4
|
+
Lightweight document version info attached to a chunk response.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`id` | string
|
|
11
|
+
`version` | number
|
|
12
|
+
`name` | string
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { ChunkDocumentVersionResponse } from '@knowledge-stack/ksapi'
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"id": null,
|
|
22
|
+
"version": null,
|
|
23
|
+
"name": null,
|
|
24
|
+
} satisfies ChunkDocumentVersionResponse
|
|
25
|
+
|
|
26
|
+
console.log(example)
|
|
27
|
+
|
|
28
|
+
// Convert the instance to a JSON string
|
|
29
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
30
|
+
console.log(exampleJSON)
|
|
31
|
+
|
|
32
|
+
// Parse the JSON string back to an object
|
|
33
|
+
const exampleParsed = JSON.parse(exampleJSON) as ChunkDocumentVersionResponse
|
|
34
|
+
console.log(exampleParsed)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
38
|
+
|
|
39
|
+
|
package/docs/ChunkResponse.md
CHANGED
|
@@ -22,8 +22,8 @@ Name | Type
|
|
|
22
22
|
`createdAt` | Date
|
|
23
23
|
`updatedAt` | Date
|
|
24
24
|
`assetS3Urls` | Array<string>
|
|
25
|
-
`
|
|
26
|
-
`
|
|
25
|
+
`document` | [ChunkDocumentResponse](ChunkDocumentResponse.md)
|
|
26
|
+
`documentVersion` | [ChunkDocumentVersionResponse](ChunkDocumentVersionResponse.md)
|
|
27
27
|
|
|
28
28
|
## Example
|
|
29
29
|
|
|
@@ -47,8 +47,8 @@ const example = {
|
|
|
47
47
|
"createdAt": null,
|
|
48
48
|
"updatedAt": null,
|
|
49
49
|
"assetS3Urls": null,
|
|
50
|
-
"
|
|
51
|
-
"
|
|
50
|
+
"document": null,
|
|
51
|
+
"documentVersion": null,
|
|
52
52
|
} satisfies ChunkResponse
|
|
53
53
|
|
|
54
54
|
console.log(example)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
|
|
2
|
+
# EnrichedCitation
|
|
3
|
+
|
|
4
|
+
Citation with optional document context, populated at read time.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`chunkId` | string
|
|
11
|
+
`quote` | string
|
|
12
|
+
`startChar` | number
|
|
13
|
+
`length` | number
|
|
14
|
+
`documentId` | string
|
|
15
|
+
`documentVersionId` | string
|
|
16
|
+
`documentName` | string
|
|
17
|
+
`versionNumber` | number
|
|
18
|
+
`pathPartId` | string
|
|
19
|
+
`materializedPath` | string
|
|
20
|
+
|
|
21
|
+
## Example
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import type { EnrichedCitation } from '@knowledge-stack/ksapi'
|
|
25
|
+
|
|
26
|
+
// TODO: Update the object below with actual values
|
|
27
|
+
const example = {
|
|
28
|
+
"chunkId": null,
|
|
29
|
+
"quote": null,
|
|
30
|
+
"startChar": null,
|
|
31
|
+
"length": null,
|
|
32
|
+
"documentId": null,
|
|
33
|
+
"documentVersionId": null,
|
|
34
|
+
"documentName": null,
|
|
35
|
+
"versionNumber": null,
|
|
36
|
+
"pathPartId": null,
|
|
37
|
+
"materializedPath": null,
|
|
38
|
+
} satisfies EnrichedCitation
|
|
39
|
+
|
|
40
|
+
console.log(example)
|
|
41
|
+
|
|
42
|
+
// Convert the instance to a JSON string
|
|
43
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
44
|
+
console.log(exampleJSON)
|
|
45
|
+
|
|
46
|
+
// Parse the JSON string back to an object
|
|
47
|
+
const exampleParsed = JSON.parse(exampleJSON) as EnrichedCitation
|
|
48
|
+
console.log(exampleParsed)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
52
|
+
|
|
53
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
# EnrichedThreadMessageContent
|
|
3
|
+
|
|
4
|
+
ThreadMessageContent with enriched citations for API responses.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`text` | string
|
|
11
|
+
`citations` | [Array<EnrichedCitation>](EnrichedCitation.md)
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { EnrichedThreadMessageContent } from '@knowledge-stack/ksapi'
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"text": null,
|
|
21
|
+
"citations": null,
|
|
22
|
+
} satisfies EnrichedThreadMessageContent
|
|
23
|
+
|
|
24
|
+
console.log(example)
|
|
25
|
+
|
|
26
|
+
// Convert the instance to a JSON string
|
|
27
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
28
|
+
console.log(exampleJSON)
|
|
29
|
+
|
|
30
|
+
// Parse the JSON string back to an object
|
|
31
|
+
const exampleParsed = JSON.parse(exampleJSON) as EnrichedThreadMessageContent
|
|
32
|
+
console.log(exampleParsed)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
36
|
+
|
|
37
|
+
|