The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Update document image-search-openai-clip.mdx (#17621)
Yaoda Liu3786aa54fc13
diff --git a/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdx b/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdxindex 7b783db0122..951a586c696 100644--- a/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdx+++ b/apps/docs/pages/guides/ai/examples/image-search-openai-clip.mdx@@ -97,7 +97,7 @@ def seed():# add records to the *images* collectionimages.upsert(- vectors=[+ records=[("one.jpg", # the vector's identifierimg_emb1, # the vector. list or np.array@@ -142,7 +142,7 @@ With Supabase Vector we can easily query our embeddings. We can use either an imdef search():# create vector store clientvx = vecs.create_client(DB_CONNECTION)- images = vx.get_collection(name="image_vectors")+ images = vx.get_or_create_collection(name="image_vectors", dimension=512)# Load CLIP modelmodel = SentenceTransformer('clip-ViT-B-32')@@ -152,7 +152,7 @@ def search():# query the collection filtering metadata for "type" = "jpg"results = images.query(- query_vector=text_emb, # required+ data=text_emb, # requiredlimit=1, # number of records to returnfilters={"type": {"$eq": "jpg"}}, # metadata filters)