@memori.ai/memori-api-client 5.2.0 → 5.3.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/CHANGELOG.md +14 -0
- package/dist/backend/user.d.ts +5 -1
- package/dist/backend/user.js +5 -0
- package/dist/backend/user.js.map +1 -1
- package/dist/backend.d.ts +8 -0
- package/dist/client.test.js +19 -0
- package/dist/client.test.js.map +1 -1
- package/dist/engine/chatLogs.d.ts +3 -0
- package/dist/engine/chatLogs.js +4 -0
- package/dist/engine/chatLogs.js.map +1 -1
- package/dist/engine/functions.d.ts +4 -0
- package/dist/engine/functions.js +4 -0
- package/dist/engine/functions.js.map +1 -1
- package/dist/engine/search.d.ts +1 -0
- package/dist/engine/search.js.map +1 -1
- package/dist/engine.d.ts +18 -2
- package/dist/index.d.ts +26 -2
- package/dist/types.d.ts +382 -270
- package/esm/backend/user.d.ts +5 -1
- package/esm/backend/user.js +5 -0
- package/esm/backend/user.js.map +1 -1
- package/esm/backend.d.ts +8 -0
- package/esm/client.test.js +19 -0
- package/esm/client.test.js.map +1 -1
- package/esm/engine/chatLogs.d.ts +3 -0
- package/esm/engine/chatLogs.js +4 -0
- package/esm/engine/chatLogs.js.map +1 -1
- package/esm/engine/functions.d.ts +4 -0
- package/esm/engine/functions.js +4 -0
- package/esm/engine/functions.js.map +1 -1
- package/esm/engine/search.d.ts +1 -0
- package/esm/engine/search.js.map +1 -1
- package/esm/engine.d.ts +18 -2
- package/esm/index.d.ts +26 -2
- package/esm/types.d.ts +382 -270
- package/package.json +1 -1
- package/src/backend/user.ts +20 -1
- package/src/client.test.ts +42 -0
- package/src/engine/chatLogs.ts +27 -0
- package/src/engine/functions.ts +21 -0
- package/src/engine/search.ts +1 -0
- package/src/types.ts +545 -320
package/src/types.ts
CHANGED
|
@@ -4,6 +4,7 @@ export declare type Error = {
|
|
|
4
4
|
};
|
|
5
5
|
|
|
6
6
|
export declare type ResponseSpec = {
|
|
7
|
+
count?: number;
|
|
7
8
|
requestID: string;
|
|
8
9
|
requestDateTime: string;
|
|
9
10
|
resultCode: number;
|
|
@@ -65,9 +66,13 @@ export declare type Memori = {
|
|
|
65
66
|
disableR4Loop?: boolean;
|
|
66
67
|
disableR5Loop?: boolean;
|
|
67
68
|
ageRestriction?: number;
|
|
69
|
+
confidenceOffset?: number;
|
|
68
70
|
nsfw?: boolean;
|
|
69
71
|
enableCompletions?: boolean;
|
|
70
72
|
completionDescription?: string;
|
|
73
|
+
enableDeepThought?: boolean;
|
|
74
|
+
enableBoardOfExperts?: boolean;
|
|
75
|
+
disableCompletionMediaExtraction?: boolean;
|
|
71
76
|
completionConfigNameForQuestionAnswering?: string;
|
|
72
77
|
completionConfigForQuestionAnswering?: CompletionConfig;
|
|
73
78
|
completionConfigNameForImportExport?: string;
|
|
@@ -76,9 +81,6 @@ export declare type Memori = {
|
|
|
76
81
|
completionConfigForDeepThought?: CompletionConfig;
|
|
77
82
|
completionTemperature?: number;
|
|
78
83
|
completionMaxTokens?: number;
|
|
79
|
-
enableDeepThought?: boolean;
|
|
80
|
-
enableBoardOfExperts?: boolean;
|
|
81
|
-
disableCompletionMediaExtraction?: boolean;
|
|
82
84
|
chainingMemoriID?: string;
|
|
83
85
|
chainingBaseURL?: string;
|
|
84
86
|
chainingPassword?: string;
|
|
@@ -109,13 +111,16 @@ export declare type Memori = {
|
|
|
109
111
|
sentInvitations?: Invitation[];
|
|
110
112
|
receivedInvitations?: Invitation[];
|
|
111
113
|
categories?: string[];
|
|
114
|
+
enableMacroFunctions?: string[];
|
|
115
|
+
macroParameters?: { [key: string]: any };
|
|
112
116
|
ownerUserName?: string;
|
|
113
117
|
gamificationLevel?: GamificationLevel;
|
|
114
118
|
contentQualityIndex?: number;
|
|
115
119
|
contentQualityIndexTimestamp?: string;
|
|
120
|
+
alwaysAnswerWithCompletion?: boolean;
|
|
116
121
|
};
|
|
117
122
|
|
|
118
|
-
export type CompletionConfig = {
|
|
123
|
+
export declare type CompletionConfig = {
|
|
119
124
|
/**
|
|
120
125
|
* @type {string}
|
|
121
126
|
* Completion Config object ID.
|
|
@@ -139,7 +144,12 @@ export type CompletionConfig = {
|
|
|
139
144
|
* - Mistral
|
|
140
145
|
* - Azure_OpenAI
|
|
141
146
|
*/
|
|
142
|
-
provider:
|
|
147
|
+
provider:
|
|
148
|
+
| 'OpenAI'
|
|
149
|
+
| 'Anthropic'
|
|
150
|
+
| 'Mistral'
|
|
151
|
+
| 'Azure_OpenAI'
|
|
152
|
+
| 'AWS_Anthropic';
|
|
143
153
|
/**
|
|
144
154
|
* @type {string=}
|
|
145
155
|
* URL of the Completion Provider API end-point. If not specified, the default end-point for the provider is used.
|
|
@@ -200,8 +210,51 @@ export type CompletionConfig = {
|
|
|
200
210
|
* If not specified False is assumed.
|
|
201
211
|
*/
|
|
202
212
|
visibleToOtherUsers?: boolean;
|
|
213
|
+
/**
|
|
214
|
+
* @type {boolean=}
|
|
215
|
+
* If True this configuration is used as the default (for the operations it is enabled for) when a new Memori is created.
|
|
216
|
+
* The use as default requires that the configuration is visible at least to the owner's Tenant users.
|
|
217
|
+
*/
|
|
218
|
+
useAsDefault?: boolean;
|
|
219
|
+
/**
|
|
220
|
+
* @type {boolean=}
|
|
221
|
+
* If True the use of this configuration is chargeable to the customer.
|
|
222
|
+
*/
|
|
223
|
+
chargeable?: boolean;
|
|
224
|
+
/**
|
|
225
|
+
* @type {string=}
|
|
226
|
+
* Region of the AWS Anthropic model.
|
|
227
|
+
*/
|
|
228
|
+
region?: string;
|
|
229
|
+
/**
|
|
230
|
+
* @type {string=}
|
|
231
|
+
* Model ID of the AWS Anthropic model.
|
|
232
|
+
*/
|
|
233
|
+
modelId?: string;
|
|
234
|
+
/**
|
|
235
|
+
* @type {string=}
|
|
236
|
+
* Access Key ID of the AWS Anthropic model.
|
|
237
|
+
*/
|
|
238
|
+
accessKeyId?: string;
|
|
239
|
+
/**
|
|
240
|
+
* @type {string=}
|
|
241
|
+
* Secret Access Key of the AWS Anthropic model.
|
|
242
|
+
*/
|
|
243
|
+
secretAccessKey?: string;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @type {string=}
|
|
247
|
+
* If True this configuration is applied to all Memori of the Tenant.
|
|
248
|
+
*/
|
|
249
|
+
applyTo?: ApplyToOption;
|
|
203
250
|
};
|
|
204
251
|
|
|
252
|
+
export declare type ApplyToOption =
|
|
253
|
+
| 'ALL_TENANT_MEMORI_ONLY_QA_PURPOSE'
|
|
254
|
+
| 'ALL_TENANT_MEMORI_ONLY_IE_PURPOSE'
|
|
255
|
+
| 'ALL_TENANT_MEMORI_ONLY_DT_PURPOSE'
|
|
256
|
+
| 'ALL_TENANT_MEMORI_ALL_ENABLED_PURPOSES';
|
|
257
|
+
|
|
205
258
|
export declare type Venue = {
|
|
206
259
|
placeName: string;
|
|
207
260
|
latitude: number;
|
|
@@ -209,6 +262,31 @@ export declare type Venue = {
|
|
|
209
262
|
uncertainty?: number;
|
|
210
263
|
};
|
|
211
264
|
|
|
265
|
+
export declare type NominatimItem = {
|
|
266
|
+
place_id: number;
|
|
267
|
+
lat: number;
|
|
268
|
+
lon: number;
|
|
269
|
+
display_name: string;
|
|
270
|
+
type: string;
|
|
271
|
+
category: string;
|
|
272
|
+
importance: number;
|
|
273
|
+
place_rank: number;
|
|
274
|
+
address?: {
|
|
275
|
+
house_number?: string;
|
|
276
|
+
road?: string;
|
|
277
|
+
hamlet?: string;
|
|
278
|
+
village?: string;
|
|
279
|
+
suburb?: string;
|
|
280
|
+
town?: string;
|
|
281
|
+
city?: string;
|
|
282
|
+
municipality?: string;
|
|
283
|
+
county?: string;
|
|
284
|
+
state?: string;
|
|
285
|
+
country: string;
|
|
286
|
+
};
|
|
287
|
+
boundingbox: [number, number, number, number];
|
|
288
|
+
};
|
|
289
|
+
|
|
212
290
|
export declare type NotificationPrefs = {
|
|
213
291
|
/**
|
|
214
292
|
* @type {string='None'}
|
|
@@ -281,6 +359,56 @@ export declare type User = {
|
|
|
281
359
|
avatar3DURLType?: string;
|
|
282
360
|
};
|
|
283
361
|
|
|
362
|
+
export declare type UserFilters = {
|
|
363
|
+
periodFrom?: string | undefined; //
|
|
364
|
+
periodTo?: string | undefined; //
|
|
365
|
+
tenantName?: string | undefined; //
|
|
366
|
+
text?: string | undefined; //
|
|
367
|
+
numberOfResults: number; //
|
|
368
|
+
startFrom: number; //
|
|
369
|
+
orderBy?: OrderBy | undefined; //
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
export declare type OrderBy =
|
|
373
|
+
| 'CreationDateAscending'
|
|
374
|
+
| 'CreationDateDescending'
|
|
375
|
+
| 'MemoriCountAscending'
|
|
376
|
+
| 'MemoriCountDescending'
|
|
377
|
+
| 'MonthCompletionsAscending'
|
|
378
|
+
| 'MonthCompletionsDescending'
|
|
379
|
+
| 'MonthImportSizeAscending'
|
|
380
|
+
| 'MonthImportSizeDescending';
|
|
381
|
+
|
|
382
|
+
export declare type MemoriUser = {
|
|
383
|
+
userID: string;
|
|
384
|
+
email: string;
|
|
385
|
+
userName: string;
|
|
386
|
+
tenantName: string;
|
|
387
|
+
disableDeepThought: boolean;
|
|
388
|
+
|
|
389
|
+
creationTimestamp: string;
|
|
390
|
+
creationSessionID: string;
|
|
391
|
+
lastChangeTimestamp: string;
|
|
392
|
+
lastChangeSessionID: string;
|
|
393
|
+
};
|
|
394
|
+
|
|
395
|
+
export declare type Topic = {
|
|
396
|
+
topicID: string;
|
|
397
|
+
/**
|
|
398
|
+
* Topic name.
|
|
399
|
+
*/
|
|
400
|
+
name: string;
|
|
401
|
+
/**
|
|
402
|
+
* Topic weight, i.e. the ratio between the number of times this topic has been referenced versus to total number of references.
|
|
403
|
+
*/
|
|
404
|
+
weight: number;
|
|
405
|
+
|
|
406
|
+
creationTimestamp: string;
|
|
407
|
+
creationSessionID: string;
|
|
408
|
+
lastChangeTimestamp: string;
|
|
409
|
+
lastChangeSessionID: string;
|
|
410
|
+
};
|
|
411
|
+
|
|
284
412
|
export declare type IntegrationResource = {
|
|
285
413
|
name: string;
|
|
286
414
|
url: string;
|
|
@@ -352,13 +480,14 @@ export interface UploadFile<T = any> {
|
|
|
352
480
|
preview?: string;
|
|
353
481
|
}
|
|
354
482
|
|
|
355
|
-
export type TenantConfig = {
|
|
483
|
+
export declare type TenantConfig = {
|
|
356
484
|
name: string;
|
|
357
485
|
showNewUser: boolean;
|
|
358
486
|
requirePosition: boolean;
|
|
487
|
+
showVirtualSpaces?: boolean;
|
|
359
488
|
};
|
|
360
489
|
|
|
361
|
-
export type TenantBase = {
|
|
490
|
+
export declare type TenantBase = {
|
|
362
491
|
tenantID?: string;
|
|
363
492
|
name?: string;
|
|
364
493
|
description?: string;
|
|
@@ -397,179 +526,12 @@ export type TenantBase = {
|
|
|
397
526
|
lastChangeTimestamp?: string;
|
|
398
527
|
};
|
|
399
528
|
|
|
400
|
-
export type Tenant = TenantBase & {
|
|
529
|
+
export declare type Tenant = TenantBase & {
|
|
401
530
|
id: string;
|
|
402
531
|
theme: string;
|
|
403
532
|
config: TenantConfig;
|
|
404
533
|
};
|
|
405
534
|
|
|
406
|
-
export declare type OpenSession = {
|
|
407
|
-
memoriID: string;
|
|
408
|
-
password?: string;
|
|
409
|
-
recoveryTokens?: string[];
|
|
410
|
-
tag?: string;
|
|
411
|
-
pin?: string;
|
|
412
|
-
initialContextVars?: { [key: string]: string };
|
|
413
|
-
initialQuestion?: string;
|
|
414
|
-
forceCloseSessions?: boolean;
|
|
415
|
-
birthDate?: string;
|
|
416
|
-
additionalInfo?: {
|
|
417
|
-
loginToken?: string;
|
|
418
|
-
language?: string;
|
|
419
|
-
referral?: string;
|
|
420
|
-
};
|
|
421
|
-
};
|
|
422
|
-
|
|
423
|
-
export declare type MemoriSession = {
|
|
424
|
-
sessionID: string;
|
|
425
|
-
currentState: DialogState;
|
|
426
|
-
stats?: Stats;
|
|
427
|
-
};
|
|
428
|
-
|
|
429
|
-
export declare type Medium = {
|
|
430
|
-
mediumID: string;
|
|
431
|
-
url?: string;
|
|
432
|
-
content?: string;
|
|
433
|
-
mimeType: string;
|
|
434
|
-
title?: string;
|
|
435
|
-
properties?: { [key: string]: any };
|
|
436
|
-
creationTimestamp?: string;
|
|
437
|
-
creationName?: string;
|
|
438
|
-
lastChangeTimestamp?: string;
|
|
439
|
-
lastChangeName?: string;
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
export declare type Stats = {
|
|
443
|
-
totalReceivers: number;
|
|
444
|
-
receiversWithMemories: number;
|
|
445
|
-
totalMemories: number;
|
|
446
|
-
publicMemories: number;
|
|
447
|
-
memoriesWithMedia: number;
|
|
448
|
-
totalQuestions: number;
|
|
449
|
-
publicQuestions: number;
|
|
450
|
-
questionsWithMoreThanOneAnswer: number;
|
|
451
|
-
totalStories: number;
|
|
452
|
-
publicStories: number;
|
|
453
|
-
storiesWithDate: number;
|
|
454
|
-
storiesWithPlace: number;
|
|
455
|
-
storiesWithDateAndPlace: number;
|
|
456
|
-
unansweredQuestions: number;
|
|
457
|
-
successfulCorrelations: number;
|
|
458
|
-
failedCorrelations: number;
|
|
459
|
-
};
|
|
460
|
-
|
|
461
|
-
export declare type GamificationLevel = {
|
|
462
|
-
points: number;
|
|
463
|
-
badge: string;
|
|
464
|
-
pointsForCurrentBadge: number;
|
|
465
|
-
nextBadge?: {
|
|
466
|
-
points: number;
|
|
467
|
-
badge: string;
|
|
468
|
-
};
|
|
469
|
-
};
|
|
470
|
-
|
|
471
|
-
export declare type EventLog = {
|
|
472
|
-
eventLogID: string;
|
|
473
|
-
timestamp: string;
|
|
474
|
-
eventType: string;
|
|
475
|
-
memoriID: string;
|
|
476
|
-
userAgent?: string;
|
|
477
|
-
ipAddress?: string;
|
|
478
|
-
memoryID?: string;
|
|
479
|
-
intentID?: string;
|
|
480
|
-
enteredText?: string;
|
|
481
|
-
receiverTag?: string;
|
|
482
|
-
};
|
|
483
|
-
|
|
484
|
-
export declare type UserLog = {
|
|
485
|
-
timestamp: string;
|
|
486
|
-
count: number;
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
export declare type UsersLog = {
|
|
490
|
-
timestamp: string;
|
|
491
|
-
countUsers: number;
|
|
492
|
-
countRecurrentUsers: number;
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
export declare type TranslatedHint = {
|
|
496
|
-
text: string;
|
|
497
|
-
originalText: string;
|
|
498
|
-
};
|
|
499
|
-
|
|
500
|
-
export declare type DialogState = {
|
|
501
|
-
state: string;
|
|
502
|
-
stateName: string;
|
|
503
|
-
previousState: string;
|
|
504
|
-
confidence?: number;
|
|
505
|
-
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
506
|
-
emission?: string;
|
|
507
|
-
translatedEmission?: string;
|
|
508
|
-
emitter?: string;
|
|
509
|
-
completion?: boolean;
|
|
510
|
-
continuationEmitted?: boolean;
|
|
511
|
-
lastMatchedMemoryID?: string;
|
|
512
|
-
acceptsTimeout?: boolean;
|
|
513
|
-
acceptsAbort?: boolean;
|
|
514
|
-
acceptsMedia?: boolean;
|
|
515
|
-
acceptsDate?: boolean;
|
|
516
|
-
acceptsPlace?: boolean;
|
|
517
|
-
acceptsTag?: boolean;
|
|
518
|
-
acceptsFeedback?: boolean;
|
|
519
|
-
hints?: string[];
|
|
520
|
-
timeout?: number;
|
|
521
|
-
translatedHints?: TranslatedHint[];
|
|
522
|
-
currentTag?: string;
|
|
523
|
-
currentDate?: string;
|
|
524
|
-
currentPlaceName?: string;
|
|
525
|
-
currentLatitude?: number;
|
|
526
|
-
currentLongitude?: number;
|
|
527
|
-
currentUncertaintyKm?: number;
|
|
528
|
-
giverID?: string;
|
|
529
|
-
currentReceiverID?: string;
|
|
530
|
-
currentMemoryID?: string;
|
|
531
|
-
media?: Medium[];
|
|
532
|
-
knownTags?: { [key: string]: string };
|
|
533
|
-
contextVars?: { [key: string]: string };
|
|
534
|
-
memoryTags?: string[];
|
|
535
|
-
};
|
|
536
|
-
|
|
537
|
-
export declare type Person = {
|
|
538
|
-
personID?: string;
|
|
539
|
-
personType: 'Giver' | 'Receiver';
|
|
540
|
-
name?: string;
|
|
541
|
-
information?: string;
|
|
542
|
-
pin: string;
|
|
543
|
-
tag: string;
|
|
544
|
-
creationTimestamp?: string;
|
|
545
|
-
creationName?: string;
|
|
546
|
-
lastChangeTimestamp?: string;
|
|
547
|
-
lastChangeName?: string;
|
|
548
|
-
};
|
|
549
|
-
|
|
550
|
-
export declare type PersonificationProfile = {
|
|
551
|
-
tag?: string;
|
|
552
|
-
pin?: string;
|
|
553
|
-
name?: string;
|
|
554
|
-
sessionID: string;
|
|
555
|
-
};
|
|
556
|
-
|
|
557
|
-
export declare type Invitation = {
|
|
558
|
-
invitationID?: string;
|
|
559
|
-
memoriID: string;
|
|
560
|
-
isInviter?: boolean;
|
|
561
|
-
isInvitee?: boolean;
|
|
562
|
-
text?: string;
|
|
563
|
-
destinationEMail: string;
|
|
564
|
-
destinationName: string;
|
|
565
|
-
tag: string;
|
|
566
|
-
pin: string;
|
|
567
|
-
type: string;
|
|
568
|
-
state?: 'PENDING' | 'ACCEPTED' | 'REJECTED';
|
|
569
|
-
creationTimestamp?: string;
|
|
570
|
-
lastChangeTimestamp?: string;
|
|
571
|
-
};
|
|
572
|
-
|
|
573
535
|
export declare type LocalizationKeyContent = {
|
|
574
536
|
key: string;
|
|
575
537
|
value: string;
|
|
@@ -594,10 +556,67 @@ export declare type Asset = {
|
|
|
594
556
|
lastChangeTimestamp: string;
|
|
595
557
|
};
|
|
596
558
|
|
|
597
|
-
export type
|
|
559
|
+
export declare type CustomWord = {
|
|
560
|
+
customWordID: string;
|
|
561
|
+
word: string;
|
|
562
|
+
|
|
563
|
+
/**
|
|
564
|
+
* Definition of the Custom Word, in terms of sums and subtractions of existing words or custom words.
|
|
565
|
+
* The syntax for a Custom Word definition is as follows: word1 [+-] word2 [+-] word3...
|
|
566
|
+
* If the operator is omitted it is assumed to be the last specified from the left, and if no operator has been specified it is assumed to be the sum.
|
|
567
|
+
* E.g.:
|
|
568
|
+
* - alpha beta gamma is equivalent to alpha + beta + gamma
|
|
569
|
+
* - alpha beta - gamma deta is equivalent to alpha + beta - gamma - delta
|
|
570
|
+
*/
|
|
571
|
+
definition: string;
|
|
572
|
+
|
|
573
|
+
creationTimestamp: string;
|
|
574
|
+
creationSessionID: string;
|
|
575
|
+
lastChangeTimestamp: string;
|
|
576
|
+
lastChangeSessionID: string;
|
|
577
|
+
};
|
|
578
|
+
|
|
579
|
+
export declare type ConsumptionLog = {
|
|
580
|
+
consumptionLogID: string;
|
|
581
|
+
from: string;
|
|
582
|
+
to: string;
|
|
583
|
+
type: 'Daily' | 'Monthly';
|
|
584
|
+
userID?: string;
|
|
585
|
+
userName?: string;
|
|
586
|
+
tenantName?: string;
|
|
587
|
+
memoriID?: string;
|
|
588
|
+
memoriName?: string;
|
|
589
|
+
totalSessions: number;
|
|
590
|
+
validSessions: number;
|
|
591
|
+
completions: number;
|
|
592
|
+
deepThoughtValidSessions: number;
|
|
593
|
+
deepThoughtCompletions: number;
|
|
594
|
+
importedSize: number;
|
|
595
|
+
nonChargeableCompletions?: number;
|
|
596
|
+
nonChargeableDeepThoughtCompletions?: number;
|
|
597
|
+
nonChargeableImportedSize?: number;
|
|
598
|
+
promptTokens: { [key: string]: number };
|
|
599
|
+
completionTokens: { [key: string]: number };
|
|
600
|
+
};
|
|
598
601
|
|
|
599
|
-
|
|
602
|
+
export declare type Notification = {
|
|
603
|
+
notificationID: string;
|
|
604
|
+
timestamp: string;
|
|
605
|
+
severity: 'INFO' | 'WARN' | 'ALERT' | 'AWARD';
|
|
606
|
+
texts: {
|
|
607
|
+
'it-IT': string;
|
|
608
|
+
'en-US': string;
|
|
609
|
+
[lang: string]: string;
|
|
610
|
+
};
|
|
611
|
+
additionalInfo?: {
|
|
612
|
+
[key: string]: string;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
600
615
|
|
|
616
|
+
/**
|
|
617
|
+
* Specifications for a Memory search.
|
|
618
|
+
*/
|
|
619
|
+
export declare type SearchQuery = {
|
|
601
620
|
/**
|
|
602
621
|
* @type {string}
|
|
603
622
|
* Search query. If omitted, either a Date or a Place must be set. Used only for Search, ignored for Random picking and Memory Hints.
|
|
@@ -667,12 +686,6 @@ export type SearchQuery = {
|
|
|
667
686
|
*/
|
|
668
687
|
excludedMemoryIDs?: string[];
|
|
669
688
|
|
|
670
|
-
/**
|
|
671
|
-
* @type {number=0}
|
|
672
|
-
* Index of the first Memory to return. Used for pagination.
|
|
673
|
-
*/
|
|
674
|
-
startFrom?: number;
|
|
675
|
-
|
|
676
689
|
/**
|
|
677
690
|
* @type {?number=5}
|
|
678
691
|
* Optional number of results. If omitted defaults to 5.
|
|
@@ -694,9 +707,30 @@ export type SearchQuery = {
|
|
|
694
707
|
* Optional list of memory tags. If specified, the search is limited to Memories including ALL the specified tags.
|
|
695
708
|
*/
|
|
696
709
|
memoryTags?: string[];
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* @type {?boolean}
|
|
713
|
+
* If set to True, the search is limited to Memories with media.
|
|
714
|
+
*/
|
|
715
|
+
withMediaOnly?: boolean;
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* @type {?string}
|
|
719
|
+
* If specified, the search is limited to Memories of this type.
|
|
720
|
+
*/
|
|
721
|
+
memoryType?:
|
|
722
|
+
| 'Question'
|
|
723
|
+
| 'Story'
|
|
724
|
+
| 'Default'
|
|
725
|
+
| 'CompletionDraft'
|
|
726
|
+
| 'CompletionPlaceholder'
|
|
727
|
+
| 'ExpertReference';
|
|
697
728
|
};
|
|
698
729
|
|
|
699
|
-
|
|
730
|
+
/**
|
|
731
|
+
* Specifications of a Match object.
|
|
732
|
+
*/
|
|
733
|
+
export declare type SearchMatches = {
|
|
700
734
|
/**
|
|
701
735
|
* @type {number}
|
|
702
736
|
* Match confidence, between 0.0 (no confidence) and 1.0 (full confidence).
|
|
@@ -715,6 +749,9 @@ export type SearchMatches = {
|
|
|
715
749
|
memory: Memory;
|
|
716
750
|
};
|
|
717
751
|
|
|
752
|
+
/**
|
|
753
|
+
* Specifications of an Answer object.
|
|
754
|
+
*/
|
|
718
755
|
export declare type Answer = {
|
|
719
756
|
text: string;
|
|
720
757
|
preformatted?: boolean;
|
|
@@ -724,6 +761,9 @@ export declare type Answer = {
|
|
|
724
761
|
lastChangeName?: string;
|
|
725
762
|
};
|
|
726
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Specifications of a Memory object.
|
|
766
|
+
*/
|
|
727
767
|
export declare type Memory = {
|
|
728
768
|
memoryID: string;
|
|
729
769
|
memoryType:
|
|
@@ -738,7 +778,13 @@ export declare type Memory = {
|
|
|
738
778
|
receiverTag?: string;
|
|
739
779
|
receiverName?: string;
|
|
740
780
|
media?: Medium[];
|
|
781
|
+
/**
|
|
782
|
+
* @deprecated
|
|
783
|
+
*/
|
|
741
784
|
text?: string;
|
|
785
|
+
/**
|
|
786
|
+
* @deprecated
|
|
787
|
+
*/
|
|
742
788
|
textVariants?: string[];
|
|
743
789
|
answers?: Answer[];
|
|
744
790
|
title?: string;
|
|
@@ -757,12 +803,12 @@ export declare type Memory = {
|
|
|
757
803
|
tags?: string[];
|
|
758
804
|
minTimeout?: number;
|
|
759
805
|
maxTimeout?: number;
|
|
760
|
-
contextVarsToSet?: { [variable: string]: string };
|
|
761
|
-
contextVarsToMatch?: { [variable: string]: string };
|
|
762
806
|
/**
|
|
763
807
|
* Used for Unanswered Questions
|
|
764
808
|
*/
|
|
765
809
|
contextVars?: { [variable: string]: string };
|
|
810
|
+
contextVarsToSet?: { [variable: string]: string };
|
|
811
|
+
contextVarsToMatch?: { [variable: string]: string };
|
|
766
812
|
/**
|
|
767
813
|
* Optional type of the outcome to be sent to the DCM platform when this Memory is emitted.
|
|
768
814
|
* @default "COMMON"
|
|
@@ -794,57 +840,120 @@ export declare type UnansweredQuestion = {
|
|
|
794
840
|
lastChangeName?: string;
|
|
795
841
|
lastChangeSessionID?: string;
|
|
796
842
|
suggestions?: SearchMatches[];
|
|
843
|
+
contextVars?: { [variable: string]: string };
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
export declare type OpenSession = {
|
|
847
|
+
memoriID: string;
|
|
848
|
+
password?: string;
|
|
849
|
+
recoveryTokens?: string[];
|
|
850
|
+
tag?: string;
|
|
851
|
+
pin?: string;
|
|
852
|
+
initialContextVars?: { [key: string]: string };
|
|
853
|
+
initialQuestion?: string;
|
|
854
|
+
forceCloseSessions?: boolean;
|
|
855
|
+
birthDate?: string;
|
|
856
|
+
additionalInfo?: {
|
|
857
|
+
/**
|
|
858
|
+
* a valid Memori.AI login token for the user, from which information like
|
|
859
|
+
* the user's unique ID, their birth date and e-mail are retrieved
|
|
860
|
+
* (for age verification and DCM integration purposes)
|
|
861
|
+
*/
|
|
862
|
+
loginToken?: string;
|
|
863
|
+
/**
|
|
864
|
+
* the language ISO code used to open the session
|
|
865
|
+
* (may be different from the Memori language if a translation layer is in place)
|
|
866
|
+
*/
|
|
867
|
+
language?: string;
|
|
868
|
+
/**
|
|
869
|
+
* the referral URL, as reported by the hosting web application
|
|
870
|
+
*/
|
|
871
|
+
referral?: string;
|
|
872
|
+
/**
|
|
873
|
+
* the offset in minutes of the UTC time zone from the user's local time zone.
|
|
874
|
+
* Note: the offset is subtracted from UTC to obtain the user's local time, not added.
|
|
875
|
+
* E.g.: it should be -120 for CEST, not +120.
|
|
876
|
+
*/
|
|
877
|
+
timeZoneOffset?: string;
|
|
878
|
+
[key: string]: string | undefined;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
export declare type MemoriSession = {
|
|
882
|
+
sessionID: string;
|
|
883
|
+
currentState: DialogState;
|
|
884
|
+
gamificationPoints?: number;
|
|
885
|
+
undefinedWords?: string[];
|
|
886
|
+
lastUpdateTimestamp?: string;
|
|
887
|
+
};
|
|
888
|
+
|
|
889
|
+
export declare type Medium = {
|
|
890
|
+
mediumID: string;
|
|
891
|
+
url?: string;
|
|
892
|
+
content?: string;
|
|
893
|
+
mimeType: string;
|
|
894
|
+
title?: string;
|
|
895
|
+
properties?: { [key: string]: string };
|
|
896
|
+
creationTimestamp?: string;
|
|
897
|
+
creationName?: string;
|
|
898
|
+
lastChangeTimestamp?: string;
|
|
899
|
+
lastChangeName?: string;
|
|
900
|
+
};
|
|
901
|
+
|
|
902
|
+
export declare type TranslatedHint = {
|
|
903
|
+
text: string;
|
|
904
|
+
originalText: string;
|
|
905
|
+
};
|
|
906
|
+
|
|
907
|
+
export declare type DialogState = {
|
|
908
|
+
state: string;
|
|
909
|
+
stateName: string;
|
|
910
|
+
previousState: string;
|
|
911
|
+
confidence?: number;
|
|
912
|
+
confidenceLevel?: 'NONE' | 'LOW' | 'MEDIUM' | 'HIGH';
|
|
913
|
+
emission?: string;
|
|
914
|
+
continuationEmitted?: boolean;
|
|
915
|
+
emitter?: string;
|
|
916
|
+
completion?: boolean;
|
|
917
|
+
lastMatchedMemoryID?: string;
|
|
918
|
+
acceptsTimeout?: boolean;
|
|
919
|
+
acceptsAbort?: boolean;
|
|
920
|
+
acceptsMedia?: boolean;
|
|
921
|
+
acceptsDate?: boolean;
|
|
922
|
+
acceptsPlace?: boolean;
|
|
923
|
+
acceptsTag?: boolean;
|
|
924
|
+
acceptsFeedback?: boolean;
|
|
925
|
+
hints?: string[];
|
|
926
|
+
timeout?: number;
|
|
927
|
+
translatedHints?: TranslatedHint[];
|
|
928
|
+
currentTag?: string;
|
|
929
|
+
currentDate?: string;
|
|
930
|
+
currentPlaceName?: string;
|
|
931
|
+
currentLatitude?: number;
|
|
932
|
+
currentLongitude?: number;
|
|
933
|
+
currentUncertaintyKm?: number;
|
|
934
|
+
giverID?: string;
|
|
935
|
+
currentReceiverID?: string;
|
|
936
|
+
currentMemoryID?: string;
|
|
937
|
+
media?: Medium[];
|
|
938
|
+
knownTags?: { [key: string]: string };
|
|
939
|
+
contextVars?: { [key: string]: string };
|
|
797
940
|
};
|
|
798
941
|
|
|
799
942
|
export declare type Message = {
|
|
800
943
|
memoryID?: string;
|
|
801
944
|
text: string;
|
|
802
945
|
translatedText?: string;
|
|
803
|
-
questionAnswered?: string;
|
|
804
946
|
acceptsFeedback?: boolean;
|
|
805
947
|
generatedByAI?: boolean;
|
|
806
948
|
fromUser?: boolean;
|
|
807
949
|
media?: Medium[];
|
|
808
|
-
initial?: boolean;
|
|
809
950
|
emitter?: string;
|
|
951
|
+
initial?: boolean;
|
|
810
952
|
timestamp?: string;
|
|
811
953
|
contextVars?: { [key: string]: string };
|
|
812
|
-
date?: string;
|
|
813
|
-
dateUncertaintyDays?: number;
|
|
814
|
-
placeName?: string;
|
|
815
|
-
placeLatitude?: number;
|
|
816
|
-
placeLongitude?: number;
|
|
817
|
-
placeUncertaintyKm?: number;
|
|
818
|
-
tag?: string;
|
|
819
|
-
memoryTags?: string[];
|
|
820
|
-
};
|
|
821
|
-
|
|
822
|
-
export type ConsumptionLog = {
|
|
823
|
-
consumptionLogID: string;
|
|
824
|
-
from: string;
|
|
825
|
-
to: string;
|
|
826
|
-
type: 'Daily' | 'Monthly';
|
|
827
|
-
userID?: string;
|
|
828
|
-
memoriID?: string;
|
|
829
|
-
totalSessions: number;
|
|
830
|
-
validSessions: number;
|
|
831
|
-
completions: number;
|
|
832
|
-
promptTokens: { [key: string]: number };
|
|
833
|
-
completionTokens: { [key: string]: number };
|
|
834
|
-
};
|
|
835
|
-
|
|
836
|
-
export type Notification = {
|
|
837
|
-
notificationID: string;
|
|
838
|
-
timestamp: string;
|
|
839
|
-
severity: 'INFO' | 'WARN' | 'ALERT';
|
|
840
|
-
texts: {
|
|
841
|
-
'it-IT': string;
|
|
842
|
-
'en-US': string;
|
|
843
|
-
[lang: string]: string;
|
|
844
|
-
};
|
|
845
954
|
};
|
|
846
955
|
|
|
847
|
-
export type ChatMedium = {
|
|
956
|
+
export declare type ChatMedium = {
|
|
848
957
|
/**
|
|
849
958
|
* URL of the Medium. If specified, the Content property is Null.
|
|
850
959
|
*/
|
|
@@ -864,10 +973,10 @@ export type ChatMedium = {
|
|
|
864
973
|
/**
|
|
865
974
|
* Key-value pairs for additional structured content storage.
|
|
866
975
|
*/
|
|
867
|
-
properties?: { [key: string]:
|
|
976
|
+
properties?: { [key: string]: string };
|
|
868
977
|
};
|
|
869
978
|
|
|
870
|
-
export type ChatLogLine = {
|
|
979
|
+
export declare type ChatLogLine = {
|
|
871
980
|
/**
|
|
872
981
|
* @type {string}
|
|
873
982
|
* Timestamp UTC of the line.
|
|
@@ -895,6 +1004,7 @@ export type ChatLogLine = {
|
|
|
895
1004
|
media?: ChatMedium[];
|
|
896
1005
|
/**
|
|
897
1006
|
* ID of the Memory object referenced in this line.
|
|
1007
|
+
* @type {string}
|
|
898
1008
|
*/
|
|
899
1009
|
memoryID?: string;
|
|
900
1010
|
/**
|
|
@@ -914,7 +1024,7 @@ export type ChatLogLine = {
|
|
|
914
1024
|
acceptsFeedback?: boolean;
|
|
915
1025
|
};
|
|
916
1026
|
|
|
917
|
-
export type ChatLog = {
|
|
1027
|
+
export declare type ChatLog = {
|
|
918
1028
|
/**
|
|
919
1029
|
* @param {string}
|
|
920
1030
|
* Chat Log object ID.
|
|
@@ -953,15 +1063,7 @@ export type ChatLog = {
|
|
|
953
1063
|
lines: ChatLogLine[];
|
|
954
1064
|
};
|
|
955
1065
|
|
|
956
|
-
export type
|
|
957
|
-
pairID?: string;
|
|
958
|
-
text1: string;
|
|
959
|
-
text2: string;
|
|
960
|
-
correlated: boolean;
|
|
961
|
-
occurrences?: number;
|
|
962
|
-
};
|
|
963
|
-
|
|
964
|
-
export type Utterance = {
|
|
1066
|
+
export declare type Utterance = {
|
|
965
1067
|
/**
|
|
966
1068
|
* Utterance object ID.
|
|
967
1069
|
*/
|
|
@@ -999,7 +1101,7 @@ export type Utterance = {
|
|
|
999
1101
|
lastChangeSessionID?: string;
|
|
1000
1102
|
};
|
|
1001
1103
|
|
|
1002
|
-
export type Intent = {
|
|
1104
|
+
export declare type Intent = {
|
|
1003
1105
|
/**
|
|
1004
1106
|
* Intent object ID.
|
|
1005
1107
|
*/
|
|
@@ -1068,7 +1170,7 @@ export type Intent = {
|
|
|
1068
1170
|
lastChangeSessionID?: string;
|
|
1069
1171
|
};
|
|
1070
1172
|
|
|
1071
|
-
export type IntentSlot = {
|
|
1173
|
+
export declare type IntentSlot = {
|
|
1072
1174
|
/**
|
|
1073
1175
|
* Intent Slot object ID.
|
|
1074
1176
|
*/
|
|
@@ -1121,7 +1223,7 @@ export type IntentSlot = {
|
|
|
1121
1223
|
lastChangeSessionID?: string;
|
|
1122
1224
|
};
|
|
1123
1225
|
|
|
1124
|
-
export type FunctionParameter = {
|
|
1226
|
+
export declare type FunctionParameter = {
|
|
1125
1227
|
/**
|
|
1126
1228
|
* Function Parameter object ID.
|
|
1127
1229
|
*/
|
|
@@ -1153,7 +1255,7 @@ export type FunctionParameter = {
|
|
|
1153
1255
|
required?: boolean;
|
|
1154
1256
|
};
|
|
1155
1257
|
|
|
1156
|
-
export type Function = {
|
|
1258
|
+
export declare type Function = {
|
|
1157
1259
|
/**
|
|
1158
1260
|
* Function object ID.
|
|
1159
1261
|
*/
|
|
@@ -1205,26 +1307,135 @@ export type Function = {
|
|
|
1205
1307
|
* or: <request><param1>{param1}</param1><param2>{param2}</param2></request>.
|
|
1206
1308
|
*/
|
|
1207
1309
|
httpBodyTemplate?: string;
|
|
1310
|
+
/**
|
|
1311
|
+
* MIME type of the HTTP request body to be passed to the web hook.
|
|
1312
|
+
* If not specified "text/plain" is assumed.
|
|
1313
|
+
*/
|
|
1314
|
+
httpBodyContentType?: string;
|
|
1315
|
+
/**
|
|
1316
|
+
* List of extension headers to be sent to the web hook.
|
|
1317
|
+
* Extension headers let the web hook receive internal information on the current state of the conversation,
|
|
1318
|
+
* such as the session ID, current date and place, context variables etc.
|
|
1319
|
+
* If the function is of Internal type, it is ignored.
|
|
1320
|
+
* Currently supported extension headers are:
|
|
1321
|
+
* - SESSION-ID: the current session ID, sent with header X-Memori-Session-ID
|
|
1322
|
+
* - CURRENT-TAG: the current tag, sent with headers X-Memori-Current-Tag and X-Memori-Current-Tag-Authenticated
|
|
1323
|
+
* - CURRENT-DATE: the current date in UTC, sent with header X-Memori-Current-Date
|
|
1324
|
+
* - CURRENT-PLACE: the current place, sent with headers X-Memori-Current-Place-Name, X-Memori-Current-Place-Latitude, X-Memori-Current-Place-Longitude and X-Memori-Current-Place-UncertaintyKm
|
|
1325
|
+
* - CONTEXT-VARS: the current context variables, sent with header X-Memori-Context-Vars, with the format NAME1:VALUE1,NAME2:VALUE2,...,NAMEn:VALUEn
|
|
1326
|
+
* - USER-EMAIL: the current user email, sent with header X-Memori-User-Email
|
|
1327
|
+
*/
|
|
1328
|
+
sendExtensionHeaders?: string[];
|
|
1208
1329
|
};
|
|
1209
1330
|
|
|
1210
|
-
export type
|
|
1211
|
-
|
|
1212
|
-
|
|
1331
|
+
export declare type CorrelationPair = {
|
|
1332
|
+
pairID?: string;
|
|
1333
|
+
text1: string;
|
|
1334
|
+
text2: string;
|
|
1335
|
+
correlated: boolean;
|
|
1336
|
+
occurrences?: number;
|
|
1337
|
+
};
|
|
1213
1338
|
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1339
|
+
export declare type Person = {
|
|
1340
|
+
personID?: string;
|
|
1341
|
+
personType: 'Giver' | 'Receiver';
|
|
1342
|
+
name?: string;
|
|
1343
|
+
information?: string;
|
|
1344
|
+
pin: string;
|
|
1345
|
+
tag: string;
|
|
1346
|
+
creationTimestamp?: string;
|
|
1347
|
+
creationName?: string;
|
|
1348
|
+
lastChangeTimestamp?: string;
|
|
1349
|
+
lastChangeName?: string;
|
|
1350
|
+
};
|
|
1223
1351
|
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1352
|
+
export declare type PersonificationProfile = {
|
|
1353
|
+
tag?: string;
|
|
1354
|
+
pin?: string;
|
|
1355
|
+
name?: string;
|
|
1356
|
+
sessionID?: string;
|
|
1357
|
+
};
|
|
1358
|
+
|
|
1359
|
+
export interface Invitation {
|
|
1360
|
+
invitationID?: string;
|
|
1361
|
+
memoriID: string;
|
|
1362
|
+
isInviter?: boolean;
|
|
1363
|
+
isInvitee?: boolean;
|
|
1364
|
+
text?: string;
|
|
1365
|
+
destinationEMail: string;
|
|
1366
|
+
destinationName: string;
|
|
1367
|
+
tag: string;
|
|
1368
|
+
pin: string;
|
|
1369
|
+
type: string;
|
|
1370
|
+
state?: 'PENDING' | 'ACCEPTED' | 'REJECTED';
|
|
1371
|
+
creationTimestamp?: string;
|
|
1372
|
+
lastChangeTimestamp?: string;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
export declare type Stats = {
|
|
1376
|
+
totalReceivers: number;
|
|
1377
|
+
receiversWithMemories: number;
|
|
1378
|
+
totalMemories: number;
|
|
1379
|
+
publicMemories: number;
|
|
1380
|
+
memoriesWithMedia: number;
|
|
1381
|
+
totalQuestions: number;
|
|
1382
|
+
publicQuestions: number;
|
|
1383
|
+
questionsWithMoreThanOneAnswer: number;
|
|
1384
|
+
totalStories: number;
|
|
1385
|
+
publicStories: number;
|
|
1386
|
+
storiesWithDate: number;
|
|
1387
|
+
storiesWithPlace: number;
|
|
1388
|
+
storiesWithDateAndPlace: number;
|
|
1389
|
+
unansweredQuestions: number;
|
|
1390
|
+
successfulCorrelations: number;
|
|
1391
|
+
failedCorrelations: number;
|
|
1392
|
+
};
|
|
1393
|
+
|
|
1394
|
+
export declare type GamificationLevel = {
|
|
1395
|
+
points: number;
|
|
1396
|
+
badge: string;
|
|
1397
|
+
pointsForCurrentBadge: number;
|
|
1398
|
+
nextBadge?: {
|
|
1399
|
+
points: number;
|
|
1400
|
+
badge: string;
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
|
|
1404
|
+
export declare type EventLog = {
|
|
1405
|
+
eventLogID: string;
|
|
1406
|
+
timestamp: string;
|
|
1407
|
+
eventType:
|
|
1408
|
+
| 'MemoriOpened'
|
|
1409
|
+
| 'MemoriClosed'
|
|
1410
|
+
| 'QuestionAnsweredCorrectly'
|
|
1411
|
+
| 'QuestionAnsweredIncorrectly'
|
|
1412
|
+
| 'QuestionNotAnswered'
|
|
1413
|
+
| 'IntentMatched';
|
|
1414
|
+
memoriID: string;
|
|
1415
|
+
sessionID: string;
|
|
1416
|
+
maintenanceType?:
|
|
1417
|
+
| 'None'
|
|
1418
|
+
| 'ConsumptionJob'
|
|
1419
|
+
| 'ChatLogExtractionJob'
|
|
1420
|
+
| 'ContentQualityJob';
|
|
1421
|
+
userAgent?: string;
|
|
1422
|
+
ipAddress?: string;
|
|
1423
|
+
additionalInfo?: OpenSession['additionalInfo'];
|
|
1424
|
+
memoryID?: string;
|
|
1425
|
+
intentID?: string;
|
|
1426
|
+
enteredText?: string;
|
|
1427
|
+
receiverTag?: string;
|
|
1428
|
+
};
|
|
1429
|
+
|
|
1430
|
+
export declare type UserLog = {
|
|
1431
|
+
timestamp: string;
|
|
1432
|
+
count: number;
|
|
1433
|
+
};
|
|
1434
|
+
|
|
1435
|
+
export declare type UsersLog = {
|
|
1436
|
+
timestamp: string;
|
|
1437
|
+
countUsers: number;
|
|
1438
|
+
countRecurrentUsers: number;
|
|
1228
1439
|
};
|
|
1229
1440
|
|
|
1230
1441
|
export interface CsvSpecs {
|
|
@@ -1237,6 +1448,27 @@ export interface CsvSpecs {
|
|
|
1237
1448
|
contextVarsToSetColumnName?: string;
|
|
1238
1449
|
csvSeparator?: string;
|
|
1239
1450
|
questionTitleVariantsSeparator?: string;
|
|
1451
|
+
memoryTagsColumnName?: string;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
export interface JSONLSpecs {
|
|
1455
|
+
/**
|
|
1456
|
+
* @type {string=}
|
|
1457
|
+
* Name of the platform for which the JSONL is intended.
|
|
1458
|
+
* Currently supported values are:
|
|
1459
|
+
* - OpenAI: the OpenAI platform
|
|
1460
|
+
*/
|
|
1461
|
+
platform?: string;
|
|
1462
|
+
/**
|
|
1463
|
+
* @type {boolean=}
|
|
1464
|
+
* If True the JSONL includes the instructions for the generative AI, i.e. the "System" role of each message. Used only in Export operations.
|
|
1465
|
+
*/
|
|
1466
|
+
includeInstructions?: boolean;
|
|
1467
|
+
/**
|
|
1468
|
+
* @type {string=}
|
|
1469
|
+
* If specified, only contents created or changed after this date will be included in the export.
|
|
1470
|
+
*/
|
|
1471
|
+
createdOrChangedAfter?: string;
|
|
1240
1472
|
}
|
|
1241
1473
|
|
|
1242
1474
|
export interface TxtSpecs {
|
|
@@ -1267,21 +1499,6 @@ export interface TxtSpecs {
|
|
|
1267
1499
|
questionsGenerationInstructions?: string;
|
|
1268
1500
|
}
|
|
1269
1501
|
|
|
1270
|
-
export interface JSONLSpecs {
|
|
1271
|
-
/**
|
|
1272
|
-
* @type {string=}
|
|
1273
|
-
* Name of the platform for which the JSONL is intended.
|
|
1274
|
-
* Currently supported values are:
|
|
1275
|
-
* - OpenAI: the OpenAI platform
|
|
1276
|
-
*/
|
|
1277
|
-
platform?: string;
|
|
1278
|
-
/**
|
|
1279
|
-
* @type {boolean=}
|
|
1280
|
-
* If True the JSONL includes the instructions for the generative AI, i.e. the "System" role of each message. Used only in Export operations.
|
|
1281
|
-
*/
|
|
1282
|
-
includeInstructions?: boolean;
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
1502
|
export interface ImportParams {
|
|
1286
1503
|
forceImport?: boolean;
|
|
1287
1504
|
csvSpecs?: CsvSpecs;
|
|
@@ -1289,19 +1506,18 @@ export interface ImportParams {
|
|
|
1289
1506
|
conclusive?: boolean;
|
|
1290
1507
|
notPickable?: boolean;
|
|
1291
1508
|
importName?: string;
|
|
1509
|
+
notes?: string;
|
|
1292
1510
|
contextVarsToSet?: {
|
|
1293
|
-
[
|
|
1511
|
+
[variable: string]: string;
|
|
1294
1512
|
};
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1304
|
-
}[];
|
|
1513
|
+
contextVarsToMatch?: {
|
|
1514
|
+
[variable: string]: string;
|
|
1515
|
+
};
|
|
1516
|
+
receiverID?: string;
|
|
1517
|
+
addMediaLink?: string;
|
|
1518
|
+
linkTitleHandling?: 'FixedTitle' | 'HostName' | 'FetchFromUrl';
|
|
1519
|
+
linkTitle?: string;
|
|
1520
|
+
memoryTags?: string[];
|
|
1305
1521
|
}
|
|
1306
1522
|
|
|
1307
1523
|
export interface AnalysisParams {
|
|
@@ -1318,19 +1534,14 @@ export interface AnalysisParams {
|
|
|
1318
1534
|
threshold?: number;
|
|
1319
1535
|
}
|
|
1320
1536
|
|
|
1321
|
-
export interface
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
* Type of warning.
|
|
1325
|
-
* Currently supported types are:
|
|
1326
|
-
* - Error: an error occurred while performing analysis
|
|
1327
|
-
*/
|
|
1328
|
-
warningType: 'Error' | string;
|
|
1329
|
-
/**
|
|
1330
|
-
* @type {string=}
|
|
1331
|
-
* When WarningType is Error reports the text of the error.
|
|
1332
|
-
*/
|
|
1537
|
+
export interface ImportWarning {
|
|
1538
|
+
warningType: 'Existing Similar Memory' | 'Internal Error';
|
|
1539
|
+
rowNumber?: number;
|
|
1333
1540
|
text?: string;
|
|
1541
|
+
similarTexts?: {
|
|
1542
|
+
text: string;
|
|
1543
|
+
similarityLevel: 'HIGH' | 'MEDIUM' | 'LOW';
|
|
1544
|
+
}[];
|
|
1334
1545
|
}
|
|
1335
1546
|
|
|
1336
1547
|
export interface AnalysisWarning {
|
|
@@ -1534,6 +1745,7 @@ export interface UserQueryMatch {
|
|
|
1534
1745
|
*/
|
|
1535
1746
|
match: number;
|
|
1536
1747
|
}
|
|
1748
|
+
|
|
1537
1749
|
export interface Badge {
|
|
1538
1750
|
badgeID?: string;
|
|
1539
1751
|
date?: string;
|
|
@@ -1547,6 +1759,24 @@ export interface Badge {
|
|
|
1547
1759
|
issuerURL?: string;
|
|
1548
1760
|
}
|
|
1549
1761
|
|
|
1762
|
+
export interface ConsumptionItem {
|
|
1763
|
+
key: string;
|
|
1764
|
+
id: string;
|
|
1765
|
+
promptTokens: number;
|
|
1766
|
+
completionTokens: number;
|
|
1767
|
+
totalTokens: number;
|
|
1768
|
+
validSessions: number;
|
|
1769
|
+
completions: number;
|
|
1770
|
+
deepThoughtValidSessions: number;
|
|
1771
|
+
deepThoughtCompletions: number;
|
|
1772
|
+
importedSize: number;
|
|
1773
|
+
nonChargeableCompletions?: number;
|
|
1774
|
+
nonChargeableDeepThoughtCompletions?: number;
|
|
1775
|
+
nonChargeableImportedSize?: number;
|
|
1776
|
+
cost?: number;
|
|
1777
|
+
children?: ConsumptionItem[];
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1550
1780
|
export interface ExpertReference {
|
|
1551
1781
|
/**
|
|
1552
1782
|
* @type {string}
|
|
@@ -1613,33 +1843,28 @@ export interface KnownFact {
|
|
|
1613
1843
|
lastChangeSessionID?: string;
|
|
1614
1844
|
}
|
|
1615
1845
|
|
|
1616
|
-
export
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1846
|
+
export declare type ConsumptionData = {
|
|
1847
|
+
id: string;
|
|
1848
|
+
key: string;
|
|
1849
|
+
promptTokens: number;
|
|
1850
|
+
completionTokens: number;
|
|
1851
|
+
totalTokens: number;
|
|
1852
|
+
validSessions: number;
|
|
1853
|
+
completions: number;
|
|
1854
|
+
deepThoughtValidSessions: number;
|
|
1855
|
+
deepThoughtCompletions: number;
|
|
1856
|
+
importedSize: number;
|
|
1857
|
+
nonChargeableCompletions: number;
|
|
1858
|
+
nonChargeableDeepThoughtCompletions: number;
|
|
1859
|
+
nonChargeableImportedSize: number;
|
|
1860
|
+
children?: ConsumptionData[];
|
|
1861
|
+
};
|
|
1628
1862
|
|
|
1629
|
-
export
|
|
1630
|
-
topicID: string;
|
|
1631
|
-
/**
|
|
1632
|
-
* Topic name.
|
|
1633
|
-
*/
|
|
1863
|
+
export declare type MacroFunction = {
|
|
1634
1864
|
name: string;
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
creationTimestamp: string;
|
|
1642
|
-
creationSessionID: string;
|
|
1643
|
-
lastChangeTimestamp: string;
|
|
1644
|
-
lastChangeSessionID: string;
|
|
1645
|
-
}
|
|
1865
|
+
description: string;
|
|
1866
|
+
macroParameters?: {
|
|
1867
|
+
name: string;
|
|
1868
|
+
description: string;
|
|
1869
|
+
}[];
|
|
1870
|
+
};
|