korely-memory 0.1.12 → 0.1.13
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/README.md +1 -1
- package/dist/index.cjs +4 -3
- package/dist/index.d.cts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ Every method maps to one REST endpoint.
|
|
|
95
95
|
| Method | Endpoint | |
|
|
96
96
|
|---|---|---|
|
|
97
97
|
| `add(content, opts?)` | `POST /v1/memories` | Write. `content` is a string or a list of chat messages. `opts.timestamp` (ISO) backfills the past: facts inherit it as `valid_from`. |
|
|
98
|
-
| `search(query, opts?)` | `POST /v1/memories/search` | Semantic search over memories; filter by `user_id`, `agent_id`, `run_id`, `metadata
|
|
98
|
+
| `search(query, opts?)` | `POST /v1/memories/search` | Semantic search over memories; filter by `user_id`, `agent_id`, `run_id`, `metadata`; `min_score` (0 to 1) leaves out hits scored below it. |
|
|
99
99
|
| `getAll(opts?)` | `GET /v1/memories` | List a scope, newest first. The page is iterable; `limit` up to 200. |
|
|
100
100
|
| `get(id)` | `GET /v1/memories/:id` | One memory, with its facts. |
|
|
101
101
|
| `update(id, { content })` | `PATCH /v1/memories/:id` | Re-runs extraction. |
|
package/dist/index.cjs
CHANGED
|
@@ -126,12 +126,12 @@ function unknownOption(method, opts, known) {
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
// src/client.ts
|
|
129
|
-
var VERSION = "0.1.
|
|
129
|
+
var VERSION = "0.1.13";
|
|
130
130
|
var REGIONS = { eu: "https://api.korely.ai" };
|
|
131
131
|
var CLIENT_KEYS = keysOf()("apiKey", "region", "baseUrl", "timeoutMs", "fetch");
|
|
132
132
|
var INIT_KEYS = keysOf()("region", "baseUrl", "timeoutMs", "fetch", "processingRegion");
|
|
133
133
|
var ADD_KEYS = keysOf()("agent_id", "user_id", "run_id", "metadata", "timestamp");
|
|
134
|
-
var SEARCH_KEYS = keysOf()("user_id", "agent_id", "run_id", "metadata", "limit");
|
|
134
|
+
var SEARCH_KEYS = keysOf()("user_id", "agent_id", "run_id", "metadata", "limit", "min_score");
|
|
135
135
|
var LIST_KEYS = keysOf()("user_id", "agent_id", "run_id", "limit", "offset");
|
|
136
136
|
var UPDATE_KEYS = keysOf()("content", "expected_updated_at");
|
|
137
137
|
var USERS_KEYS = keysOf()("agent_id", "limit", "offset");
|
|
@@ -635,7 +635,8 @@ var Korely = class {
|
|
|
635
635
|
agent_id: opts.agent_id,
|
|
636
636
|
run_id: opts.run_id,
|
|
637
637
|
metadata: opts.metadata,
|
|
638
|
-
limit: opts.limit
|
|
638
|
+
limit: opts.limit,
|
|
639
|
+
min_score: opts.min_score
|
|
639
640
|
}
|
|
640
641
|
});
|
|
641
642
|
return body.results ?? [];
|
package/dist/index.d.cts
CHANGED
|
@@ -370,6 +370,13 @@ interface SearchOptions {
|
|
|
370
370
|
metadata?: Record<string, unknown>;
|
|
371
371
|
/** Server default 15, max 50. */
|
|
372
372
|
limit?: number;
|
|
373
|
+
/**
|
|
374
|
+
* Leave out the memories whose `score` is below this, 0 to 1 (a cosine
|
|
375
|
+
* similarity, compared as the response shows it). Absent: no floor. Fewer
|
|
376
|
+
* than `limit` results can come back. 0.20 is the value measured on
|
|
377
|
+
* LongMemEval with EmbeddingGemma; the right one depends on your texts.
|
|
378
|
+
*/
|
|
379
|
+
min_score?: number;
|
|
373
380
|
}
|
|
374
381
|
interface ListOptions {
|
|
375
382
|
user_id?: string;
|
|
@@ -474,7 +481,7 @@ interface ForgetReceipt {
|
|
|
474
481
|
|
|
475
482
|
/** Must equal `version` in package.json (a test checks). It goes out in the
|
|
476
483
|
* X-Korely-Client header, and said 0.1.1 from 0.1.1 to 0.1.6. */
|
|
477
|
-
declare const VERSION = "0.1.
|
|
484
|
+
declare const VERSION = "0.1.13";
|
|
478
485
|
interface KorelyOptions {
|
|
479
486
|
/** Your `kor_live_...` key. Falls back to the KORELY_API_KEY env var. */
|
|
480
487
|
apiKey?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -370,6 +370,13 @@ interface SearchOptions {
|
|
|
370
370
|
metadata?: Record<string, unknown>;
|
|
371
371
|
/** Server default 15, max 50. */
|
|
372
372
|
limit?: number;
|
|
373
|
+
/**
|
|
374
|
+
* Leave out the memories whose `score` is below this, 0 to 1 (a cosine
|
|
375
|
+
* similarity, compared as the response shows it). Absent: no floor. Fewer
|
|
376
|
+
* than `limit` results can come back. 0.20 is the value measured on
|
|
377
|
+
* LongMemEval with EmbeddingGemma; the right one depends on your texts.
|
|
378
|
+
*/
|
|
379
|
+
min_score?: number;
|
|
373
380
|
}
|
|
374
381
|
interface ListOptions {
|
|
375
382
|
user_id?: string;
|
|
@@ -474,7 +481,7 @@ interface ForgetReceipt {
|
|
|
474
481
|
|
|
475
482
|
/** Must equal `version` in package.json (a test checks). It goes out in the
|
|
476
483
|
* X-Korely-Client header, and said 0.1.1 from 0.1.1 to 0.1.6. */
|
|
477
|
-
declare const VERSION = "0.1.
|
|
484
|
+
declare const VERSION = "0.1.13";
|
|
478
485
|
interface KorelyOptions {
|
|
479
486
|
/** Your `kor_live_...` key. Falls back to the KORELY_API_KEY env var. */
|
|
480
487
|
apiKey?: string;
|
package/dist/index.js
CHANGED
|
@@ -77,12 +77,12 @@ var TooManyBatchesError = class _TooManyBatchesError extends QuotaExceededError
|
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
// src/client.ts
|
|
80
|
-
var VERSION = "0.1.
|
|
80
|
+
var VERSION = "0.1.13";
|
|
81
81
|
var REGIONS = { eu: "https://api.korely.ai" };
|
|
82
82
|
var CLIENT_KEYS = keysOf()("apiKey", "region", "baseUrl", "timeoutMs", "fetch");
|
|
83
83
|
var INIT_KEYS = keysOf()("region", "baseUrl", "timeoutMs", "fetch", "processingRegion");
|
|
84
84
|
var ADD_KEYS = keysOf()("agent_id", "user_id", "run_id", "metadata", "timestamp");
|
|
85
|
-
var SEARCH_KEYS = keysOf()("user_id", "agent_id", "run_id", "metadata", "limit");
|
|
85
|
+
var SEARCH_KEYS = keysOf()("user_id", "agent_id", "run_id", "metadata", "limit", "min_score");
|
|
86
86
|
var LIST_KEYS = keysOf()("user_id", "agent_id", "run_id", "limit", "offset");
|
|
87
87
|
var UPDATE_KEYS = keysOf()("content", "expected_updated_at");
|
|
88
88
|
var USERS_KEYS = keysOf()("agent_id", "limit", "offset");
|
|
@@ -586,7 +586,8 @@ var Korely = class {
|
|
|
586
586
|
agent_id: opts.agent_id,
|
|
587
587
|
run_id: opts.run_id,
|
|
588
588
|
metadata: opts.metadata,
|
|
589
|
-
limit: opts.limit
|
|
589
|
+
limit: opts.limit,
|
|
590
|
+
min_score: opts.min_score
|
|
590
591
|
}
|
|
591
592
|
});
|
|
592
593
|
return body.results ?? [];
|