montycat 1.1.6 → 1.1.7
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 +7 -7
- package/dist/classes/generic.d.ts +4 -2
- package/dist/classes/generic.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@ The official Node.js & TypeScript SDK for [Montycat](https://montygovernance.com
|
|
|
14
14
|
```typescript
|
|
15
15
|
// Search your data by MEANING — no external APIs, no separate vector database.
|
|
16
16
|
// (already ON by default in the montycat-semantic server edition)
|
|
17
|
-
const hits = await Sales.semanticSearchGetValues({ query: '
|
|
18
|
-
// → [{
|
|
17
|
+
const hits = await Sales.semanticSearchGetValues({ query: 'Show all Bluetooth devices', limitOutput: { start: 0, stop: 5 } });
|
|
18
|
+
// → [{ __key__, __score__, __value__: { name: 'Wireless Headphones' } }, ...] (matched by meaning, not keywords)
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
> ### 🧩 All-in-one. AI-native. **Zero external dependencies.**
|
|
@@ -328,13 +328,13 @@ in the background as data is written (the embedding model is downloaded on deman
|
|
|
328
328
|
```typescript
|
|
329
329
|
// Semantic search is ON by default in the montycat-semantic edition — just search.
|
|
330
330
|
// Rank stored items by meaning — two flavors:
|
|
331
|
-
// getValues → each hit is {
|
|
332
|
-
// getKeys → each hit is {
|
|
333
|
-
const hits = await Sales.semanticSearchGetValues({ query: '
|
|
334
|
-
const keys = await Sales.semanticSearchGetKeys({ query: '
|
|
331
|
+
// getValues → each hit is { __key__, __score__, __value__ }
|
|
332
|
+
// getKeys → each hit is { __key__, __score__ } (lighter; fetch a page later with getBulk)
|
|
333
|
+
const hits = await Sales.semanticSearchGetValues({ query: 'Show all Bluetooth devices', limitOutput: { start: 0, stop: 5 } });
|
|
334
|
+
const keys = await Sales.semanticSearchGetKeys({ query: 'Show all Bluetooth devices', limitOutput: { start: 0, stop: 5 } });
|
|
335
335
|
|
|
336
336
|
// Optionally drop weak matches by cosine similarity (range [-1, 1]).
|
|
337
|
-
const strong = await Sales.semanticSearchGetKeys({ query: '
|
|
337
|
+
const strong = await Sales.semanticSearchGetKeys({ query: 'Show all Bluetooth devices', limitOutput: { start: 0, stop: 5 }, minScore: 0.35 });
|
|
338
338
|
|
|
339
339
|
// Control the DB-wide switch (optional — it's already on):
|
|
340
340
|
// switch the embedding model: 'minilm' | 'bge-small' (default) | 'bge-base' | 'e5-small'
|
|
@@ -173,7 +173,7 @@ declare class GenericKV {
|
|
|
173
173
|
* (the default) lets the server apply its default top-k (10).
|
|
174
174
|
* @param minScore - Drop hits whose cosine similarity (in [-1, 1]) is below
|
|
175
175
|
* this value. Default null (no score filter).
|
|
176
|
-
* @return A promise resolving with ranked hits, each `{
|
|
176
|
+
* @return A promise resolving with ranked hits, each `{__key__, __score__}`.
|
|
177
177
|
*/
|
|
178
178
|
static semanticSearchGetKeys({ query, limitOutput, minScore }: {
|
|
179
179
|
query: string;
|
|
@@ -204,7 +204,9 @@ declare class GenericKV {
|
|
|
204
204
|
* returned value.
|
|
205
205
|
* @param pointersMetadata - Whether to include pointer metadata in each
|
|
206
206
|
* returned value.
|
|
207
|
-
* @return A promise resolving with ranked hits, each
|
|
207
|
+
* @return A promise resolving with ranked hits, each
|
|
208
|
+
* `{__key__, __score__, __value__}` — the same dunder envelope
|
|
209
|
+
* `lookupValuesWhere` returns with `keyIncluded: true`, plus the score.
|
|
208
210
|
*/
|
|
209
211
|
static semanticSearchGetValues({ query, limitOutput, minScore, withPointers, pointersMetadata }: {
|
|
210
212
|
query: string;
|
package/dist/classes/generic.js
CHANGED
|
@@ -254,7 +254,7 @@ class GenericKV {
|
|
|
254
254
|
* (the default) lets the server apply its default top-k (10).
|
|
255
255
|
* @param minScore - Drop hits whose cosine similarity (in [-1, 1]) is below
|
|
256
256
|
* this value. Default null (no score filter).
|
|
257
|
-
* @return A promise resolving with ranked hits, each `{
|
|
257
|
+
* @return A promise resolving with ranked hits, each `{__key__, __score__}`.
|
|
258
258
|
*/
|
|
259
259
|
static async semanticSearchGetKeys({ query, limitOutput = { start: 0, stop: 0 }, minScore = null }) {
|
|
260
260
|
return this.semanticSearchCore(query, limitOutput, minScore, false, false, false);
|
|
@@ -280,7 +280,9 @@ class GenericKV {
|
|
|
280
280
|
* returned value.
|
|
281
281
|
* @param pointersMetadata - Whether to include pointer metadata in each
|
|
282
282
|
* returned value.
|
|
283
|
-
* @return A promise resolving with ranked hits, each
|
|
283
|
+
* @return A promise resolving with ranked hits, each
|
|
284
|
+
* `{__key__, __score__, __value__}` — the same dunder envelope
|
|
285
|
+
* `lookupValuesWhere` returns with `keyIncluded: true`, plus the score.
|
|
284
286
|
*/
|
|
285
287
|
static async semanticSearchGetValues({ query, limitOutput = { start: 0, stop: 0 }, minScore = null, withPointers = false, pointersMetadata = false }) {
|
|
286
288
|
return this.semanticSearchCore(query, limitOutput, minScore, withPointers, true, pointersMetadata);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "montycat",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Self-hosted vector database + NoSQL with built-in AI semantic search — the Node.js & TypeScript client for Montycat. A Rust-powered, AI-native Pinecone / Weaviate / Chroma alternative for RAG, AI agents & LLM memory.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|