@slashml/memory 1.0.8 → 1.0.9
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/bin/cli.js +879 -8
- package/dist/index.d.ts +347 -233
- package/dist/index.js +824 -624
- package/dist/index.mjs +25 -629
- package/package.json +2 -1
- package/src/index.ts +366 -11
package/dist/index.d.ts
CHANGED
|
@@ -1,263 +1,377 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @slashml/memory -- Official HTTP TypeScript / Node.js SDK for / ml (https://api.slashml.ai)
|
|
3
|
+
*
|
|
4
|
+
* 100% drop-in replacement for `mem0ai` (`MemoryClient`, `AsyncMemoryClient`, `Memory`, `AsyncMemory`).
|
|
5
|
+
*/
|
|
1
6
|
export declare const DEFAULT_BASE_URL = "https://api.slashml.ai";
|
|
2
7
|
export declare const DEFAULT_MODEL = "slashml-1.5-fast";
|
|
3
8
|
export declare const DEFAULT_TIMEOUT_MS = 30000;
|
|
4
|
-
|
|
5
9
|
export interface MemoryClientOptions {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
apiKey?: string;
|
|
11
|
+
api_key?: string;
|
|
12
|
+
mem0ApiKey?: string;
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
base_url?: string;
|
|
15
|
+
host?: string;
|
|
16
|
+
orgId?: string;
|
|
17
|
+
org_id?: string;
|
|
18
|
+
projectId?: string;
|
|
19
|
+
project_id?: string;
|
|
20
|
+
model?: string;
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
fetchImpl?: typeof fetch;
|
|
23
|
+
}
|
|
24
|
+
export interface RuleScopePattern {
|
|
25
|
+
file_paths?: string[];
|
|
26
|
+
tool_names?: string[];
|
|
27
|
+
environments?: string[];
|
|
28
|
+
git_branches?: string[];
|
|
29
|
+
}
|
|
30
|
+
export declare class RuleScope {
|
|
31
|
+
file_paths: string[];
|
|
32
|
+
tool_names: string[];
|
|
33
|
+
environments: string[];
|
|
34
|
+
git_branches: string[];
|
|
35
|
+
constructor(patterns?: RuleScopePattern);
|
|
36
|
+
matches(context?: Record<string, unknown> | null): boolean;
|
|
37
|
+
toJSON(): Record<string, string[]>;
|
|
19
38
|
}
|
|
20
|
-
|
|
39
|
+
export interface ContrastiveRuleTriplet {
|
|
40
|
+
rule_id: string;
|
|
41
|
+
do: string;
|
|
42
|
+
dont: string;
|
|
43
|
+
context?: string;
|
|
44
|
+
scope?: RuleScope | RuleScopePattern;
|
|
45
|
+
raw_text?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface CacheAlignedPromptResult {
|
|
48
|
+
zone1_rules_text: string;
|
|
49
|
+
zone2_facts_text: string;
|
|
50
|
+
user_turn: string;
|
|
51
|
+
whisper_block: string;
|
|
52
|
+
full_prompt_text: string;
|
|
53
|
+
has_cache_breakpoint: boolean;
|
|
54
|
+
token_economics: Record<string, unknown>;
|
|
55
|
+
}
|
|
56
|
+
export declare function extractCanonicalSlotKey(text: string, metadata?: Record<string, unknown> | null): string | null;
|
|
57
|
+
export declare function compileContrastiveRule(text: string, ruleId?: string, scope?: RuleScope | RuleScopePattern, options?: {
|
|
58
|
+
do?: string;
|
|
59
|
+
dont?: string;
|
|
60
|
+
}): ContrastiveRuleTriplet;
|
|
61
|
+
export declare function formatCacheAlignedPrompt(rules: ContrastiveRuleTriplet[], facts: Array<string | {
|
|
62
|
+
text?: string;
|
|
63
|
+
memory?: string;
|
|
64
|
+
}>, userPrompt: string, options?: {
|
|
65
|
+
activeContext?: Record<string, unknown>;
|
|
66
|
+
whisperRule?: ContrastiveRuleTriplet | null;
|
|
67
|
+
enableCacheBreakpoint?: boolean;
|
|
68
|
+
}): CacheAlignedPromptResult;
|
|
21
69
|
export interface MemoryFilters {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
70
|
+
user_id?: string | null;
|
|
71
|
+
userId?: string | null;
|
|
72
|
+
agent_id?: string | null;
|
|
73
|
+
agentId?: string | null;
|
|
74
|
+
app_id?: string | null;
|
|
75
|
+
appId?: string | null;
|
|
76
|
+
run_id?: string | null;
|
|
77
|
+
runId?: string | null;
|
|
78
|
+
metadata?: Record<string, unknown> | null;
|
|
79
|
+
filters?: Record<string, unknown> | null;
|
|
32
80
|
}
|
|
33
|
-
|
|
34
81
|
export interface AddMemoryOptions extends MemoryFilters {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
82
|
+
infer?: boolean;
|
|
83
|
+
memory_id?: string;
|
|
84
|
+
memoryId?: string;
|
|
85
|
+
record_tier?: string;
|
|
86
|
+
recordTier?: string;
|
|
87
|
+
slot_key?: string;
|
|
88
|
+
slotKey?: string;
|
|
89
|
+
scope?: RuleScope | RuleScopePattern;
|
|
90
|
+
contrastive?: ContrastiveRuleTriplet;
|
|
38
91
|
}
|
|
39
|
-
|
|
40
92
|
export interface SearchMemoryOptions extends MemoryFilters {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
93
|
+
limit?: number;
|
|
94
|
+
top_k?: number;
|
|
95
|
+
topK?: number;
|
|
96
|
+
threshold?: number;
|
|
97
|
+
record_tier?: string;
|
|
98
|
+
recordTier?: string;
|
|
45
99
|
}
|
|
46
|
-
|
|
47
100
|
export interface IngestOptions {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
101
|
+
namespace?: string;
|
|
102
|
+
model?: string;
|
|
103
|
+
metadata?: Record<string, unknown>;
|
|
104
|
+
record_tier?: string;
|
|
105
|
+
recordTier?: string;
|
|
106
|
+
slot_key?: string;
|
|
107
|
+
slotKey?: string;
|
|
108
|
+
scope?: RuleScope | RuleScopePattern;
|
|
109
|
+
contrastive?: ContrastiveRuleTriplet;
|
|
51
110
|
}
|
|
52
|
-
|
|
53
111
|
export interface QueryOptions {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
112
|
+
namespace?: string;
|
|
113
|
+
model?: string;
|
|
114
|
+
top_k?: number;
|
|
115
|
+
record_tier?: string;
|
|
116
|
+
recordTier?: string;
|
|
117
|
+
context?: Record<string, unknown>;
|
|
118
|
+
include_rules?: boolean;
|
|
57
119
|
}
|
|
58
|
-
|
|
59
120
|
export interface ForgetOptions {
|
|
60
|
-
|
|
121
|
+
namespace?: string;
|
|
61
122
|
}
|
|
62
|
-
|
|
63
123
|
export interface InterveneOptions {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
124
|
+
hook_event_name?: string;
|
|
125
|
+
hookEventName?: string;
|
|
126
|
+
prompt?: string;
|
|
127
|
+
text?: string;
|
|
128
|
+
last_assistant_message?: string | null;
|
|
129
|
+
lastAssistantMessage?: string | null;
|
|
130
|
+
stop_hook_active?: boolean;
|
|
131
|
+
stopHookActive?: boolean;
|
|
132
|
+
whispered_memory_ids?: string[] | null;
|
|
133
|
+
whisperedMemoryIds?: string[] | null;
|
|
134
|
+
tool_name?: string | null;
|
|
135
|
+
toolName?: string | null;
|
|
136
|
+
tool_input?: Record<string, unknown> | null;
|
|
137
|
+
toolInput?: Record<string, unknown> | null;
|
|
138
|
+
tool_response?: Record<string, unknown> | null;
|
|
139
|
+
toolResponse?: Record<string, unknown> | null;
|
|
140
|
+
user_id?: string | null;
|
|
141
|
+
userId?: string | null;
|
|
142
|
+
project_id?: string | null;
|
|
143
|
+
projectId?: string | null;
|
|
144
|
+
session_id?: string | null;
|
|
145
|
+
sessionId?: string | null;
|
|
146
|
+
model?: string;
|
|
147
|
+
commit_writes?: boolean;
|
|
148
|
+
commitWrites?: boolean;
|
|
149
|
+
top_k?: number;
|
|
150
|
+
topK?: number;
|
|
151
|
+
client_raw_tokens_delta?: number;
|
|
152
|
+
clientRawTokensDelta?: number;
|
|
153
|
+
client_dropped_tokens_delta?: number;
|
|
154
|
+
clientDroppedTokensDelta?: number;
|
|
155
|
+
client_dropped_events_delta?: number;
|
|
156
|
+
clientDroppedEventsDelta?: number;
|
|
97
157
|
}
|
|
98
|
-
|
|
99
158
|
export interface StatusOptions {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
159
|
+
user_id?: string | null;
|
|
160
|
+
userId?: string | null;
|
|
161
|
+
client_raw_tokens_delta?: number;
|
|
162
|
+
clientRawTokensDelta?: number;
|
|
163
|
+
client_dropped_tokens_delta?: number;
|
|
164
|
+
clientDroppedTokensDelta?: number;
|
|
165
|
+
client_dropped_events_delta?: number;
|
|
166
|
+
clientDroppedEventsDelta?: number;
|
|
108
167
|
}
|
|
109
|
-
|
|
110
168
|
export declare class SlashMLAPIError extends Error {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
169
|
+
readonly statusCode: number;
|
|
170
|
+
readonly details: Record<string, unknown>;
|
|
171
|
+
constructor(statusCode: number, message: string, details?: Record<string, unknown>);
|
|
114
172
|
}
|
|
115
|
-
|
|
116
173
|
export declare class ProjectManager {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
174
|
+
private readonly client;
|
|
175
|
+
constructor(client: MemoryClient);
|
|
176
|
+
get(fieldsOrOptions?: string[] | {
|
|
177
|
+
fields?: string[];
|
|
178
|
+
}): Promise<Record<string, unknown>>;
|
|
179
|
+
create(nameOrOptions: string | {
|
|
180
|
+
name: string;
|
|
181
|
+
description?: string;
|
|
182
|
+
[k: string]: unknown;
|
|
183
|
+
}, description?: string, extra?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
184
|
+
update(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
185
|
+
delete(): Promise<Record<string, unknown>>;
|
|
186
|
+
getMembers(): Promise<Record<string, unknown>>;
|
|
187
|
+
get_members(): Promise<Record<string, unknown>>;
|
|
188
|
+
addMember(emailOrOptions: string | {
|
|
189
|
+
email: string;
|
|
190
|
+
role?: string;
|
|
191
|
+
}, role?: string): Promise<Record<string, unknown>>;
|
|
192
|
+
add_member(emailOrOptions: string | {
|
|
193
|
+
email: string;
|
|
194
|
+
role?: string;
|
|
195
|
+
}, role?: string): Promise<Record<string, unknown>>;
|
|
196
|
+
removeMember(emailOrOptions: string | {
|
|
197
|
+
email: string;
|
|
198
|
+
}): Promise<Record<string, unknown>>;
|
|
199
|
+
remove_member(emailOrOptions: string | {
|
|
200
|
+
email: string;
|
|
201
|
+
}): Promise<Record<string, unknown>>;
|
|
132
202
|
}
|
|
133
|
-
|
|
134
203
|
export declare class MemoryClient {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
method: string,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
options
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
204
|
+
readonly apiKey: string;
|
|
205
|
+
readonly baseUrl: string;
|
|
206
|
+
readonly orgId: string | null;
|
|
207
|
+
readonly projectId: string | null;
|
|
208
|
+
readonly model: string;
|
|
209
|
+
readonly timeoutMs: number;
|
|
210
|
+
readonly project: ProjectManager;
|
|
211
|
+
private readonly fetchImpl;
|
|
212
|
+
constructor(options?: MemoryClientOptions);
|
|
213
|
+
request<T = Record<string, unknown>>(method: string, path: string, options?: {
|
|
214
|
+
params?: Record<string, unknown>;
|
|
215
|
+
jsonBody?: Record<string, unknown>;
|
|
216
|
+
}): Promise<T>;
|
|
217
|
+
ingest(documents: string | string[], options?: IngestOptions): Promise<Record<string, unknown>>;
|
|
218
|
+
query(prompt: string, options?: QueryOptions): Promise<Record<string, unknown>>;
|
|
219
|
+
forget(target: string, options?: ForgetOptions): Promise<Record<string, unknown>>;
|
|
220
|
+
intervene(textOrPayload: string | InterveneOptions, options?: InterveneOptions): Promise<Record<string, unknown>>;
|
|
221
|
+
status(options?: StatusOptions): Promise<Record<string, unknown>>;
|
|
222
|
+
addRule(text: string, options?: {
|
|
223
|
+
rule_id?: string;
|
|
224
|
+
ruleId?: string;
|
|
225
|
+
do?: string;
|
|
226
|
+
dont?: string;
|
|
227
|
+
scope?: RuleScope | RuleScopePattern;
|
|
228
|
+
user_id?: string;
|
|
229
|
+
userId?: string;
|
|
230
|
+
metadata?: Record<string, unknown>;
|
|
231
|
+
}): Promise<Record<string, unknown>>;
|
|
232
|
+
add_rule(text: string, options?: {
|
|
233
|
+
rule_id?: string;
|
|
234
|
+
ruleId?: string;
|
|
235
|
+
do?: string;
|
|
236
|
+
dont?: string;
|
|
237
|
+
scope?: RuleScope | RuleScopePattern;
|
|
238
|
+
user_id?: string;
|
|
239
|
+
userId?: string;
|
|
240
|
+
metadata?: Record<string, unknown>;
|
|
241
|
+
}): Promise<Record<string, unknown>>;
|
|
242
|
+
getCacheAlignedPrompt(userTurn: string, options?: {
|
|
243
|
+
activeContext?: Record<string, unknown>;
|
|
244
|
+
top_k?: number;
|
|
245
|
+
userId?: string;
|
|
246
|
+
user_id?: string;
|
|
247
|
+
enableCacheBreakpoint?: boolean;
|
|
248
|
+
}): Promise<CacheAlignedPromptResult>;
|
|
249
|
+
get_cache_aligned_prompt(userTurn: string, options?: {
|
|
250
|
+
activeContext?: Record<string, unknown>;
|
|
251
|
+
top_k?: number;
|
|
252
|
+
userId?: string;
|
|
253
|
+
user_id?: string;
|
|
254
|
+
enableCacheBreakpoint?: boolean;
|
|
255
|
+
}): Promise<CacheAlignedPromptResult>;
|
|
256
|
+
add(messages: string | Array<Record<string, unknown>> | Record<string, unknown>, options?: AddMemoryOptions): Promise<Record<string, unknown>>;
|
|
257
|
+
search(queryOrOptions: string | ({
|
|
258
|
+
query: string;
|
|
259
|
+
} & SearchMemoryOptions), options?: SearchMemoryOptions): Promise<Record<string, unknown>>;
|
|
260
|
+
recall(queryOrOptions: string | ({
|
|
261
|
+
query: string;
|
|
262
|
+
} & SearchMemoryOptions), options?: SearchMemoryOptions): Promise<Record<string, unknown>>;
|
|
263
|
+
getAll(options?: MemoryFilters & {
|
|
264
|
+
limit?: number;
|
|
265
|
+
}): Promise<Record<string, unknown>>;
|
|
266
|
+
get_all(options?: MemoryFilters & {
|
|
267
|
+
limit?: number;
|
|
268
|
+
}): Promise<Record<string, unknown>>;
|
|
269
|
+
get(memoryId: string): Promise<Record<string, unknown> | null>;
|
|
270
|
+
update(memoryId: string, data: string | {
|
|
271
|
+
text?: string;
|
|
272
|
+
metadata?: Record<string, unknown>;
|
|
273
|
+
}): Promise<Record<string, unknown>>;
|
|
274
|
+
delete(memoryId: string): Promise<Record<string, unknown>>;
|
|
275
|
+
deleteAll(options?: MemoryFilters): Promise<Record<string, unknown>>;
|
|
276
|
+
delete_all(options?: MemoryFilters): Promise<Record<string, unknown>>;
|
|
277
|
+
reset(): Promise<Record<string, unknown>>;
|
|
278
|
+
history(memoryId: string): Promise<Array<Record<string, unknown>>>;
|
|
279
|
+
batchUpdate(memories: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
280
|
+
batch_update(memories: Array<Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
281
|
+
batchDelete(memories: Array<string | Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
282
|
+
batch_delete(memories: Array<string | Record<string, unknown>>): Promise<Record<string, unknown>>;
|
|
283
|
+
users(): Promise<Record<string, unknown>>;
|
|
284
|
+
deleteUsers(options?: MemoryFilters): Promise<Record<string, unknown>>;
|
|
285
|
+
delete_users(options?: MemoryFilters): Promise<Record<string, unknown>>;
|
|
286
|
+
feedback(memoryIdOrPayload: string | {
|
|
287
|
+
memory_id?: string;
|
|
288
|
+
memoryId?: string;
|
|
289
|
+
feedback?: string;
|
|
290
|
+
feedback_reason?: string;
|
|
291
|
+
feedbackReason?: string;
|
|
292
|
+
}, feedback?: string, feedbackReason?: string): Promise<Record<string, unknown>>;
|
|
293
|
+
getProject(fields?: string[]): Promise<Record<string, unknown>>;
|
|
294
|
+
get_project(fields?: string[]): Promise<Record<string, unknown>>;
|
|
295
|
+
updateProject(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
296
|
+
update_project(settings?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
297
|
+
getWebhooks(projectId?: string): Promise<Record<string, unknown>>;
|
|
298
|
+
get_webhooks(projectId?: string): Promise<Record<string, unknown>>;
|
|
299
|
+
createWebhook(options: {
|
|
300
|
+
url: string;
|
|
301
|
+
name: string;
|
|
302
|
+
event_types?: string[];
|
|
303
|
+
eventTypes?: string[];
|
|
304
|
+
project_id?: string;
|
|
305
|
+
projectId?: string;
|
|
306
|
+
}): Promise<Record<string, unknown>>;
|
|
307
|
+
create_webhook(options: {
|
|
308
|
+
url: string;
|
|
309
|
+
name: string;
|
|
310
|
+
event_types?: string[];
|
|
311
|
+
eventTypes?: string[];
|
|
312
|
+
project_id?: string;
|
|
313
|
+
projectId?: string;
|
|
314
|
+
}): Promise<Record<string, unknown>>;
|
|
315
|
+
updateWebhook(webhookIdOrOptions: string | number | {
|
|
316
|
+
webhook_id?: string | number;
|
|
317
|
+
webhookId?: string | number;
|
|
318
|
+
name?: string;
|
|
319
|
+
url?: string;
|
|
320
|
+
event_types?: string[];
|
|
321
|
+
eventTypes?: string[];
|
|
322
|
+
project_id?: string;
|
|
323
|
+
projectId?: string;
|
|
324
|
+
}, options?: {
|
|
325
|
+
name?: string;
|
|
326
|
+
url?: string;
|
|
327
|
+
event_types?: string[];
|
|
328
|
+
eventTypes?: string[];
|
|
329
|
+
project_id?: string;
|
|
330
|
+
projectId?: string;
|
|
331
|
+
}): Promise<Record<string, unknown>>;
|
|
332
|
+
update_webhook(webhookIdOrOptions: string | number | {
|
|
333
|
+
webhook_id?: string | number;
|
|
334
|
+
webhookId?: string | number;
|
|
335
|
+
name?: string;
|
|
336
|
+
url?: string;
|
|
337
|
+
event_types?: string[];
|
|
338
|
+
eventTypes?: string[];
|
|
339
|
+
project_id?: string;
|
|
340
|
+
projectId?: string;
|
|
341
|
+
}, options?: {
|
|
342
|
+
name?: string;
|
|
343
|
+
url?: string;
|
|
344
|
+
event_types?: string[];
|
|
345
|
+
eventTypes?: string[];
|
|
346
|
+
project_id?: string;
|
|
347
|
+
projectId?: string;
|
|
348
|
+
}): Promise<Record<string, unknown>>;
|
|
349
|
+
deleteWebhook(webhookIdOrOptions: string | number | {
|
|
350
|
+
webhook_id?: string | number;
|
|
351
|
+
webhookId?: string | number;
|
|
352
|
+
}): Promise<Record<string, unknown>>;
|
|
353
|
+
delete_webhook(webhookIdOrOptions: string | number | {
|
|
354
|
+
webhook_id?: string | number;
|
|
355
|
+
webhookId?: string | number;
|
|
356
|
+
}): Promise<Record<string, unknown>>;
|
|
249
357
|
}
|
|
250
|
-
|
|
358
|
+
/**
|
|
359
|
+
* Drop-in Mem0-compatible `Memory` class backed by the / ml Cloud API.
|
|
360
|
+
*/
|
|
251
361
|
export declare class Memory extends MemoryClient {
|
|
252
|
-
|
|
253
|
-
|
|
362
|
+
static fromConfig<T extends typeof Memory>(this: T, configDict?: Record<string, unknown>): InstanceType<T>;
|
|
363
|
+
static from_config<T extends typeof Memory>(this: T, configDict?: Record<string, unknown>): InstanceType<T>;
|
|
364
|
+
}
|
|
365
|
+
export declare class AsyncMemoryClient extends MemoryClient {
|
|
366
|
+
}
|
|
367
|
+
export declare class AsyncMemory extends Memory {
|
|
368
|
+
}
|
|
369
|
+
export declare class SlashMLMemory extends MemoryClient {
|
|
370
|
+
}
|
|
371
|
+
export declare class SlashMLClient extends MemoryClient {
|
|
372
|
+
}
|
|
373
|
+
export declare class AsyncSlashMLMemory extends MemoryClient {
|
|
374
|
+
}
|
|
375
|
+
export declare class AsyncSlashMLClient extends MemoryClient {
|
|
254
376
|
}
|
|
255
|
-
|
|
256
|
-
export declare class AsyncMemoryClient extends MemoryClient {}
|
|
257
|
-
export declare class AsyncMemory extends Memory {}
|
|
258
|
-
export declare class SlashMLMemory extends MemoryClient {}
|
|
259
|
-
export declare class SlashMLClient extends MemoryClient {}
|
|
260
|
-
export declare class AsyncSlashMLMemory extends MemoryClient {}
|
|
261
|
-
export declare class AsyncSlashMLClient extends MemoryClient {}
|
|
262
|
-
|
|
263
377
|
export default Memory;
|