From 3f9ecb9bfb35a0e914831e8c932aeb80f5581c79 Mon Sep 17 00:00:00 2001 From: flick Date: Sun, 24 Nov 2024 01:07:43 -0700 Subject: [PATCH] fix: sql command --- packages/adapter-sqlite/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/adapter-sqlite/src/index.ts b/packages/adapter-sqlite/src/index.ts index d487d82220..33b30385a8 100644 --- a/packages/adapter-sqlite/src/index.ts +++ b/packages/adapter-sqlite/src/index.ts @@ -296,7 +296,7 @@ export class SqliteDatabaseAdapter let sql = ` SELECT *, vec_distance_L2(embedding, ?) AS similarity FROM memories - WHERE embedding IS NOT NULL type = ? AND agentId = ?`; + WHERE embedding IS NOT NULL AND type = ? AND agentId = ?`; if (params.unique) { sql += " AND `unique` = 1";