aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2024-07-27 16:46:43 +0000
committerAnthony Wang2024-07-27 16:46:43 +0000
commitcd89259c8db0bf233c50f8807ae27455cb9af856 (patch)
tree05dddd62dc8b081431622d57b5568c4c8be04c25
parentcd5f01368954d1e1295f9b4f477d9d586e6903b0 (diff)
Use cosine similarity instead of l2
-rw-r--r--server.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.py b/server.py
index ac8ea15..6a04076 100644
--- a/server.py
+++ b/server.py
@@ -23,7 +23,7 @@ cur.execute(
"CREATE TABLE IF NOT EXISTS idx (id INTEGER PRIMARY KEY, parent INTEGER, time INTEGER, path TEXT)"
)
cur.execute(
- "CREATE VIRTUAL TABLE IF NOT EXISTS emb USING vec0(id INTEGER PRIMARY KEY, embedding float[1024])"
+ "CREATE VIRTUAL TABLE IF NOT EXISTS emb USING vec0(id INTEGER PRIMARY KEY, embedding float[1024] distance_metric=cosine)"
)
con.commit()