@akumi/sdk 0.2.1 → 0.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/dist/index.cjs +17 -2
- package/dist/index.d.cts +16 -1
- package/dist/index.d.ts +16 -1
- package/dist/index.js +15 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -30,7 +30,8 @@ __export(index_exports, {
|
|
|
30
30
|
InvalidRequestError: () => InvalidRequestError,
|
|
31
31
|
ModelsResource: () => ModelsResource,
|
|
32
32
|
RateLimitError: () => RateLimitError,
|
|
33
|
-
RecallResource: () => RecallResource
|
|
33
|
+
RecallResource: () => RecallResource,
|
|
34
|
+
ScoresResource: () => ScoresResource
|
|
34
35
|
});
|
|
35
36
|
module.exports = __toCommonJS(index_exports);
|
|
36
37
|
|
|
@@ -291,6 +292,17 @@ var RecallResource = class {
|
|
|
291
292
|
}
|
|
292
293
|
};
|
|
293
294
|
|
|
295
|
+
// src/resources/scores.ts
|
|
296
|
+
var ScoresResource = class {
|
|
297
|
+
constructor(transport) {
|
|
298
|
+
this.transport = transport;
|
|
299
|
+
}
|
|
300
|
+
transport;
|
|
301
|
+
async create(params = {}) {
|
|
302
|
+
return this.transport.request("POST", "/scores", null, params);
|
|
303
|
+
}
|
|
304
|
+
};
|
|
305
|
+
|
|
294
306
|
// src/resources/auditLogs.ts
|
|
295
307
|
var AuditLogsResource = class {
|
|
296
308
|
constructor(transport) {
|
|
@@ -345,6 +357,7 @@ var ModelsResource = class {
|
|
|
345
357
|
var Akumi = class _Akumi {
|
|
346
358
|
transport;
|
|
347
359
|
recall;
|
|
360
|
+
scores;
|
|
348
361
|
auditLogs;
|
|
349
362
|
chat;
|
|
350
363
|
embeddings;
|
|
@@ -352,6 +365,7 @@ var Akumi = class _Akumi {
|
|
|
352
365
|
constructor(config) {
|
|
353
366
|
this.transport = new Transport(config);
|
|
354
367
|
this.recall = new RecallResource(this.transport);
|
|
368
|
+
this.scores = new ScoresResource(this.transport);
|
|
355
369
|
this.auditLogs = new AuditLogsResource(this.transport);
|
|
356
370
|
this.chat = new ChatResource(this.transport);
|
|
357
371
|
this.embeddings = new EmbeddingsResource(this.transport);
|
|
@@ -373,5 +387,6 @@ var Akumi = class _Akumi {
|
|
|
373
387
|
InvalidRequestError,
|
|
374
388
|
ModelsResource,
|
|
375
389
|
RateLimitError,
|
|
376
|
-
RecallResource
|
|
390
|
+
RecallResource,
|
|
391
|
+
ScoresResource
|
|
377
392
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -44,6 +44,12 @@ declare class RecallResource {
|
|
|
44
44
|
updateCollection(slug: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
declare class ScoresResource {
|
|
48
|
+
private readonly transport;
|
|
49
|
+
constructor(transport: Transport);
|
|
50
|
+
create(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
51
|
+
}
|
|
52
|
+
|
|
47
53
|
declare class AuditLogsResource {
|
|
48
54
|
private readonly transport;
|
|
49
55
|
constructor(transport: Transport);
|
|
@@ -73,6 +79,7 @@ declare class ModelsResource {
|
|
|
73
79
|
declare class Akumi {
|
|
74
80
|
private readonly transport;
|
|
75
81
|
readonly recall: RecallResource;
|
|
82
|
+
readonly scores: ScoresResource;
|
|
76
83
|
readonly auditLogs: AuditLogsResource;
|
|
77
84
|
readonly chat: ChatResource;
|
|
78
85
|
readonly embeddings: EmbeddingsResource;
|
|
@@ -185,10 +192,18 @@ interface StoreCollectionRequest {
|
|
|
185
192
|
name: string;
|
|
186
193
|
}
|
|
187
194
|
|
|
195
|
+
interface StoreScoreRequest {
|
|
196
|
+
request_id: string;
|
|
197
|
+
name: string;
|
|
198
|
+
value?: number;
|
|
199
|
+
value_string?: string;
|
|
200
|
+
comment?: string | null;
|
|
201
|
+
}
|
|
202
|
+
|
|
188
203
|
interface ThreadMessageViewModel {
|
|
189
204
|
}
|
|
190
205
|
|
|
191
206
|
interface ThreadViewModel {
|
|
192
207
|
}
|
|
193
208
|
|
|
194
|
-
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogsResource, AuthenticationError, type ChatCompletionsRequest, ChatResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, ModelsResource, RateLimitError, RecallResource, type RememberFactRequest, type SearchDocumentsRequest, type SearchFactsRequest, type SearchRequest, type StoreCollectionRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
|
209
|
+
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogsResource, AuthenticationError, type ChatCompletionsRequest, ChatResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, ModelsResource, RateLimitError, RecallResource, type RememberFactRequest, ScoresResource, type SearchDocumentsRequest, type SearchFactsRequest, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
package/dist/index.d.ts
CHANGED
|
@@ -44,6 +44,12 @@ declare class RecallResource {
|
|
|
44
44
|
updateCollection(slug: string, params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
declare class ScoresResource {
|
|
48
|
+
private readonly transport;
|
|
49
|
+
constructor(transport: Transport);
|
|
50
|
+
create(params?: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
51
|
+
}
|
|
52
|
+
|
|
47
53
|
declare class AuditLogsResource {
|
|
48
54
|
private readonly transport;
|
|
49
55
|
constructor(transport: Transport);
|
|
@@ -73,6 +79,7 @@ declare class ModelsResource {
|
|
|
73
79
|
declare class Akumi {
|
|
74
80
|
private readonly transport;
|
|
75
81
|
readonly recall: RecallResource;
|
|
82
|
+
readonly scores: ScoresResource;
|
|
76
83
|
readonly auditLogs: AuditLogsResource;
|
|
77
84
|
readonly chat: ChatResource;
|
|
78
85
|
readonly embeddings: EmbeddingsResource;
|
|
@@ -185,10 +192,18 @@ interface StoreCollectionRequest {
|
|
|
185
192
|
name: string;
|
|
186
193
|
}
|
|
187
194
|
|
|
195
|
+
interface StoreScoreRequest {
|
|
196
|
+
request_id: string;
|
|
197
|
+
name: string;
|
|
198
|
+
value?: number;
|
|
199
|
+
value_string?: string;
|
|
200
|
+
comment?: string | null;
|
|
201
|
+
}
|
|
202
|
+
|
|
188
203
|
interface ThreadMessageViewModel {
|
|
189
204
|
}
|
|
190
205
|
|
|
191
206
|
interface ThreadViewModel {
|
|
192
207
|
}
|
|
193
208
|
|
|
194
|
-
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogsResource, AuthenticationError, type ChatCompletionsRequest, ChatResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, ModelsResource, RateLimitError, RecallResource, type RememberFactRequest, type SearchDocumentsRequest, type SearchFactsRequest, type SearchRequest, type StoreCollectionRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
|
209
|
+
export { Akumi, AkumiError, ApiError, type AuditLogApiResource, AuditLogsResource, AuthenticationError, type ChatCompletionsRequest, ChatResource, type ClientConfig, type EmbeddingsRequest, EmbeddingsResource, type IngestDocumentRequest, InvalidRequestError, ModelsResource, RateLimitError, RecallResource, type RememberFactRequest, ScoresResource, type SearchDocumentsRequest, type SearchFactsRequest, type SearchRequest, type StoreCollectionRequest, type StoreScoreRequest, type ThreadMessageViewModel, type ThreadViewModel };
|
package/dist/index.js
CHANGED
|
@@ -255,6 +255,17 @@ var RecallResource = class {
|
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
257
|
|
|
258
|
+
// src/resources/scores.ts
|
|
259
|
+
var ScoresResource = class {
|
|
260
|
+
constructor(transport) {
|
|
261
|
+
this.transport = transport;
|
|
262
|
+
}
|
|
263
|
+
transport;
|
|
264
|
+
async create(params = {}) {
|
|
265
|
+
return this.transport.request("POST", "/scores", null, params);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
|
|
258
269
|
// src/resources/auditLogs.ts
|
|
259
270
|
var AuditLogsResource = class {
|
|
260
271
|
constructor(transport) {
|
|
@@ -309,6 +320,7 @@ var ModelsResource = class {
|
|
|
309
320
|
var Akumi = class _Akumi {
|
|
310
321
|
transport;
|
|
311
322
|
recall;
|
|
323
|
+
scores;
|
|
312
324
|
auditLogs;
|
|
313
325
|
chat;
|
|
314
326
|
embeddings;
|
|
@@ -316,6 +328,7 @@ var Akumi = class _Akumi {
|
|
|
316
328
|
constructor(config) {
|
|
317
329
|
this.transport = new Transport(config);
|
|
318
330
|
this.recall = new RecallResource(this.transport);
|
|
331
|
+
this.scores = new ScoresResource(this.transport);
|
|
319
332
|
this.auditLogs = new AuditLogsResource(this.transport);
|
|
320
333
|
this.chat = new ChatResource(this.transport);
|
|
321
334
|
this.embeddings = new EmbeddingsResource(this.transport);
|
|
@@ -336,5 +349,6 @@ export {
|
|
|
336
349
|
InvalidRequestError,
|
|
337
350
|
ModelsResource,
|
|
338
351
|
RateLimitError,
|
|
339
|
-
RecallResource
|
|
352
|
+
RecallResource,
|
|
353
|
+
ScoresResource
|
|
340
354
|
};
|