@akumi/sdk 0.5.0 → 0.6.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/dist/index.cjs +36 -36
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +35 -35
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28,9 +28,9 @@ __export(index_exports, {
|
|
|
28
28
|
ChatCompletionsResource: () => ChatCompletionsResource,
|
|
29
29
|
EmbeddingsResource: () => EmbeddingsResource,
|
|
30
30
|
InvalidRequestError: () => InvalidRequestError,
|
|
31
|
+
MemoryResource: () => MemoryResource,
|
|
31
32
|
ModelsResource: () => ModelsResource,
|
|
32
33
|
RateLimitError: () => RateLimitError,
|
|
33
|
-
RecallResource: () => RecallResource,
|
|
34
34
|
ScoresResource: () => ScoresResource
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -260,79 +260,79 @@ var EmbeddingsResource = class {
|
|
|
260
260
|
}
|
|
261
261
|
};
|
|
262
262
|
|
|
263
|
-
// src/resources/
|
|
264
|
-
var
|
|
265
|
-
constructor(transport) {
|
|
266
|
-
this.transport = transport;
|
|
267
|
-
}
|
|
268
|
-
transport;
|
|
269
|
-
async list() {
|
|
270
|
-
return this.transport.request("GET", "/models", null, null);
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
// src/resources/recall.ts
|
|
275
|
-
var RecallResource = class {
|
|
263
|
+
// src/resources/memory.ts
|
|
264
|
+
var MemoryResource = class {
|
|
276
265
|
constructor(transport) {
|
|
277
266
|
this.transport = transport;
|
|
278
267
|
}
|
|
279
268
|
transport;
|
|
280
269
|
async listThreads(query = {}) {
|
|
281
|
-
return this.transport.request("GET", "/
|
|
270
|
+
return this.transport.request("GET", "/memory/threads", query, null);
|
|
282
271
|
}
|
|
283
272
|
async createThread() {
|
|
284
|
-
return this.transport.request("POST", "/
|
|
273
|
+
return this.transport.request("POST", "/memory/threads", null, null);
|
|
285
274
|
}
|
|
286
275
|
async getThread(thread) {
|
|
287
|
-
return this.transport.request("GET", `/
|
|
276
|
+
return this.transport.request("GET", `/memory/threads/${thread}`, null, null);
|
|
288
277
|
}
|
|
289
278
|
async deleteThread(thread) {
|
|
290
|
-
return this.transport.request("DELETE", `/
|
|
279
|
+
return this.transport.request("DELETE", `/memory/threads/${thread}`, null, null);
|
|
291
280
|
}
|
|
292
281
|
async search(params = {}) {
|
|
293
|
-
return this.transport.request("POST", "/
|
|
282
|
+
return this.transport.request("POST", "/memory/search", null, params);
|
|
294
283
|
}
|
|
295
284
|
async listFacts(query = {}) {
|
|
296
|
-
return this.transport.request("GET", "/
|
|
285
|
+
return this.transport.request("GET", "/memory/facts", query, null);
|
|
297
286
|
}
|
|
298
287
|
async rememberFact(params = {}) {
|
|
299
|
-
return this.transport.request("POST", "/
|
|
288
|
+
return this.transport.request("POST", "/memory/facts", null, params);
|
|
300
289
|
}
|
|
301
290
|
async forgetFact(id) {
|
|
302
|
-
return this.transport.request("DELETE", `/
|
|
291
|
+
return this.transport.request("DELETE", `/memory/facts/${id}`, null, null);
|
|
303
292
|
}
|
|
304
293
|
async export(query = {}) {
|
|
305
|
-
return this.transport.request("GET", "/
|
|
294
|
+
return this.transport.request("GET", "/memory/export", query, null);
|
|
306
295
|
}
|
|
307
296
|
async erase() {
|
|
308
|
-
return this.transport.request("DELETE", "/
|
|
297
|
+
return this.transport.request("DELETE", "/memory", null, null);
|
|
309
298
|
}
|
|
310
299
|
async listDocuments(query = {}) {
|
|
311
|
-
return this.transport.request("GET", "/
|
|
300
|
+
return this.transport.request("GET", "/memory/documents", query, null);
|
|
312
301
|
}
|
|
313
302
|
async ingestDocument(params = {}) {
|
|
314
|
-
return this.transport.request("POST", "/
|
|
303
|
+
return this.transport.request("POST", "/memory/documents", null, params);
|
|
315
304
|
}
|
|
316
305
|
async getDocument(document) {
|
|
317
|
-
return this.transport.request("GET", `/
|
|
306
|
+
return this.transport.request("GET", `/memory/documents/${document}`, null, null);
|
|
318
307
|
}
|
|
319
308
|
async deleteDocument(document) {
|
|
320
|
-
return this.transport.request("DELETE", `/
|
|
309
|
+
return this.transport.request("DELETE", `/memory/documents/${document}`, null, null);
|
|
321
310
|
}
|
|
322
311
|
async listCollections(query = {}) {
|
|
323
|
-
return this.transport.request("GET", "/
|
|
312
|
+
return this.transport.request("GET", "/memory/collections", query, null);
|
|
324
313
|
}
|
|
325
314
|
async createCollection(params = {}) {
|
|
326
|
-
return this.transport.request("POST", "/
|
|
315
|
+
return this.transport.request("POST", "/memory/collections", null, params);
|
|
327
316
|
}
|
|
328
317
|
async getCollection(slug) {
|
|
329
|
-
return this.transport.request("GET", `/
|
|
318
|
+
return this.transport.request("GET", `/memory/collections/${slug}`, null, null);
|
|
330
319
|
}
|
|
331
320
|
async deleteCollection(slug) {
|
|
332
|
-
return this.transport.request("DELETE", `/
|
|
321
|
+
return this.transport.request("DELETE", `/memory/collections/${slug}`, null, null);
|
|
333
322
|
}
|
|
334
323
|
async updateCollection(slug, params = {}) {
|
|
335
|
-
return this.transport.request("PATCH", `/
|
|
324
|
+
return this.transport.request("PATCH", `/memory/collections/${slug}`, null, params);
|
|
325
|
+
}
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
// src/resources/models.ts
|
|
329
|
+
var ModelsResource = class {
|
|
330
|
+
constructor(transport) {
|
|
331
|
+
this.transport = transport;
|
|
332
|
+
}
|
|
333
|
+
transport;
|
|
334
|
+
async list() {
|
|
335
|
+
return this.transport.request("GET", "/models", null, null);
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
|
|
@@ -353,16 +353,16 @@ var Akumi = class _Akumi {
|
|
|
353
353
|
auditLog;
|
|
354
354
|
chatCompletions;
|
|
355
355
|
embeddings;
|
|
356
|
+
memory;
|
|
356
357
|
models;
|
|
357
|
-
recall;
|
|
358
358
|
scores;
|
|
359
359
|
constructor(config) {
|
|
360
360
|
this.transport = new Transport(config);
|
|
361
361
|
this.auditLog = new AuditLogResource(this.transport);
|
|
362
362
|
this.chatCompletions = new ChatCompletionsResource(this.transport);
|
|
363
363
|
this.embeddings = new EmbeddingsResource(this.transport);
|
|
364
|
+
this.memory = new MemoryResource(this.transport);
|
|
364
365
|
this.models = new ModelsResource(this.transport);
|
|
365
|
-
this.recall = new RecallResource(this.transport);
|
|
366
366
|
this.scores = new ScoresResource(this.transport);
|
|
367
367
|
}
|
|
368
368
|
static fromApiKey(apiKey) {
|
|
@@ -379,8 +379,8 @@ var Akumi = class _Akumi {
|
|
|
379
379
|
ChatCompletionsResource,
|
|
380
380
|
EmbeddingsResource,
|
|
381
381
|
InvalidRequestError,
|
|
382
|
+
MemoryResource,
|
|
382
383
|
ModelsResource,
|
|
383
384
|
RateLimitError,
|
|
384
|
-
RecallResource,
|
|
385
385
|
ScoresResource
|
|
386
386
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -38,13 +38,7 @@ declare class EmbeddingsResource {
|
|
|
38
38
|
create(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
declare class
|
|
42
|
-
private readonly transport;
|
|
43
|
-
constructor(transport: Transport);
|
|
44
|
-
list(): Promise<Record<string, unknown>>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare class RecallResource {
|
|
41
|
+
declare class MemoryResource {
|
|
48
42
|
private readonly transport;
|
|
49
43
|
constructor(transport: Transport);
|
|
50
44
|
listThreads(query?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
@@ -68,6 +62,12 @@ declare class RecallResource {
|
|
|
68
62
|
updateCollection(slug: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
69
63
|
}
|
|
70
64
|
|
|
65
|
+
declare class ModelsResource {
|
|
66
|
+
private readonly transport;
|
|
67
|
+
constructor(transport: Transport);
|
|
68
|
+
list(): Promise<Record<string, unknown>>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
71
|
declare class ScoresResource {
|
|
72
72
|
private readonly transport;
|
|
73
73
|
constructor(transport: Transport);
|
|
@@ -79,8 +79,8 @@ declare class Akumi {
|
|
|
79
79
|
readonly auditLog: AuditLogResource;
|
|
80
80
|
readonly chatCompletions: ChatCompletionsResource;
|
|
81
81
|
readonly embeddings: EmbeddingsResource;
|
|
82
|
+
readonly memory: MemoryResource;
|
|
82
83
|
readonly models: ModelsResource;
|
|
83
|
-
readonly recall: RecallResource;
|
|
84
84
|
readonly scores: ScoresResource;
|
|
85
85
|
constructor(config: ClientConfig);
|
|
86
86
|
static fromApiKey(apiKey: string): Akumi;
|
|
@@ -194,4 +194,4 @@ interface ThreadMessageViewModel {
|
|
|
194
194
|
interface ThreadViewModel {
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, ModelsResource, type PiiLanguage, RateLimitError,
|
|
197
|
+
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, MemoryResource, ModelsResource, type PiiLanguage, RateLimitError, type RememberFactRequest, ScoresResource, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
package/dist/index.d.ts
CHANGED
|
@@ -38,13 +38,7 @@ declare class EmbeddingsResource {
|
|
|
38
38
|
create(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
declare class
|
|
42
|
-
private readonly transport;
|
|
43
|
-
constructor(transport: Transport);
|
|
44
|
-
list(): Promise<Record<string, unknown>>;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
declare class RecallResource {
|
|
41
|
+
declare class MemoryResource {
|
|
48
42
|
private readonly transport;
|
|
49
43
|
constructor(transport: Transport);
|
|
50
44
|
listThreads(query?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
@@ -68,6 +62,12 @@ declare class RecallResource {
|
|
|
68
62
|
updateCollection(slug: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
69
63
|
}
|
|
70
64
|
|
|
65
|
+
declare class ModelsResource {
|
|
66
|
+
private readonly transport;
|
|
67
|
+
constructor(transport: Transport);
|
|
68
|
+
list(): Promise<Record<string, unknown>>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
71
|
declare class ScoresResource {
|
|
72
72
|
private readonly transport;
|
|
73
73
|
constructor(transport: Transport);
|
|
@@ -79,8 +79,8 @@ declare class Akumi {
|
|
|
79
79
|
readonly auditLog: AuditLogResource;
|
|
80
80
|
readonly chatCompletions: ChatCompletionsResource;
|
|
81
81
|
readonly embeddings: EmbeddingsResource;
|
|
82
|
+
readonly memory: MemoryResource;
|
|
82
83
|
readonly models: ModelsResource;
|
|
83
|
-
readonly recall: RecallResource;
|
|
84
84
|
readonly scores: ScoresResource;
|
|
85
85
|
constructor(config: ClientConfig);
|
|
86
86
|
static fromApiKey(apiKey: string): Akumi;
|
|
@@ -194,4 +194,4 @@ interface ThreadMessageViewModel {
|
|
|
194
194
|
interface ThreadViewModel {
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, ModelsResource, type PiiLanguage, RateLimitError,
|
|
197
|
+
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogResource, AuthenticationError, type ChatCompletionsRequest, ChatCompletionsResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, MemoryResource, ModelsResource, type PiiLanguage, RateLimitError, type RememberFactRequest, ScoresResource, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
package/dist/index.js
CHANGED
|
@@ -223,79 +223,79 @@ var EmbeddingsResource = class {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
|
|
226
|
-
// src/resources/
|
|
227
|
-
var
|
|
228
|
-
constructor(transport) {
|
|
229
|
-
this.transport = transport;
|
|
230
|
-
}
|
|
231
|
-
transport;
|
|
232
|
-
async list() {
|
|
233
|
-
return this.transport.request("GET", "/models", null, null);
|
|
234
|
-
}
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
// src/resources/recall.ts
|
|
238
|
-
var RecallResource = class {
|
|
226
|
+
// src/resources/memory.ts
|
|
227
|
+
var MemoryResource = class {
|
|
239
228
|
constructor(transport) {
|
|
240
229
|
this.transport = transport;
|
|
241
230
|
}
|
|
242
231
|
transport;
|
|
243
232
|
async listThreads(query = {}) {
|
|
244
|
-
return this.transport.request("GET", "/
|
|
233
|
+
return this.transport.request("GET", "/memory/threads", query, null);
|
|
245
234
|
}
|
|
246
235
|
async createThread() {
|
|
247
|
-
return this.transport.request("POST", "/
|
|
236
|
+
return this.transport.request("POST", "/memory/threads", null, null);
|
|
248
237
|
}
|
|
249
238
|
async getThread(thread) {
|
|
250
|
-
return this.transport.request("GET", `/
|
|
239
|
+
return this.transport.request("GET", `/memory/threads/${thread}`, null, null);
|
|
251
240
|
}
|
|
252
241
|
async deleteThread(thread) {
|
|
253
|
-
return this.transport.request("DELETE", `/
|
|
242
|
+
return this.transport.request("DELETE", `/memory/threads/${thread}`, null, null);
|
|
254
243
|
}
|
|
255
244
|
async search(params = {}) {
|
|
256
|
-
return this.transport.request("POST", "/
|
|
245
|
+
return this.transport.request("POST", "/memory/search", null, params);
|
|
257
246
|
}
|
|
258
247
|
async listFacts(query = {}) {
|
|
259
|
-
return this.transport.request("GET", "/
|
|
248
|
+
return this.transport.request("GET", "/memory/facts", query, null);
|
|
260
249
|
}
|
|
261
250
|
async rememberFact(params = {}) {
|
|
262
|
-
return this.transport.request("POST", "/
|
|
251
|
+
return this.transport.request("POST", "/memory/facts", null, params);
|
|
263
252
|
}
|
|
264
253
|
async forgetFact(id) {
|
|
265
|
-
return this.transport.request("DELETE", `/
|
|
254
|
+
return this.transport.request("DELETE", `/memory/facts/${id}`, null, null);
|
|
266
255
|
}
|
|
267
256
|
async export(query = {}) {
|
|
268
|
-
return this.transport.request("GET", "/
|
|
257
|
+
return this.transport.request("GET", "/memory/export", query, null);
|
|
269
258
|
}
|
|
270
259
|
async erase() {
|
|
271
|
-
return this.transport.request("DELETE", "/
|
|
260
|
+
return this.transport.request("DELETE", "/memory", null, null);
|
|
272
261
|
}
|
|
273
262
|
async listDocuments(query = {}) {
|
|
274
|
-
return this.transport.request("GET", "/
|
|
263
|
+
return this.transport.request("GET", "/memory/documents", query, null);
|
|
275
264
|
}
|
|
276
265
|
async ingestDocument(params = {}) {
|
|
277
|
-
return this.transport.request("POST", "/
|
|
266
|
+
return this.transport.request("POST", "/memory/documents", null, params);
|
|
278
267
|
}
|
|
279
268
|
async getDocument(document) {
|
|
280
|
-
return this.transport.request("GET", `/
|
|
269
|
+
return this.transport.request("GET", `/memory/documents/${document}`, null, null);
|
|
281
270
|
}
|
|
282
271
|
async deleteDocument(document) {
|
|
283
|
-
return this.transport.request("DELETE", `/
|
|
272
|
+
return this.transport.request("DELETE", `/memory/documents/${document}`, null, null);
|
|
284
273
|
}
|
|
285
274
|
async listCollections(query = {}) {
|
|
286
|
-
return this.transport.request("GET", "/
|
|
275
|
+
return this.transport.request("GET", "/memory/collections", query, null);
|
|
287
276
|
}
|
|
288
277
|
async createCollection(params = {}) {
|
|
289
|
-
return this.transport.request("POST", "/
|
|
278
|
+
return this.transport.request("POST", "/memory/collections", null, params);
|
|
290
279
|
}
|
|
291
280
|
async getCollection(slug) {
|
|
292
|
-
return this.transport.request("GET", `/
|
|
281
|
+
return this.transport.request("GET", `/memory/collections/${slug}`, null, null);
|
|
293
282
|
}
|
|
294
283
|
async deleteCollection(slug) {
|
|
295
|
-
return this.transport.request("DELETE", `/
|
|
284
|
+
return this.transport.request("DELETE", `/memory/collections/${slug}`, null, null);
|
|
296
285
|
}
|
|
297
286
|
async updateCollection(slug, params = {}) {
|
|
298
|
-
return this.transport.request("PATCH", `/
|
|
287
|
+
return this.transport.request("PATCH", `/memory/collections/${slug}`, null, params);
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
// src/resources/models.ts
|
|
292
|
+
var ModelsResource = class {
|
|
293
|
+
constructor(transport) {
|
|
294
|
+
this.transport = transport;
|
|
295
|
+
}
|
|
296
|
+
transport;
|
|
297
|
+
async list() {
|
|
298
|
+
return this.transport.request("GET", "/models", null, null);
|
|
299
299
|
}
|
|
300
300
|
};
|
|
301
301
|
|
|
@@ -316,16 +316,16 @@ var Akumi = class _Akumi {
|
|
|
316
316
|
auditLog;
|
|
317
317
|
chatCompletions;
|
|
318
318
|
embeddings;
|
|
319
|
+
memory;
|
|
319
320
|
models;
|
|
320
|
-
recall;
|
|
321
321
|
scores;
|
|
322
322
|
constructor(config) {
|
|
323
323
|
this.transport = new Transport(config);
|
|
324
324
|
this.auditLog = new AuditLogResource(this.transport);
|
|
325
325
|
this.chatCompletions = new ChatCompletionsResource(this.transport);
|
|
326
326
|
this.embeddings = new EmbeddingsResource(this.transport);
|
|
327
|
+
this.memory = new MemoryResource(this.transport);
|
|
327
328
|
this.models = new ModelsResource(this.transport);
|
|
328
|
-
this.recall = new RecallResource(this.transport);
|
|
329
329
|
this.scores = new ScoresResource(this.transport);
|
|
330
330
|
}
|
|
331
331
|
static fromApiKey(apiKey) {
|
|
@@ -341,8 +341,8 @@ export {
|
|
|
341
341
|
ChatCompletionsResource,
|
|
342
342
|
EmbeddingsResource,
|
|
343
343
|
InvalidRequestError,
|
|
344
|
+
MemoryResource,
|
|
344
345
|
ModelsResource,
|
|
345
346
|
RateLimitError,
|
|
346
|
-
RecallResource,
|
|
347
347
|
ScoresResource
|
|
348
348
|
};
|