sst 3.19.1 → 3.19.3
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/event/index.js +1 -1
- package/dist/vector/index.d.ts +13 -4
- package/package.json +9 -9
package/dist/event/index.js
CHANGED
package/dist/vector/index.d.ts
CHANGED
|
@@ -28,7 +28,8 @@ export interface PutEvent {
|
|
|
28
28
|
}
|
|
29
29
|
export interface QueryEvent {
|
|
30
30
|
/**
|
|
31
|
-
* The vector used to query the database.
|
|
31
|
+
* The vector used to query the database. When omitted, performs a metadata-only
|
|
32
|
+
* query and returns `score: 0` for each result.
|
|
32
33
|
* @example
|
|
33
34
|
* ```js
|
|
34
35
|
* {
|
|
@@ -36,10 +37,11 @@ export interface QueryEvent {
|
|
|
36
37
|
* }
|
|
37
38
|
* ```
|
|
38
39
|
*/
|
|
39
|
-
vector
|
|
40
|
+
vector?: number[];
|
|
40
41
|
/**
|
|
41
42
|
* The metadata used to filter the vectors.
|
|
42
43
|
* Only vectors that match the provided fields will be returned.
|
|
44
|
+
* @default `{}`
|
|
43
45
|
* @example
|
|
44
46
|
* Given this filter.
|
|
45
47
|
* ```js
|
|
@@ -68,7 +70,7 @@ export interface QueryEvent {
|
|
|
68
70
|
* }
|
|
69
71
|
* ```
|
|
70
72
|
*/
|
|
71
|
-
include
|
|
73
|
+
include?: Record<string, any>;
|
|
72
74
|
/**
|
|
73
75
|
* Exclude vectors with metadata that match the provided fields.
|
|
74
76
|
* @example
|
|
@@ -184,8 +186,9 @@ export interface VectorClientResponse {
|
|
|
184
186
|
*/
|
|
185
187
|
put: (event: PutEvent) => Promise<void>;
|
|
186
188
|
/**
|
|
187
|
-
* Query vectors that are similar to the given vector
|
|
189
|
+
* Query vectors that are similar to the given vector.
|
|
188
190
|
* @example
|
|
191
|
+
* Query by vector similarity.
|
|
189
192
|
* ```ts title="src/lambda.ts"
|
|
190
193
|
* const result = await client.query({
|
|
191
194
|
* vector: [32.4, 6.55, 11.2, 10.3, 87.9],
|
|
@@ -193,6 +196,12 @@ export interface VectorClientResponse {
|
|
|
193
196
|
* exclude: { genre: "thriller" },
|
|
194
197
|
* });
|
|
195
198
|
* ```
|
|
199
|
+
* Query by metadata only (no vector). Returns `score: 0` for each result.
|
|
200
|
+
* ```ts title="src/lambda.ts"
|
|
201
|
+
* const result = await client.query({
|
|
202
|
+
* include: { type: "movie" },
|
|
203
|
+
* });
|
|
204
|
+
* ```
|
|
196
205
|
*/
|
|
197
206
|
query: (event: QueryEvent) => Promise<QueryResponse>;
|
|
198
207
|
/**
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "sst",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
|
-
"version": "3.19.
|
|
6
|
+
"version": "3.19.3",
|
|
7
7
|
"main": "./dist/index.js",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"sst": "./bin/sst.mjs"
|
|
45
45
|
},
|
|
46
46
|
"optionalDependencies": {
|
|
47
|
-
"sst-linux-x64": "3.19.
|
|
48
|
-
"sst-linux-x86": "3.19.
|
|
49
|
-
"sst-darwin-x64": "3.19.
|
|
50
|
-
"sst-linux-arm64": "3.19.
|
|
51
|
-
"sst-darwin-arm64": "3.19.
|
|
52
|
-
"sst-win32-x64": "3.19.
|
|
53
|
-
"sst-win32-x86": "3.19.
|
|
54
|
-
"sst-win32-arm64": "3.19.
|
|
47
|
+
"sst-linux-x64": "3.19.3",
|
|
48
|
+
"sst-linux-x86": "3.19.3",
|
|
49
|
+
"sst-darwin-x64": "3.19.3",
|
|
50
|
+
"sst-linux-arm64": "3.19.3",
|
|
51
|
+
"sst-darwin-arm64": "3.19.3",
|
|
52
|
+
"sst-win32-x64": "3.19.3",
|
|
53
|
+
"sst-win32-x86": "3.19.3",
|
|
54
|
+
"sst-win32-arm64": "3.19.3"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"aws-sdk": "2.1692.0",
|