@knowledge-stack/ksapi 1.47.0 → 1.48.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 +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
|
@@ -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
|
`score` | number
|
|
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
|
"score": null,
|
|
54
54
|
} satisfies ScoredChunkResponse
|
|
55
55
|
|
|
@@ -11,7 +11,7 @@ Name | Type
|
|
|
11
11
|
`pathPartId` | string
|
|
12
12
|
`sequence` | number
|
|
13
13
|
`role` | [MessageRole](MessageRole.md)
|
|
14
|
-
`content` | [
|
|
14
|
+
`content` | [EnrichedThreadMessageContent](EnrichedThreadMessageContent.md)
|
|
15
15
|
`details` | [ThreadMessageDetailsOutput](ThreadMessageDetailsOutput.md)
|
|
16
16
|
`parentPathId` | string
|
|
17
17
|
`materializedPath` | string
|
package/package.json
CHANGED
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
|
|
17
|
+
import {
|
|
18
|
+
ChunkDocumentResponseFromJSON,
|
|
19
|
+
ChunkDocumentResponseFromJSONTyped,
|
|
20
|
+
ChunkDocumentResponseToJSON,
|
|
21
|
+
ChunkDocumentResponseToJSONTyped,
|
|
22
|
+
} from './ChunkDocumentResponse';
|
|
16
23
|
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
17
24
|
import {
|
|
18
25
|
ChunkMetadataOutputFromJSON,
|
|
@@ -27,6 +34,13 @@ import {
|
|
|
27
34
|
ChunkTypeToJSON,
|
|
28
35
|
ChunkTypeToJSONTyped,
|
|
29
36
|
} from './ChunkType';
|
|
37
|
+
import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
|
|
38
|
+
import {
|
|
39
|
+
ChunkDocumentVersionResponseFromJSON,
|
|
40
|
+
ChunkDocumentVersionResponseFromJSONTyped,
|
|
41
|
+
ChunkDocumentVersionResponseToJSON,
|
|
42
|
+
ChunkDocumentVersionResponseToJSONTyped,
|
|
43
|
+
} from './ChunkDocumentVersionResponse';
|
|
30
44
|
|
|
31
45
|
/**
|
|
32
46
|
* Chunk response with ancestor path part IDs for Qdrant payload construction.
|
|
@@ -125,17 +139,17 @@ export interface ChunkBulkResponse {
|
|
|
125
139
|
*/
|
|
126
140
|
assetS3Urls?: Array<string>;
|
|
127
141
|
/**
|
|
128
|
-
*
|
|
129
|
-
* @type {
|
|
142
|
+
*
|
|
143
|
+
* @type {ChunkDocumentResponse}
|
|
130
144
|
* @memberof ChunkBulkResponse
|
|
131
145
|
*/
|
|
132
|
-
|
|
146
|
+
document?: ChunkDocumentResponse;
|
|
133
147
|
/**
|
|
134
|
-
*
|
|
135
|
-
* @type {
|
|
148
|
+
*
|
|
149
|
+
* @type {ChunkDocumentVersionResponse}
|
|
136
150
|
* @memberof ChunkBulkResponse
|
|
137
151
|
*/
|
|
138
|
-
|
|
152
|
+
documentVersion?: ChunkDocumentVersionResponse;
|
|
139
153
|
/**
|
|
140
154
|
* Ordered ancestor PathPart IDs from root to chunk
|
|
141
155
|
* @type {Array<string>}
|
|
@@ -191,8 +205,8 @@ export function ChunkBulkResponseFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
191
205
|
'createdAt': (new Date(json['created_at'])),
|
|
192
206
|
'updatedAt': (new Date(json['updated_at'])),
|
|
193
207
|
'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
|
|
194
|
-
'
|
|
195
|
-
'
|
|
208
|
+
'document': json['document'] == null ? undefined : ChunkDocumentResponseFromJSON(json['document']),
|
|
209
|
+
'documentVersion': json['document_version'] == null ? undefined : ChunkDocumentVersionResponseFromJSON(json['document_version']),
|
|
196
210
|
'pathPartIdSegments': json['path_part_id_segments'],
|
|
197
211
|
};
|
|
198
212
|
}
|
|
@@ -223,8 +237,8 @@ export function ChunkBulkResponseToJSONTyped(value?: ChunkBulkResponse | null, i
|
|
|
223
237
|
'created_at': value['createdAt'].toISOString(),
|
|
224
238
|
'updated_at': value['updatedAt'].toISOString(),
|
|
225
239
|
'asset_s3_urls': value['assetS3Urls'],
|
|
226
|
-
'
|
|
227
|
-
'
|
|
240
|
+
'document': ChunkDocumentResponseToJSON(value['document']),
|
|
241
|
+
'document_version': ChunkDocumentVersionResponseToJSON(value['documentVersion']),
|
|
228
242
|
'path_part_id_segments': value['pathPartIdSegments'],
|
|
229
243
|
};
|
|
230
244
|
}
|
|
@@ -0,0 +1,127 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { DocumentOrigin } from './DocumentOrigin';
|
|
17
|
+
import {
|
|
18
|
+
DocumentOriginFromJSON,
|
|
19
|
+
DocumentOriginFromJSONTyped,
|
|
20
|
+
DocumentOriginToJSON,
|
|
21
|
+
DocumentOriginToJSONTyped,
|
|
22
|
+
} from './DocumentOrigin';
|
|
23
|
+
import type { DocumentType } from './DocumentType';
|
|
24
|
+
import {
|
|
25
|
+
DocumentTypeFromJSON,
|
|
26
|
+
DocumentTypeFromJSONTyped,
|
|
27
|
+
DocumentTypeToJSON,
|
|
28
|
+
DocumentTypeToJSONTyped,
|
|
29
|
+
} from './DocumentType';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Lightweight document info attached to a chunk response.
|
|
33
|
+
* @export
|
|
34
|
+
* @interface ChunkDocumentResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface ChunkDocumentResponse {
|
|
37
|
+
/**
|
|
38
|
+
* Document ID
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof ChunkDocumentResponse
|
|
41
|
+
*/
|
|
42
|
+
id: string;
|
|
43
|
+
/**
|
|
44
|
+
* Document name
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof ChunkDocumentResponse
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {DocumentType}
|
|
52
|
+
* @memberof ChunkDocumentResponse
|
|
53
|
+
*/
|
|
54
|
+
documentType: DocumentType;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {DocumentOrigin}
|
|
58
|
+
* @memberof ChunkDocumentResponse
|
|
59
|
+
*/
|
|
60
|
+
documentOrigin: DocumentOrigin;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Check if a given object implements the ChunkDocumentResponse interface.
|
|
67
|
+
*/
|
|
68
|
+
export function instanceOfChunkDocumentResponse(value: object): value is ChunkDocumentResponse {
|
|
69
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
70
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
71
|
+
if (!('documentType' in value) || value['documentType'] === undefined) return false;
|
|
72
|
+
if (!('documentOrigin' in value) || value['documentOrigin'] === undefined) return false;
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function ChunkDocumentResponseFromJSON(json: any): ChunkDocumentResponse {
|
|
77
|
+
return ChunkDocumentResponseFromJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function ChunkDocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkDocumentResponse {
|
|
81
|
+
if (json == null) {
|
|
82
|
+
return json;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'id': json['id'],
|
|
87
|
+
'name': json['name'],
|
|
88
|
+
'documentType': DocumentTypeFromJSON(json['document_type']),
|
|
89
|
+
'documentOrigin': DocumentOriginFromJSON(json['document_origin']),
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function ChunkDocumentResponseToJSON(json: any): ChunkDocumentResponse {
|
|
94
|
+
return ChunkDocumentResponseToJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function ChunkDocumentResponseToJSONTyped(value?: ChunkDocumentResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
98
|
+
if (value == null) {
|
|
99
|
+
return value;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'id': value['id'],
|
|
105
|
+
'name': value['name'],
|
|
106
|
+
'document_type': DocumentTypeToJSON(value['documentType']),
|
|
107
|
+
'document_origin': DocumentOriginToJSON(value['documentOrigin']),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const ChunkDocumentResponsePropertyValidationAttributesMap: {
|
|
112
|
+
[property: string]: {
|
|
113
|
+
maxLength?: number,
|
|
114
|
+
minLength?: number,
|
|
115
|
+
pattern?: string,
|
|
116
|
+
maximum?: number,
|
|
117
|
+
exclusiveMaximum?: boolean,
|
|
118
|
+
minimum?: number,
|
|
119
|
+
exclusiveMinimum?: boolean,
|
|
120
|
+
multipleOf?: number,
|
|
121
|
+
maxItems?: number,
|
|
122
|
+
minItems?: number,
|
|
123
|
+
uniqueItems?: boolean
|
|
124
|
+
}
|
|
125
|
+
} = {
|
|
126
|
+
}
|
|
127
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Lightweight document version info attached to a chunk response.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ChunkDocumentVersionResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ChunkDocumentVersionResponse {
|
|
22
|
+
/**
|
|
23
|
+
* DocumentVersion ID
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ChunkDocumentVersionResponse
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
/**
|
|
29
|
+
* Version number
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof ChunkDocumentVersionResponse
|
|
32
|
+
*/
|
|
33
|
+
version: number;
|
|
34
|
+
/**
|
|
35
|
+
* Version path name (e.g. v0)
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ChunkDocumentVersionResponse
|
|
38
|
+
*/
|
|
39
|
+
name: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ChunkDocumentVersionResponse interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfChunkDocumentVersionResponse(value: object): value is ChunkDocumentVersionResponse {
|
|
46
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
47
|
+
if (!('version' in value) || value['version'] === undefined) return false;
|
|
48
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ChunkDocumentVersionResponseFromJSON(json: any): ChunkDocumentVersionResponse {
|
|
53
|
+
return ChunkDocumentVersionResponseFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ChunkDocumentVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChunkDocumentVersionResponse {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'id': json['id'],
|
|
63
|
+
'version': json['version'],
|
|
64
|
+
'name': json['name'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ChunkDocumentVersionResponseToJSON(json: any): ChunkDocumentVersionResponse {
|
|
69
|
+
return ChunkDocumentVersionResponseToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ChunkDocumentVersionResponseToJSONTyped(value?: ChunkDocumentVersionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'id': value['id'],
|
|
80
|
+
'version': value['version'],
|
|
81
|
+
'name': value['name'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export const ChunkDocumentVersionResponsePropertyValidationAttributesMap: {
|
|
86
|
+
[property: string]: {
|
|
87
|
+
maxLength?: number,
|
|
88
|
+
minLength?: number,
|
|
89
|
+
pattern?: string,
|
|
90
|
+
maximum?: number,
|
|
91
|
+
exclusiveMaximum?: boolean,
|
|
92
|
+
minimum?: number,
|
|
93
|
+
exclusiveMinimum?: boolean,
|
|
94
|
+
multipleOf?: number,
|
|
95
|
+
maxItems?: number,
|
|
96
|
+
minItems?: number,
|
|
97
|
+
uniqueItems?: boolean
|
|
98
|
+
}
|
|
99
|
+
} = {
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -13,6 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { ChunkDocumentResponse } from './ChunkDocumentResponse';
|
|
17
|
+
import {
|
|
18
|
+
ChunkDocumentResponseFromJSON,
|
|
19
|
+
ChunkDocumentResponseFromJSONTyped,
|
|
20
|
+
ChunkDocumentResponseToJSON,
|
|
21
|
+
ChunkDocumentResponseToJSONTyped,
|
|
22
|
+
} from './ChunkDocumentResponse';
|
|
16
23
|
import type { ChunkMetadataOutput } from './ChunkMetadataOutput';
|
|
17
24
|
import {
|
|
18
25
|
ChunkMetadataOutputFromJSON,
|
|
@@ -27,6 +34,13 @@ import {
|
|
|
27
34
|
ChunkTypeToJSON,
|
|
28
35
|
ChunkTypeToJSONTyped,
|
|
29
36
|
} from './ChunkType';
|
|
37
|
+
import type { ChunkDocumentVersionResponse } from './ChunkDocumentVersionResponse';
|
|
38
|
+
import {
|
|
39
|
+
ChunkDocumentVersionResponseFromJSON,
|
|
40
|
+
ChunkDocumentVersionResponseFromJSONTyped,
|
|
41
|
+
ChunkDocumentVersionResponseToJSON,
|
|
42
|
+
ChunkDocumentVersionResponseToJSONTyped,
|
|
43
|
+
} from './ChunkDocumentVersionResponse';
|
|
30
44
|
|
|
31
45
|
/**
|
|
32
46
|
* Chunk response model.
|
|
@@ -125,17 +139,17 @@ export interface ChunkResponse {
|
|
|
125
139
|
*/
|
|
126
140
|
assetS3Urls?: Array<string>;
|
|
127
141
|
/**
|
|
128
|
-
*
|
|
129
|
-
* @type {
|
|
142
|
+
*
|
|
143
|
+
* @type {ChunkDocumentResponse}
|
|
130
144
|
* @memberof ChunkResponse
|
|
131
145
|
*/
|
|
132
|
-
|
|
146
|
+
document?: ChunkDocumentResponse;
|
|
133
147
|
/**
|
|
134
|
-
*
|
|
135
|
-
* @type {
|
|
148
|
+
*
|
|
149
|
+
* @type {ChunkDocumentVersionResponse}
|
|
136
150
|
* @memberof ChunkResponse
|
|
137
151
|
*/
|
|
138
|
-
|
|
152
|
+
documentVersion?: ChunkDocumentVersionResponse;
|
|
139
153
|
}
|
|
140
154
|
|
|
141
155
|
|
|
@@ -184,8 +198,8 @@ export function ChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
184
198
|
'createdAt': (new Date(json['created_at'])),
|
|
185
199
|
'updatedAt': (new Date(json['updated_at'])),
|
|
186
200
|
'assetS3Urls': json['asset_s3_urls'] == null ? undefined : json['asset_s3_urls'],
|
|
187
|
-
'
|
|
188
|
-
'
|
|
201
|
+
'document': json['document'] == null ? undefined : ChunkDocumentResponseFromJSON(json['document']),
|
|
202
|
+
'documentVersion': json['document_version'] == null ? undefined : ChunkDocumentVersionResponseFromJSON(json['document_version']),
|
|
189
203
|
};
|
|
190
204
|
}
|
|
191
205
|
|
|
@@ -215,8 +229,8 @@ export function ChunkResponseToJSONTyped(value?: ChunkResponse | null, ignoreDis
|
|
|
215
229
|
'created_at': value['createdAt'].toISOString(),
|
|
216
230
|
'updated_at': value['updatedAt'].toISOString(),
|
|
217
231
|
'asset_s3_urls': value['assetS3Urls'],
|
|
218
|
-
'
|
|
219
|
-
'
|
|
232
|
+
'document': ChunkDocumentResponseToJSON(value['document']),
|
|
233
|
+
'document_version': ChunkDocumentVersionResponseToJSON(value['documentVersion']),
|
|
220
234
|
};
|
|
221
235
|
}
|
|
222
236
|
|
|
@@ -0,0 +1,162 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Citation with optional document context, populated at read time.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface EnrichedCitation
|
|
20
|
+
*/
|
|
21
|
+
export interface EnrichedCitation {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof EnrichedCitation
|
|
26
|
+
*/
|
|
27
|
+
chunkId: string;
|
|
28
|
+
/**
|
|
29
|
+
* The quote from the chunk
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof EnrichedCitation
|
|
32
|
+
*/
|
|
33
|
+
quote: string;
|
|
34
|
+
/**
|
|
35
|
+
* The 0-based start character of the quote in the chunk
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof EnrichedCitation
|
|
38
|
+
*/
|
|
39
|
+
startChar: number;
|
|
40
|
+
/**
|
|
41
|
+
* The length of the quote
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof EnrichedCitation
|
|
44
|
+
*/
|
|
45
|
+
length: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof EnrichedCitation
|
|
50
|
+
*/
|
|
51
|
+
documentId?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof EnrichedCitation
|
|
56
|
+
*/
|
|
57
|
+
documentVersionId?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof EnrichedCitation
|
|
62
|
+
*/
|
|
63
|
+
documentName?: string | null;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof EnrichedCitation
|
|
68
|
+
*/
|
|
69
|
+
versionNumber?: number | null;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof EnrichedCitation
|
|
74
|
+
*/
|
|
75
|
+
pathPartId?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {string}
|
|
79
|
+
* @memberof EnrichedCitation
|
|
80
|
+
*/
|
|
81
|
+
materializedPath?: string | null;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Check if a given object implements the EnrichedCitation interface.
|
|
86
|
+
*/
|
|
87
|
+
export function instanceOfEnrichedCitation(value: object): value is EnrichedCitation {
|
|
88
|
+
if (!('chunkId' in value) || value['chunkId'] === undefined) return false;
|
|
89
|
+
if (!('quote' in value) || value['quote'] === undefined) return false;
|
|
90
|
+
if (!('startChar' in value) || value['startChar'] === undefined) return false;
|
|
91
|
+
if (!('length' in value) || value['length'] === undefined) return false;
|
|
92
|
+
return true;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function EnrichedCitationFromJSON(json: any): EnrichedCitation {
|
|
96
|
+
return EnrichedCitationFromJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function EnrichedCitationFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrichedCitation {
|
|
100
|
+
if (json == null) {
|
|
101
|
+
return json;
|
|
102
|
+
}
|
|
103
|
+
return {
|
|
104
|
+
|
|
105
|
+
'chunkId': json['chunk_id'],
|
|
106
|
+
'quote': json['quote'],
|
|
107
|
+
'startChar': json['start_char'],
|
|
108
|
+
'length': json['length'],
|
|
109
|
+
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
110
|
+
'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
|
|
111
|
+
'documentName': json['document_name'] == null ? undefined : json['document_name'],
|
|
112
|
+
'versionNumber': json['version_number'] == null ? undefined : json['version_number'],
|
|
113
|
+
'pathPartId': json['path_part_id'] == null ? undefined : json['path_part_id'],
|
|
114
|
+
'materializedPath': json['materialized_path'] == null ? undefined : json['materialized_path'],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function EnrichedCitationToJSON(json: any): EnrichedCitation {
|
|
119
|
+
return EnrichedCitationToJSONTyped(json, false);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function EnrichedCitationToJSONTyped(value?: EnrichedCitation | null, ignoreDiscriminator: boolean = false): any {
|
|
123
|
+
if (value == null) {
|
|
124
|
+
return value;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return {
|
|
128
|
+
|
|
129
|
+
'chunk_id': value['chunkId'],
|
|
130
|
+
'quote': value['quote'],
|
|
131
|
+
'start_char': value['startChar'],
|
|
132
|
+
'length': value['length'],
|
|
133
|
+
'document_id': value['documentId'],
|
|
134
|
+
'document_version_id': value['documentVersionId'],
|
|
135
|
+
'document_name': value['documentName'],
|
|
136
|
+
'version_number': value['versionNumber'],
|
|
137
|
+
'path_part_id': value['pathPartId'],
|
|
138
|
+
'materialized_path': value['materializedPath'],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export const EnrichedCitationPropertyValidationAttributesMap: {
|
|
143
|
+
[property: string]: {
|
|
144
|
+
maxLength?: number,
|
|
145
|
+
minLength?: number,
|
|
146
|
+
pattern?: string,
|
|
147
|
+
maximum?: number,
|
|
148
|
+
exclusiveMaximum?: boolean,
|
|
149
|
+
minimum?: number,
|
|
150
|
+
exclusiveMinimum?: boolean,
|
|
151
|
+
multipleOf?: number,
|
|
152
|
+
maxItems?: number,
|
|
153
|
+
minItems?: number,
|
|
154
|
+
uniqueItems?: boolean
|
|
155
|
+
}
|
|
156
|
+
} = {
|
|
157
|
+
startChar: {
|
|
158
|
+
minimum: 0,
|
|
159
|
+
exclusiveMinimum: false,
|
|
160
|
+
},
|
|
161
|
+
}
|
|
162
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { EnrichedCitation } from './EnrichedCitation';
|
|
17
|
+
import {
|
|
18
|
+
EnrichedCitationFromJSON,
|
|
19
|
+
EnrichedCitationFromJSONTyped,
|
|
20
|
+
EnrichedCitationToJSON,
|
|
21
|
+
EnrichedCitationToJSONTyped,
|
|
22
|
+
} from './EnrichedCitation';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* ThreadMessageContent with enriched citations for API responses.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface EnrichedThreadMessageContent
|
|
28
|
+
*/
|
|
29
|
+
export interface EnrichedThreadMessageContent {
|
|
30
|
+
/**
|
|
31
|
+
* The text content of the message
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof EnrichedThreadMessageContent
|
|
34
|
+
*/
|
|
35
|
+
text: string;
|
|
36
|
+
/**
|
|
37
|
+
* A list of citations with document context
|
|
38
|
+
* @type {Array<EnrichedCitation>}
|
|
39
|
+
* @memberof EnrichedThreadMessageContent
|
|
40
|
+
*/
|
|
41
|
+
citations?: Array<EnrichedCitation> | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the EnrichedThreadMessageContent interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfEnrichedThreadMessageContent(value: object): value is EnrichedThreadMessageContent {
|
|
48
|
+
if (!('text' in value) || value['text'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function EnrichedThreadMessageContentFromJSON(json: any): EnrichedThreadMessageContent {
|
|
53
|
+
return EnrichedThreadMessageContentFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function EnrichedThreadMessageContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): EnrichedThreadMessageContent {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'text': json['text'],
|
|
63
|
+
'citations': json['citations'] == null ? undefined : ((json['citations'] as Array<any>).map(EnrichedCitationFromJSON)),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function EnrichedThreadMessageContentToJSON(json: any): EnrichedThreadMessageContent {
|
|
68
|
+
return EnrichedThreadMessageContentToJSONTyped(json, false);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function EnrichedThreadMessageContentToJSONTyped(value?: EnrichedThreadMessageContent | null, ignoreDiscriminator: boolean = false): any {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'text': value['text'],
|
|
79
|
+
'citations': value['citations'] == null ? undefined : ((value['citations'] as Array<any>).map(EnrichedCitationToJSON)),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export const EnrichedThreadMessageContentPropertyValidationAttributesMap: {
|
|
84
|
+
[property: string]: {
|
|
85
|
+
maxLength?: number,
|
|
86
|
+
minLength?: number,
|
|
87
|
+
pattern?: string,
|
|
88
|
+
maximum?: number,
|
|
89
|
+
exclusiveMaximum?: boolean,
|
|
90
|
+
minimum?: number,
|
|
91
|
+
exclusiveMinimum?: boolean,
|
|
92
|
+
multipleOf?: number,
|
|
93
|
+
maxItems?: number,
|
|
94
|
+
minItems?: number,
|
|
95
|
+
uniqueItems?: boolean
|
|
96
|
+
}
|
|
97
|
+
} = {
|
|
98
|
+
}
|
|
99
|
+
|