@usecortex_ai/node 0.3.3 → 0.3.5
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/dist/api/resources/search/client/Client.d.ts +1 -1
- package/dist/api/resources/search/client/requests/SearchRequest.d.ts +7 -0
- package/dist/api/resources/sources/client/Client.d.ts +26 -0
- package/dist/api/resources/sources/client/Client.js +91 -0
- package/dist/api/resources/sources/client/requests/SourcesGetGraphRelationsByIdRequest.d.ts +18 -0
- package/dist/api/resources/sources/client/requests/index.d.ts +1 -0
- package/dist/api/resources/upload/client/Client.d.ts +83 -0
- package/dist/api/resources/upload/client/Client.js +278 -0
- package/dist/api/resources/{userMemory/client/requests/GenerateUserMemoryRequest.d.ts → upload/client/requests/UploadBatchScrapeWebpageRequest.d.ts} +7 -7
- package/dist/api/resources/upload/client/requests/UploadBatchUploadMarkdownRequest.d.ts +22 -0
- package/dist/api/resources/upload/client/requests/UploadBatchUploadMarkdownRequest.js +5 -0
- package/dist/api/resources/upload/client/requests/UploadBatchUploadTextRequest.d.ts +22 -0
- package/dist/api/resources/upload/client/requests/UploadBatchUploadTextRequest.js +5 -0
- package/dist/api/resources/upload/client/requests/index.d.ts +3 -0
- package/dist/api/resources/userMemory/client/Client.d.ts +13 -45
- package/dist/api/resources/userMemory/client/Client.js +13 -110
- package/dist/api/resources/userMemory/client/requests/AddUserMemoryRequest.d.ts +12 -4
- package/dist/api/resources/userMemory/client/requests/index.d.ts +0 -1
- package/dist/api/types/AddUserMemoryResponse.d.ts +3 -1
- package/dist/api/types/Entity.d.ts +15 -0
- package/dist/api/types/Entity.js +5 -0
- package/dist/api/types/ExtendedContext.d.ts +2 -1
- package/dist/api/types/GraphRelationsResponse.d.ts +12 -0
- package/dist/api/types/GraphRelationsResponse.js +5 -0
- package/dist/api/types/ProcessingStatus.d.ts +3 -1
- package/dist/api/types/RelationEvidence.d.ts +20 -0
- package/dist/api/types/RelationEvidence.js +5 -0
- package/dist/api/types/RetrieveMode.d.ts +8 -0
- package/dist/api/types/RetrieveMode.js +10 -0
- package/dist/api/types/RetrieveResponse.d.ts +12 -0
- package/dist/api/types/RetrieveResponse.js +5 -0
- package/dist/api/types/RetrieveUserMemoryResponse.d.ts +2 -0
- package/dist/api/types/SearchChunk.d.ts +3 -0
- package/dist/api/types/TripleWithEvidence.d.ts +15 -0
- package/dist/api/types/TripleWithEvidence.js +5 -0
- package/dist/api/types/UserAssistantPair.d.ts +9 -0
- package/dist/api/types/UserAssistantPair.js +5 -0
- package/dist/api/types/WebpageScrapeRequest.d.ts +9 -0
- package/dist/api/types/WebpageScrapeRequest.js +5 -0
- package/dist/api/types/index.d.ts +8 -1
- package/dist/api/types/index.js +8 -1
- package/package.json +33 -30
- package/dist/api/types/GenerateUserMemoryResponse.d.ts +0 -13
- /package/dist/api/resources/{userMemory/client/requests/GenerateUserMemoryRequest.js → sources/client/requests/SourcesGetGraphRelationsByIdRequest.js} +0 -0
- /package/dist/api/{types/GenerateUserMemoryResponse.js → resources/upload/client/requests/UploadBatchScrapeWebpageRequest.js} +0 -0
|
@@ -7,8 +7,11 @@ export { type UploadUploadMarkdownRequest } from "./UploadUploadMarkdownRequest.
|
|
|
7
7
|
export { type UploadUploadTextRequest } from "./UploadUploadTextRequest.js";
|
|
8
8
|
export { type UploadUpdateMarkdownRequest } from "./UploadUpdateMarkdownRequest.js";
|
|
9
9
|
export { type UploadUpdateTextRequest } from "./UploadUpdateTextRequest.js";
|
|
10
|
+
export { type UploadBatchUploadMarkdownRequest } from "./UploadBatchUploadMarkdownRequest.js";
|
|
11
|
+
export { type UploadBatchUploadTextRequest } from "./UploadBatchUploadTextRequest.js";
|
|
10
12
|
export { type EmbeddingsUploadRequest } from "./EmbeddingsUploadRequest.js";
|
|
11
13
|
export { type EmbeddingsUpdateRequest } from "./EmbeddingsUpdateRequest.js";
|
|
12
14
|
export { type UploadScrapeWebpageRequest } from "./UploadScrapeWebpageRequest.js";
|
|
13
15
|
export { type UploadUpdateWebpageRequest } from "./UploadUpdateWebpageRequest.js";
|
|
16
|
+
export { type UploadBatchScrapeWebpageRequest } from "./UploadBatchScrapeWebpageRequest.js";
|
|
14
17
|
export { type UploadVerifyProcessingRequest } from "./UploadVerifyProcessingRequest.js";
|
|
@@ -87,14 +87,14 @@ export declare class UserMemory {
|
|
|
87
87
|
deleteUserMemory(request: CortexAI.UserMemoryDeleteUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.DeleteUserMemoryResponse>;
|
|
88
88
|
private __deleteUserMemory;
|
|
89
89
|
/**
|
|
90
|
-
* Find relevant user memories using semantic search.
|
|
90
|
+
* Find relevant user memories using semantic search and knowledge graph.
|
|
91
91
|
*
|
|
92
|
-
* This endpoint performs
|
|
93
|
-
*
|
|
94
|
-
*
|
|
92
|
+
* This endpoint performs parallel searches:
|
|
93
|
+
* 1. Semantic search in Weaviate across all stored user memories
|
|
94
|
+
* 2. Entity-based search in the knowledge graph for memory entities
|
|
95
95
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
96
|
+
* Results from both sources are combined and ranked by relevance to provide
|
|
97
|
+
* comprehensive memory retrieval.
|
|
98
98
|
*
|
|
99
99
|
* @param {CortexAI.RetrieveUserMemoryRequest} request
|
|
100
100
|
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -118,45 +118,14 @@ export declare class UserMemory {
|
|
|
118
118
|
retrieveUserMemory(request: CortexAI.RetrieveUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.RetrieveUserMemoryResponse>;
|
|
119
119
|
private __retrieveUserMemory;
|
|
120
120
|
/**
|
|
121
|
-
*
|
|
121
|
+
* Store new user memories for future reference.
|
|
122
122
|
*
|
|
123
|
-
* This endpoint
|
|
124
|
-
*
|
|
125
|
-
*
|
|
123
|
+
* This endpoint allows you to add memories in two formats:
|
|
124
|
+
* 1. Raw text string - A single text-based memory
|
|
125
|
+
* 2. User/Assistant pairs array - Conversation pairs that will be chunked as a single memory
|
|
126
126
|
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
* @param {CortexAI.GenerateUserMemoryRequest} request
|
|
131
|
-
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
132
|
-
*
|
|
133
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
134
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
135
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
136
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
137
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
138
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
139
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* await client.userMemory.generateUserMemory({
|
|
143
|
-
* tenant_id: "tenant_1234",
|
|
144
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
145
|
-
* user_message: "I prefer detailed technical explanations and works in the Pacific timezone",
|
|
146
|
-
* user_name: "John Doe"
|
|
147
|
-
* })
|
|
148
|
-
*/
|
|
149
|
-
generateUserMemory(request: CortexAI.GenerateUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.GenerateUserMemoryResponse>;
|
|
150
|
-
private __generateUserMemory;
|
|
151
|
-
/**
|
|
152
|
-
* Store a new user memory for future reference.
|
|
153
|
-
*
|
|
154
|
-
* This endpoint allows you to manually add a memory that will be stored and
|
|
155
|
-
* can be retrieved later through memory search. Use this to save important
|
|
156
|
-
* preferences, context, or information that you want the system to remember.
|
|
157
|
-
*
|
|
158
|
-
* The stored memory will be indexed and available for semantic search, making
|
|
159
|
-
* it accessible when relevant to future queries or interactions.
|
|
127
|
+
* The stored memories will be chunked, indexed in both Weaviate and the knowledge graph,
|
|
128
|
+
* and made available for semantic search and graph-based retrieval.
|
|
160
129
|
*
|
|
161
130
|
* @param {CortexAI.AddUserMemoryRequest} request
|
|
162
131
|
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -172,8 +141,7 @@ export declare class UserMemory {
|
|
|
172
141
|
* @example
|
|
173
142
|
* await client.userMemory.addUserMemory({
|
|
174
143
|
* tenant_id: "tenant_1234",
|
|
175
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
176
|
-
* user_memory: "I prefer detailed technical explanations and works in the Pacific timezone"
|
|
144
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
177
145
|
* })
|
|
178
146
|
*/
|
|
179
147
|
addUserMemory(request: CortexAI.AddUserMemoryRequest, requestOptions?: UserMemory.RequestOptions): core.HttpResponsePromise<CortexAI.AddUserMemoryResponse>;
|
|
@@ -230,14 +230,14 @@ class UserMemory {
|
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
/**
|
|
233
|
-
* Find relevant user memories using semantic search.
|
|
233
|
+
* Find relevant user memories using semantic search and knowledge graph.
|
|
234
234
|
*
|
|
235
|
-
* This endpoint performs
|
|
236
|
-
*
|
|
237
|
-
*
|
|
235
|
+
* This endpoint performs parallel searches:
|
|
236
|
+
* 1. Semantic search in Weaviate across all stored user memories
|
|
237
|
+
* 2. Entity-based search in the knowledge graph for memory entities
|
|
238
238
|
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
239
|
+
* Results from both sources are combined and ranked by relevance to provide
|
|
240
|
+
* comprehensive memory retrieval.
|
|
241
241
|
*
|
|
242
242
|
* @param {CortexAI.RetrieveUserMemoryRequest} request
|
|
243
243
|
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -329,110 +329,14 @@ class UserMemory {
|
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
/**
|
|
332
|
-
*
|
|
332
|
+
* Store new user memories for future reference.
|
|
333
333
|
*
|
|
334
|
-
* This endpoint
|
|
335
|
-
*
|
|
336
|
-
*
|
|
334
|
+
* This endpoint allows you to add memories in two formats:
|
|
335
|
+
* 1. Raw text string - A single text-based memory
|
|
336
|
+
* 2. User/Assistant pairs array - Conversation pairs that will be chunked as a single memory
|
|
337
337
|
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
340
|
-
*
|
|
341
|
-
* @param {CortexAI.GenerateUserMemoryRequest} request
|
|
342
|
-
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
343
|
-
*
|
|
344
|
-
* @throws {@link CortexAI.BadRequestError}
|
|
345
|
-
* @throws {@link CortexAI.UnauthorizedError}
|
|
346
|
-
* @throws {@link CortexAI.ForbiddenError}
|
|
347
|
-
* @throws {@link CortexAI.NotFoundError}
|
|
348
|
-
* @throws {@link CortexAI.UnprocessableEntityError}
|
|
349
|
-
* @throws {@link CortexAI.InternalServerError}
|
|
350
|
-
* @throws {@link CortexAI.ServiceUnavailableError}
|
|
351
|
-
*
|
|
352
|
-
* @example
|
|
353
|
-
* await client.userMemory.generateUserMemory({
|
|
354
|
-
* tenant_id: "tenant_1234",
|
|
355
|
-
* sub_tenant_id: "sub_tenant_4567",
|
|
356
|
-
* user_message: "I prefer detailed technical explanations and works in the Pacific timezone",
|
|
357
|
-
* user_name: "John Doe"
|
|
358
|
-
* })
|
|
359
|
-
*/
|
|
360
|
-
generateUserMemory(request, requestOptions) {
|
|
361
|
-
return core.HttpResponsePromise.fromPromise(this.__generateUserMemory(request, requestOptions));
|
|
362
|
-
}
|
|
363
|
-
async __generateUserMemory(request, requestOptions) {
|
|
364
|
-
var _a, _b, _c;
|
|
365
|
-
const { tenant_id: tenantId, sub_tenant_id: subTenantId } = request, _body = __rest(request, ["tenant_id", "sub_tenant_id"]);
|
|
366
|
-
const _queryParams = {};
|
|
367
|
-
_queryParams["tenant_id"] = tenantId;
|
|
368
|
-
if (subTenantId != null) {
|
|
369
|
-
_queryParams["sub_tenant_id"] = subTenantId;
|
|
370
|
-
}
|
|
371
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: await this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
372
|
-
const _response = await core.fetcher({
|
|
373
|
-
url: core.url.join((_c = (_b = (await core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (await core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CortexAIEnvironment.CortexProd, "user_memory/generate_user_memory"),
|
|
374
|
-
method: "POST",
|
|
375
|
-
headers: _headers,
|
|
376
|
-
contentType: "application/json",
|
|
377
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
378
|
-
requestType: "json",
|
|
379
|
-
body: _body,
|
|
380
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
381
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
382
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
383
|
-
});
|
|
384
|
-
if (_response.ok) {
|
|
385
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
386
|
-
}
|
|
387
|
-
if (_response.error.reason === "status-code") {
|
|
388
|
-
switch (_response.error.statusCode) {
|
|
389
|
-
case 400:
|
|
390
|
-
throw new CortexAI.BadRequestError(_response.error.body, _response.rawResponse);
|
|
391
|
-
case 401:
|
|
392
|
-
throw new CortexAI.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
393
|
-
case 403:
|
|
394
|
-
throw new CortexAI.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
395
|
-
case 404:
|
|
396
|
-
throw new CortexAI.NotFoundError(_response.error.body, _response.rawResponse);
|
|
397
|
-
case 422:
|
|
398
|
-
throw new CortexAI.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
399
|
-
case 500:
|
|
400
|
-
throw new CortexAI.InternalServerError(_response.error.body, _response.rawResponse);
|
|
401
|
-
case 503:
|
|
402
|
-
throw new CortexAI.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
403
|
-
default:
|
|
404
|
-
throw new errors.CortexAIError({
|
|
405
|
-
statusCode: _response.error.statusCode,
|
|
406
|
-
body: _response.error.body,
|
|
407
|
-
rawResponse: _response.rawResponse,
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
switch (_response.error.reason) {
|
|
412
|
-
case "non-json":
|
|
413
|
-
throw new errors.CortexAIError({
|
|
414
|
-
statusCode: _response.error.statusCode,
|
|
415
|
-
body: _response.error.rawBody,
|
|
416
|
-
rawResponse: _response.rawResponse,
|
|
417
|
-
});
|
|
418
|
-
case "timeout":
|
|
419
|
-
throw new errors.CortexAITimeoutError("Timeout exceeded when calling POST /user_memory/generate_user_memory.");
|
|
420
|
-
case "unknown":
|
|
421
|
-
throw new errors.CortexAIError({
|
|
422
|
-
message: _response.error.errorMessage,
|
|
423
|
-
rawResponse: _response.rawResponse,
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
/**
|
|
428
|
-
* Store a new user memory for future reference.
|
|
429
|
-
*
|
|
430
|
-
* This endpoint allows you to manually add a memory that will be stored and
|
|
431
|
-
* can be retrieved later through memory search. Use this to save important
|
|
432
|
-
* preferences, context, or information that you want the system to remember.
|
|
433
|
-
*
|
|
434
|
-
* The stored memory will be indexed and available for semantic search, making
|
|
435
|
-
* it accessible when relevant to future queries or interactions.
|
|
338
|
+
* The stored memories will be chunked, indexed in both Weaviate and the knowledge graph,
|
|
339
|
+
* and made available for semantic search and graph-based retrieval.
|
|
436
340
|
*
|
|
437
341
|
* @param {CortexAI.AddUserMemoryRequest} request
|
|
438
342
|
* @param {UserMemory.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -448,8 +352,7 @@ class UserMemory {
|
|
|
448
352
|
* @example
|
|
449
353
|
* await client.userMemory.addUserMemory({
|
|
450
354
|
* tenant_id: "tenant_1234",
|
|
451
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
452
|
-
* user_memory: "I prefer detailed technical explanations and works in the Pacific timezone"
|
|
355
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
453
356
|
* })
|
|
454
357
|
*/
|
|
455
358
|
addUserMemory(request, requestOptions) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as CortexAI from "../../../../index.js";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
7
8
|
* tenant_id: "tenant_1234",
|
|
8
|
-
* sub_tenant_id: "sub_tenant_4567"
|
|
9
|
-
* user_memory: "I prefer detailed technical explanations and works in the Pacific timezone"
|
|
9
|
+
* sub_tenant_id: "sub_tenant_4567"
|
|
10
10
|
* }
|
|
11
11
|
*/
|
|
12
12
|
export interface AddUserMemoryRequest {
|
|
@@ -14,6 +14,14 @@ export interface AddUserMemoryRequest {
|
|
|
14
14
|
tenant_id: string;
|
|
15
15
|
/** Optional sub-tenant identifier used to organize data within a tenant. If omitted, the default sub-tenant created during tenant setup will be used. */
|
|
16
16
|
sub_tenant_id?: string;
|
|
17
|
-
/**
|
|
18
|
-
|
|
17
|
+
/** Single raw text memory to store */
|
|
18
|
+
raw_text?: string;
|
|
19
|
+
/** Array of user/assistant conversation pairs to store as a single memory */
|
|
20
|
+
user_assistant_pairs?: CortexAI.UserAssistantPair[];
|
|
21
|
+
/** Expiry time in seconds for the memory (optional) */
|
|
22
|
+
expiry_time?: number;
|
|
23
|
+
/** If true, process and compress chunks into inferred representations before indexing (default: False) */
|
|
24
|
+
infer?: boolean;
|
|
25
|
+
/** Custom instructions to guide cortex */
|
|
26
|
+
custom_instructions?: string;
|
|
19
27
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { type UserMemoryListUserMemoriesRequest } from "./UserMemoryListUserMemoriesRequest.js";
|
|
2
2
|
export { type UserMemoryDeleteUserMemoryRequest } from "./UserMemoryDeleteUserMemoryRequest.js";
|
|
3
3
|
export { type RetrieveUserMemoryRequest } from "./RetrieveUserMemoryRequest.js";
|
|
4
|
-
export { type GenerateUserMemoryRequest } from "./GenerateUserMemoryRequest.js";
|
|
5
4
|
export { type AddUserMemoryRequest } from "./AddUserMemoryRequest.js";
|
|
@@ -10,5 +10,7 @@ export interface AddUserMemoryResponse {
|
|
|
10
10
|
/** Confirms whether the memory was successfully stored in the system */
|
|
11
11
|
user_memory_added: boolean;
|
|
12
12
|
/** Unique identifier assigned to the newly created memory */
|
|
13
|
-
memory_id
|
|
13
|
+
memory_id: string;
|
|
14
|
+
/** Total number of chunks created from the memory */
|
|
15
|
+
chunks_created?: number;
|
|
14
16
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface Entity {
|
|
5
|
+
/** Normalized entity name */
|
|
6
|
+
name: string;
|
|
7
|
+
/** PERSON, ORGANIZATION, PROJECT, PRODUCT, ERROR_CODE, etc. */
|
|
8
|
+
type: string;
|
|
9
|
+
/** Context category like 'employees', 'projects' */
|
|
10
|
+
namespace?: string;
|
|
11
|
+
/** Unique ID like email, employee_id, URL */
|
|
12
|
+
identifier?: string;
|
|
13
|
+
/** Internal unique entity ID from graph database */
|
|
14
|
+
entity_id?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
export interface GraphRelationsResponse {
|
|
6
|
+
/** List of relations retrieved */
|
|
7
|
+
relations: (CortexAI.TripleWithEvidence | undefined)[];
|
|
8
|
+
/** Indicates whether the request was successful */
|
|
9
|
+
success?: boolean;
|
|
10
|
+
/** Response message describing the operation result */
|
|
11
|
+
message?: string;
|
|
12
|
+
}
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
export interface ProcessingStatus {
|
|
5
5
|
/** Identifier for the file whose status is being retrieved */
|
|
6
6
|
file_id: string;
|
|
7
|
-
/** Current status of the file. Possible values are 'queued', 'processing', 'completed', '
|
|
7
|
+
/** Current status of the file. Possible values are 'queued', 'processing', 'completed', 'errored' */
|
|
8
8
|
indexing_status: string;
|
|
9
|
+
/** Error code for the file. You may share this code with us to help us diagnose and resolve the issue. */
|
|
10
|
+
error_code?: string;
|
|
9
11
|
success?: boolean;
|
|
10
12
|
/** Detailed status message about the processing operation */
|
|
11
13
|
message?: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Single piece of evidence for a relationship between two entities
|
|
6
|
+
*/
|
|
7
|
+
export interface RelationEvidence {
|
|
8
|
+
/** Relationship phrase like 'works for', 'reports to' */
|
|
9
|
+
canonical_predicate: string;
|
|
10
|
+
/** Original predicate from text */
|
|
11
|
+
raw_predicate: string;
|
|
12
|
+
/** Rich contextual description of the relationship with surrounding information, details about how/why/when, and any relevant background. Should be comprehensive enough to understand the relationship without referring back to source. */
|
|
13
|
+
context: string;
|
|
14
|
+
/** Confidence score */
|
|
15
|
+
confidence?: number;
|
|
16
|
+
/** Temporal timing information extracted from text (e.g., 'last week', 'in 2023', 'yesterday') */
|
|
17
|
+
temporal_details?: string;
|
|
18
|
+
/** Timestamp when this relation was introduced */
|
|
19
|
+
timestamp?: string;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.RetrieveMode = void 0;
|
|
7
|
+
exports.RetrieveMode = {
|
|
8
|
+
Fast: "fast",
|
|
9
|
+
Accurate: "accurate",
|
|
10
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
export interface RetrieveResponse {
|
|
6
|
+
/** Retrieved content chunks */
|
|
7
|
+
chunks?: CortexAI.SearchChunk[];
|
|
8
|
+
/** Extra graph context which will help you agent get better understanding of the entities involved in query. */
|
|
9
|
+
extra_graph_context?: CortexAI.TripleWithEvidence[];
|
|
10
|
+
/** Additional metadata about the retrieval run */
|
|
11
|
+
metadata?: Record<string, unknown>;
|
|
12
|
+
}
|
|
@@ -10,4 +10,6 @@ export interface RetrieveUserMemoryResponse {
|
|
|
10
10
|
success: boolean;
|
|
11
11
|
/** Array of user memories ranked by relevance to your search query */
|
|
12
12
|
retrieved_user_memories?: CortexAI.UserMemory[];
|
|
13
|
+
/** Array of relations extracted from the user query */
|
|
14
|
+
relations?: CortexAI.TripleWithEvidence[];
|
|
13
15
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
4
5
|
export interface SearchChunk {
|
|
5
6
|
/** Unique identifier for this content chunk */
|
|
6
7
|
chunk_uuid: string;
|
|
@@ -24,4 +25,6 @@ export interface SearchChunk {
|
|
|
24
25
|
document_metadata?: Record<string, unknown>;
|
|
25
26
|
/** Custom metadata associated with your tenant */
|
|
26
27
|
tenant_metadata?: Record<string, unknown>;
|
|
28
|
+
/** Additional context for this chunk */
|
|
29
|
+
extra_context?: CortexAI.ExtendedContext;
|
|
27
30
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as CortexAI from "../index.js";
|
|
5
|
+
/**
|
|
6
|
+
* Triple with multiple evidence items from different chunks
|
|
7
|
+
*/
|
|
8
|
+
export interface TripleWithEvidence {
|
|
9
|
+
source: CortexAI.Entity;
|
|
10
|
+
target: CortexAI.Entity;
|
|
11
|
+
/** Array of relation evidences */
|
|
12
|
+
relations: CortexAI.RelationEvidence[];
|
|
13
|
+
/** The chunk_id these relations are associated with */
|
|
14
|
+
chunk_id: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export interface WebpageScrapeRequest {
|
|
5
|
+
/** The URL of the webpage to scrape and index */
|
|
6
|
+
web_url: string;
|
|
7
|
+
/** Optional custom file ID for the scraped content. If not provided, a unique ID will be generated */
|
|
8
|
+
file_id?: string;
|
|
9
|
+
}
|
|
@@ -15,18 +15,22 @@ export * from "./EmbeddingsCreateCollectionData.js";
|
|
|
15
15
|
export * from "./EmbeddingsDeleteData.js";
|
|
16
16
|
export * from "./EmbeddingsGetData.js";
|
|
17
17
|
export * from "./EmbeddingsSearchData.js";
|
|
18
|
+
export * from "./Entity.js";
|
|
18
19
|
export * from "./ErrorResponse.js";
|
|
19
20
|
export * from "./ExtendedContext.js";
|
|
20
21
|
export * from "./FetchContentData.js";
|
|
21
22
|
export * from "./FileUploadResult.js";
|
|
22
|
-
export * from "./
|
|
23
|
+
export * from "./GraphRelationsResponse.js";
|
|
23
24
|
export * from "./HttpValidationError.js";
|
|
24
25
|
export * from "./ListSourcesResponse.js";
|
|
25
26
|
export * from "./ListUserMemoriesResponse.js";
|
|
26
27
|
export * from "./MarkdownUploadRequest.js";
|
|
27
28
|
export * from "./ProcessingStatus.js";
|
|
28
29
|
export * from "./RelatedChunk.js";
|
|
30
|
+
export * from "./RelationEvidence.js";
|
|
29
31
|
export * from "./Relations.js";
|
|
32
|
+
export * from "./RetrieveMode.js";
|
|
33
|
+
export * from "./RetrieveResponse.js";
|
|
30
34
|
export * from "./RetrieveUserMemoryResponse.js";
|
|
31
35
|
export * from "./SearchChunk.js";
|
|
32
36
|
export * from "./SingleUploadData.js";
|
|
@@ -35,5 +39,8 @@ export * from "./SourceModel.js";
|
|
|
35
39
|
export * from "./SubTenantIdsData.js";
|
|
36
40
|
export * from "./TenantCreateData.js";
|
|
37
41
|
export * from "./TenantStats.js";
|
|
42
|
+
export * from "./TripleWithEvidence.js";
|
|
43
|
+
export * from "./UserAssistantPair.js";
|
|
38
44
|
export * from "./UserMemory.js";
|
|
39
45
|
export * from "./ValidationError.js";
|
|
46
|
+
export * from "./WebpageScrapeRequest.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -31,18 +31,22 @@ __exportStar(require("./EmbeddingsCreateCollectionData.js"), exports);
|
|
|
31
31
|
__exportStar(require("./EmbeddingsDeleteData.js"), exports);
|
|
32
32
|
__exportStar(require("./EmbeddingsGetData.js"), exports);
|
|
33
33
|
__exportStar(require("./EmbeddingsSearchData.js"), exports);
|
|
34
|
+
__exportStar(require("./Entity.js"), exports);
|
|
34
35
|
__exportStar(require("./ErrorResponse.js"), exports);
|
|
35
36
|
__exportStar(require("./ExtendedContext.js"), exports);
|
|
36
37
|
__exportStar(require("./FetchContentData.js"), exports);
|
|
37
38
|
__exportStar(require("./FileUploadResult.js"), exports);
|
|
38
|
-
__exportStar(require("./
|
|
39
|
+
__exportStar(require("./GraphRelationsResponse.js"), exports);
|
|
39
40
|
__exportStar(require("./HttpValidationError.js"), exports);
|
|
40
41
|
__exportStar(require("./ListSourcesResponse.js"), exports);
|
|
41
42
|
__exportStar(require("./ListUserMemoriesResponse.js"), exports);
|
|
42
43
|
__exportStar(require("./MarkdownUploadRequest.js"), exports);
|
|
43
44
|
__exportStar(require("./ProcessingStatus.js"), exports);
|
|
44
45
|
__exportStar(require("./RelatedChunk.js"), exports);
|
|
46
|
+
__exportStar(require("./RelationEvidence.js"), exports);
|
|
45
47
|
__exportStar(require("./Relations.js"), exports);
|
|
48
|
+
__exportStar(require("./RetrieveMode.js"), exports);
|
|
49
|
+
__exportStar(require("./RetrieveResponse.js"), exports);
|
|
46
50
|
__exportStar(require("./RetrieveUserMemoryResponse.js"), exports);
|
|
47
51
|
__exportStar(require("./SearchChunk.js"), exports);
|
|
48
52
|
__exportStar(require("./SingleUploadData.js"), exports);
|
|
@@ -51,5 +55,8 @@ __exportStar(require("./SourceModel.js"), exports);
|
|
|
51
55
|
__exportStar(require("./SubTenantIdsData.js"), exports);
|
|
52
56
|
__exportStar(require("./TenantCreateData.js"), exports);
|
|
53
57
|
__exportStar(require("./TenantStats.js"), exports);
|
|
58
|
+
__exportStar(require("./TripleWithEvidence.js"), exports);
|
|
59
|
+
__exportStar(require("./UserAssistantPair.js"), exports);
|
|
54
60
|
__exportStar(require("./UserMemory.js"), exports);
|
|
55
61
|
__exportStar(require("./ValidationError.js"), exports);
|
|
62
|
+
__exportStar(require("./WebpageScrapeRequest.js"), exports);
|