You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/sqlalchemy_async.py
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ class Item(Base):
21
21
id: Mapped[int] =mapped_column(primary_key=True)
22
22
embedding=mapped_column(Vector(3))
23
23
24
+
24
25
# Define HNSW index to support vector similarity search through the vector_l2_ops access method (Euclidean distance). The SQL operator for Euclidean distance is written as <->.
Copy file name to clipboardExpand all lines: examples/sqlalchemy_items.py
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,7 @@ class Item(Base):
17
17
id: Mapped[int] =mapped_column(primary_key=True)
18
18
embedding=mapped_column(Vector(3))
19
19
20
+
20
21
# Define HNSW index to support vector similarity search through the vector_l2_ops access method (Euclidean distance). The SQL operator for Euclidean distance is written as <->.
Copy file name to clipboardExpand all lines: examples/sqlalchemy_movies.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ class Movie(Base):
20
20
title: Mapped[str] =mapped_column()
21
21
title_vector=mapped_column(Vector(1536)) # ada-002 is 1536-dimensional
22
22
23
+
23
24
# Define HNSW index to support vector similarity search through the vector_cosine_ops access method (cosine distance). The SQL operator for cosine distance is written as <=>.
0 commit comments