@akumi/sdk 0.2.2 → 0.4.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 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;
@@ -104,40 +111,40 @@ interface AuditLogApiResource {
104
111
  ipAddress: string | null;
105
112
  userAgent: string | null;
106
113
  target: unknown | null;
107
- metadata: unknown[] | null;
108
- createdAt: string;
114
+ metadata: unknown | null;
115
+ createdAt: string | null;
109
116
  }
110
117
 
111
118
  interface ChatCompletionsRequest {
112
119
  messages: unknown[];
113
120
  model?: string;
121
+ models?: string[];
122
+ provider?: unknown;
114
123
  temperature?: number | null;
115
124
  max_tokens?: number | null;
116
125
  stream?: boolean | null;
126
+ stream_options?: unknown;
117
127
  firewall?: boolean | null;
128
+ collection?: string[] | null;
118
129
  user?: string | null;
119
130
  thread?: string | null;
131
+ tags?: string[] | null;
120
132
  name?: string | null;
121
133
  top_p?: number | null;
134
+ stop?: string[] | null;
122
135
  presence_penalty?: number | null;
123
136
  frequency_penalty?: number | null;
124
137
  n?: number | null;
125
138
  seed?: number | null;
139
+ logit_bias?: number[] | null;
126
140
  logprobs?: boolean | null;
127
141
  top_logprobs?: number | null;
128
142
  max_completion_tokens?: number | null;
143
+ tools?: unknown[] | null;
129
144
  tool_choice?: string | null;
130
145
  parallel_tool_calls?: boolean | null;
131
146
  cache?: boolean | null;
132
- models?: string[];
133
- provider?: unknown;
134
- stream_options?: unknown;
135
- collection?: string[] | null;
136
- tags?: string[] | null;
137
- stop?: string[] | null;
138
- logit_bias?: number[] | null;
139
147
  response_format?: unknown;
140
- tools?: unknown[] | null;
141
148
  }
142
149
 
143
150
  interface EmbeddingsRequest {
@@ -169,26 +176,34 @@ interface SearchDocumentsRequest {
169
176
 
170
177
  interface SearchFactsRequest {
171
178
  query: string;
179
+ collection?: string[] | null;
172
180
  user_ref?: string | null;
173
181
  limit?: number | null;
174
- collection?: string[] | null;
175
182
  }
176
183
 
177
184
  interface SearchRequest {
178
185
  query: string;
186
+ collection?: string[] | null;
179
187
  user_ref?: string | null;
180
188
  limit?: number | null;
181
- collection?: string[] | null;
182
189
  }
183
190
 
184
191
  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;
@@ -104,40 +111,40 @@ interface AuditLogApiResource {
104
111
  ipAddress: string | null;
105
112
  userAgent: string | null;
106
113
  target: unknown | null;
107
- metadata: unknown[] | null;
108
- createdAt: string;
114
+ metadata: unknown | null;
115
+ createdAt: string | null;
109
116
  }
110
117
 
111
118
  interface ChatCompletionsRequest {
112
119
  messages: unknown[];
113
120
  model?: string;
121
+ models?: string[];
122
+ provider?: unknown;
114
123
  temperature?: number | null;
115
124
  max_tokens?: number | null;
116
125
  stream?: boolean | null;
126
+ stream_options?: unknown;
117
127
  firewall?: boolean | null;
128
+ collection?: string[] | null;
118
129
  user?: string | null;
119
130
  thread?: string | null;
131
+ tags?: string[] | null;
120
132
  name?: string | null;
121
133
  top_p?: number | null;
134
+ stop?: string[] | null;
122
135
  presence_penalty?: number | null;
123
136
  frequency_penalty?: number | null;
124
137
  n?: number | null;
125
138
  seed?: number | null;
139
+ logit_bias?: number[] | null;
126
140
  logprobs?: boolean | null;
127
141
  top_logprobs?: number | null;
128
142
  max_completion_tokens?: number | null;
143
+ tools?: unknown[] | null;
129
144
  tool_choice?: string | null;
130
145
  parallel_tool_calls?: boolean | null;
131
146
  cache?: boolean | null;
132
- models?: string[];
133
- provider?: unknown;
134
- stream_options?: unknown;
135
- collection?: string[] | null;
136
- tags?: string[] | null;
137
- stop?: string[] | null;
138
- logit_bias?: number[] | null;
139
147
  response_format?: unknown;
140
- tools?: unknown[] | null;
141
148
  }
142
149
 
143
150
  interface EmbeddingsRequest {
@@ -169,26 +176,34 @@ interface SearchDocumentsRequest {
169
176
 
170
177
  interface SearchFactsRequest {
171
178
  query: string;
179
+ collection?: string[] | null;
172
180
  user_ref?: string | null;
173
181
  limit?: number | null;
174
- collection?: string[] | null;
175
182
  }
176
183
 
177
184
  interface SearchRequest {
178
185
  query: string;
186
+ collection?: string[] | null;
179
187
  user_ref?: string | null;
180
188
  limit?: number | null;
181
- collection?: string[] | null;
182
189
  }
183
190
 
184
191
  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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akumi/sdk",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "description": "Official TypeScript SDK for the Akumi EU-sovereign inference API.",
5
5
  "license": "MIT",
6
6
  "type": "module",