@memori.ai/memori-api-client 2.7.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +7 -12
- package/dist/backend/user.d.ts +3 -0
- package/dist/backend/user.js +3 -0
- package/dist/backend/user.js.map +1 -1
- package/dist/backend.d.ts +6 -0
- package/dist/client.test.js +1 -1
- package/dist/client.test.js.map +1 -1
- package/dist/engine/knownFacts.test.js +1 -1
- package/dist/engine/knownFacts.test.js.map +1 -1
- package/dist/engine/topics.d.ts +23 -0
- package/dist/engine/topics.js +26 -0
- package/dist/engine/topics.js.map +1 -0
- package/dist/engine/topics.test.d.ts +1 -0
- package/dist/engine/topics.test.js +14 -0
- package/dist/engine/topics.test.js.map +1 -0
- package/dist/engine/user.d.ts +23 -0
- package/dist/engine/user.js +26 -0
- package/dist/engine/user.js.map +1 -0
- package/dist/engine/user.test.d.ts +1 -0
- package/dist/engine/user.test.js +14 -0
- package/dist/engine/user.test.js.map +1 -0
- package/dist/engine.d.ts +80 -12
- package/dist/engine.js +6 -3
- package/dist/engine.js.map +1 -1
- package/dist/helpers/asset.js +1 -1
- package/dist/helpers/asset.js.map +1 -1
- package/dist/index.d.ts +86 -12
- package/dist/types.d.ts +44 -16
- package/esm/backend/user.d.ts +3 -0
- package/esm/backend/user.js +3 -0
- package/esm/backend/user.js.map +1 -1
- package/esm/backend.d.ts +6 -0
- package/esm/client.test.js +1 -1
- package/esm/client.test.js.map +1 -1
- package/esm/engine/knownFacts.test.js +1 -1
- package/esm/engine/knownFacts.test.js.map +1 -1
- package/esm/engine/topics.d.ts +23 -0
- package/esm/engine/topics.js +24 -0
- package/esm/engine/topics.js.map +1 -0
- package/esm/engine/topics.test.d.ts +1 -0
- package/esm/engine/topics.test.js +11 -0
- package/esm/engine/topics.test.js.map +1 -0
- package/esm/engine/user.d.ts +23 -0
- package/esm/engine/user.js +24 -0
- package/esm/engine/user.js.map +1 -0
- package/esm/engine/user.test.d.ts +1 -0
- package/esm/engine/user.test.js +11 -0
- package/esm/engine/user.test.js.map +1 -0
- package/esm/engine.d.ts +80 -12
- package/esm/engine.js +6 -3
- package/esm/engine.js.map +1 -1
- package/esm/helpers/asset.js +1 -1
- package/esm/helpers/asset.js.map +1 -1
- package/esm/index.d.ts +86 -12
- package/esm/types.d.ts +44 -16
- package/package.json +1 -1
- package/src/backend/user.ts +14 -0
- package/src/client.test.ts +1 -1
- package/src/engine/knownFacts.test.ts +1 -2
- package/src/engine/topics.test.ts +17 -0
- package/src/engine/topics.ts +124 -0
- package/src/engine/{promptedQuestions.test.ts → user.test.ts} +5 -5
- package/src/engine/user.ts +124 -0
- package/src/engine.ts +6 -3
- package/src/helpers/asset.ts +2 -2
- package/src/types.ts +84 -16
- package/src/engine/promptedQuestions.ts +0 -63
package/src/types.ts
CHANGED
|
@@ -65,10 +65,9 @@ export declare type Memori = {
|
|
|
65
65
|
disableR5Loop?: boolean;
|
|
66
66
|
ageRestriction?: number;
|
|
67
67
|
nsfw?: boolean;
|
|
68
|
-
enableBoardOfExperts?: boolean;
|
|
69
68
|
enableCompletions?: boolean;
|
|
70
69
|
completionDescription?: string;
|
|
71
|
-
completionProvider?: '-' | 'OpenAI';
|
|
70
|
+
completionProvider?: '-' | 'Mistral' | 'OpenAI';
|
|
72
71
|
/**
|
|
73
72
|
* Format: chiave1:valore1|chiave2:valore2|...|chiaveN:valoreN
|
|
74
73
|
*
|
|
@@ -80,10 +79,30 @@ export declare type Memori = {
|
|
|
80
79
|
*/
|
|
81
80
|
completionProviderConfig?: string;
|
|
82
81
|
enableDeepThought?: boolean;
|
|
82
|
+
enableBoardOfExperts?: boolean;
|
|
83
83
|
disableCompletionMediaExtraction?: boolean;
|
|
84
84
|
chainingMemoriID?: string;
|
|
85
85
|
chainingBaseURL?: string;
|
|
86
86
|
chainingPassword?: string;
|
|
87
|
+
/**
|
|
88
|
+
* @type {string=}
|
|
89
|
+
* User name of the optional integration with the DCM platform.
|
|
90
|
+
* If set, this Memori will be able send outcomes to the DCM platform when specific contents are emitted during the conversation.
|
|
91
|
+
* When updating, set it to a single dash character (-) to remove a previously set integration.
|
|
92
|
+
*/
|
|
93
|
+
dcmUser?: string;
|
|
94
|
+
/**
|
|
95
|
+
* @type {string=}
|
|
96
|
+
* Shared secret of the optional integration with the DCM platform.
|
|
97
|
+
* Required if DCMUser is set.
|
|
98
|
+
*/
|
|
99
|
+
dcmSecret?: string;
|
|
100
|
+
/**
|
|
101
|
+
* @type {string=}
|
|
102
|
+
* Application context of the optional integration with the DCM platform.
|
|
103
|
+
* Required if DCMUser is set.
|
|
104
|
+
*/
|
|
105
|
+
dcmAppContext?: string;
|
|
87
106
|
properties?: [{ [key: string]: string }];
|
|
88
107
|
creationTimestamp?: string;
|
|
89
108
|
lastChangeTimestamp?: string;
|
|
@@ -146,13 +165,12 @@ export declare type User = {
|
|
|
146
165
|
newsletterSubscribed?: boolean;
|
|
147
166
|
maxMemori?: number;
|
|
148
167
|
numMemori?: number;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
canEditIntegrations?: boolean;
|
|
153
|
-
canEditDynamicIntents?: boolean;
|
|
154
|
-
canEditMemoriChaining?: boolean;
|
|
168
|
+
enableMemoriCreation?: boolean;
|
|
169
|
+
enableBoardOfExperts?: boolean;
|
|
170
|
+
enableDCMIntegration?: boolean;
|
|
155
171
|
enableBadges?: boolean;
|
|
172
|
+
enableVirtualSpaces?: boolean;
|
|
173
|
+
enableDeepThought?: boolean;
|
|
156
174
|
monthSessions?: number;
|
|
157
175
|
monthValidSessions?: number;
|
|
158
176
|
maxFreeSessions?: number;
|
|
@@ -165,7 +183,7 @@ export declare type User = {
|
|
|
165
183
|
lastChangeTimestamp?: string;
|
|
166
184
|
referral?: string;
|
|
167
185
|
couponCode?: string;
|
|
168
|
-
defaultCompletionProvider?: '-' | 'OpenAI';
|
|
186
|
+
defaultCompletionProvider?: '-' | 'Mistral' | 'OpenAI';
|
|
169
187
|
/**
|
|
170
188
|
* Format: chiave1:valore1|chiave2:valore2|...|chiaveN:valoreN
|
|
171
189
|
*
|
|
@@ -182,6 +200,8 @@ export declare type User = {
|
|
|
182
200
|
age?: number;
|
|
183
201
|
tnCAndPPAccepted?: boolean;
|
|
184
202
|
tnCAndPPAcceptanceDate?: string;
|
|
203
|
+
pAndCUAccepted?: boolean;
|
|
204
|
+
pAndCUAcceptanceDate?: string;
|
|
185
205
|
avatarURL?: string;
|
|
186
206
|
avatar3DURL?: string;
|
|
187
207
|
avatar3DURLType?: string;
|
|
@@ -262,7 +282,6 @@ export type TenantConfig = {
|
|
|
262
282
|
name: string;
|
|
263
283
|
showNewUser: boolean;
|
|
264
284
|
requirePosition: boolean;
|
|
265
|
-
feedbackURL?: string;
|
|
266
285
|
};
|
|
267
286
|
|
|
268
287
|
export type TenantBase = {
|
|
@@ -270,6 +289,11 @@ export type TenantBase = {
|
|
|
270
289
|
name?: string;
|
|
271
290
|
description?: string;
|
|
272
291
|
logoURL?: string;
|
|
292
|
+
/**
|
|
293
|
+
* Additional Tenant names.
|
|
294
|
+
* Usually host names, e.g. app.memorytwin.com.
|
|
295
|
+
*/
|
|
296
|
+
aliases?: string[];
|
|
273
297
|
adminCount?: number;
|
|
274
298
|
userCount?: number;
|
|
275
299
|
memoriCount?: number;
|
|
@@ -282,15 +306,28 @@ export type TenantBase = {
|
|
|
282
306
|
maxFreeSessions?: number;
|
|
283
307
|
maxFreeSessionsPerUser?: number;
|
|
284
308
|
nonFreeSessionCost?: number;
|
|
309
|
+
maxImportSize?: number;
|
|
310
|
+
maxImportSizePerUser?: number;
|
|
285
311
|
maxCompletions?: number;
|
|
286
312
|
maxCompletionsPerUser?: number;
|
|
313
|
+
defaultCompletionProvider?: '-' | 'Mistral' | 'OpenAI';
|
|
314
|
+
/**
|
|
315
|
+
* Format: chiave1:valore1|chiave2:valore2|...|chiaveN:valoreN
|
|
316
|
+
*
|
|
317
|
+
* OpenAI accetta i seguenti:
|
|
318
|
+
* - APIKey è l'API key
|
|
319
|
+
* - Model è il nome del modello: gpt-3.5-turbo, gpt-4 ecc.
|
|
320
|
+
* - MaxTokens è il numero massimo di token in output
|
|
321
|
+
* - Temperature è la temperature
|
|
322
|
+
*/
|
|
323
|
+
defaultCompletionProviderConfig?: string;
|
|
287
324
|
paying?: boolean;
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
325
|
+
enableUserMemoriCreation?: boolean;
|
|
326
|
+
enableBoardOfExperts?: boolean;
|
|
327
|
+
enableDCMIntegration?: boolean;
|
|
328
|
+
enableBadges?: boolean;
|
|
329
|
+
enableVirtualSpaces?: boolean;
|
|
330
|
+
enableDeepThought?: boolean;
|
|
294
331
|
creationTimestamp?: string;
|
|
295
332
|
lastChangeTimestamp?: string;
|
|
296
333
|
};
|
|
@@ -1160,3 +1197,34 @@ export interface KnownFact {
|
|
|
1160
1197
|
lastChangeTimestamp?: string;
|
|
1161
1198
|
lastChangeSessionID?: string;
|
|
1162
1199
|
}
|
|
1200
|
+
|
|
1201
|
+
export interface MemoriUser {
|
|
1202
|
+
userID: string;
|
|
1203
|
+
email: string;
|
|
1204
|
+
userName: string;
|
|
1205
|
+
tenantName: string;
|
|
1206
|
+
disableDeepThought: boolean;
|
|
1207
|
+
|
|
1208
|
+
creationTimestamp: string;
|
|
1209
|
+
creationSessionID: string;
|
|
1210
|
+
lastChangeTimestamp: string;
|
|
1211
|
+
lastChangeSessionID: string;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
export interface Topic {
|
|
1215
|
+
topicID: string;
|
|
1216
|
+
/**
|
|
1217
|
+
* Topic name.
|
|
1218
|
+
*/
|
|
1219
|
+
name: string;
|
|
1220
|
+
/**
|
|
1221
|
+
* Topic weight, i.e. the ratio between the number of times this topic has been referenced versus to
|
|
1222
|
+
total number of references.
|
|
1223
|
+
*/
|
|
1224
|
+
weight: number;
|
|
1225
|
+
|
|
1226
|
+
creationTimestamp: string;
|
|
1227
|
+
creationSessionID: string;
|
|
1228
|
+
lastChangeTimestamp: string;
|
|
1229
|
+
lastChangeSessionID: string;
|
|
1230
|
+
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { ResponseSpec } from '../types';
|
|
2
|
-
import { apiFetcher } from '../apiFetcher';
|
|
3
|
-
|
|
4
|
-
/*****************************
|
|
5
|
-
* *
|
|
6
|
-
* PromptedQuestions *
|
|
7
|
-
* *
|
|
8
|
-
*****************************/
|
|
9
|
-
|
|
10
|
-
export default (apiUrl: string) => ({
|
|
11
|
-
/**
|
|
12
|
-
* Lists all Prompted Question objects.
|
|
13
|
-
* @param {string} sessionId The session ID
|
|
14
|
-
*/
|
|
15
|
-
getPromptedQuestions: async (sessionId: string) =>
|
|
16
|
-
apiFetcher(`/PromptedQuestions/${sessionId}`, {
|
|
17
|
-
method: 'GET',
|
|
18
|
-
apiUrl,
|
|
19
|
-
}) as Promise<ResponseSpec>,
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Gets the details of a Prompted Question object.
|
|
23
|
-
* @param {string} sessionId The session ID
|
|
24
|
-
* @param {string} promptId The Prompted Question object ID
|
|
25
|
-
*/
|
|
26
|
-
getPromptedQuestion: async (sessionId: string, promptId: string) =>
|
|
27
|
-
apiFetcher(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
28
|
-
method: 'GET',
|
|
29
|
-
apiUrl,
|
|
30
|
-
}) as Promise<ResponseSpec>,
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Updates an existing Prompted Question object.
|
|
34
|
-
* @param {string} sessionId The session ID
|
|
35
|
-
* @param {string} promptId The Prompted Question object ID
|
|
36
|
-
*/
|
|
37
|
-
patchPromptedQuestion: async (sessionId: string, promptId: string) =>
|
|
38
|
-
apiFetcher(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
39
|
-
method: 'GET',
|
|
40
|
-
apiUrl,
|
|
41
|
-
}) as Promise<ResponseSpec>,
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Removes an existing Prompted Question object.
|
|
45
|
-
* @param {string} sessionId The session ID
|
|
46
|
-
* @param {string} promptId The Prompted Question object ID
|
|
47
|
-
*/
|
|
48
|
-
deletePromptedQuestion: async (sessionId: string, promptId: string) =>
|
|
49
|
-
apiFetcher(`/PromptedQuestion/${sessionId}/${promptId}`, {
|
|
50
|
-
method: 'GET',
|
|
51
|
-
apiUrl,
|
|
52
|
-
}) as Promise<ResponseSpec>,
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Adds a new Prompted Question object.
|
|
56
|
-
* @param {string} sessionId The session ID
|
|
57
|
-
*/
|
|
58
|
-
postPromptedQuestion: async (sessionId: string) =>
|
|
59
|
-
apiFetcher(`/PromptedQuestion/${sessionId}`, {
|
|
60
|
-
method: 'GET',
|
|
61
|
-
apiUrl,
|
|
62
|
-
}) as Promise<ResponseSpec>,
|
|
63
|
-
});
|