for those who jump straight to the comments (like me), this is a python for managing unstructured vectors/embeddings in Postgres using pgvector. It works with any Postgres/pgvector database<p>The core of the API is this:<p><pre><code> import vecs
DB_CONNECTION = "postgresql://<user>:<password>@<host>:<port>/<db_name>"
# create vector store client
vx = vecs.create_client(DB_CONNECTION)
# create a collection of vectors with 3 dimensions
docs = vx.create_collection(name="docs", dimension=3)
# Add embeddings
docs.upsert(vectors=[("vec0", [0.1, 0.2, 0.3], {"year": 1973})])
# Query embeddings
docs.query(query_vector=[0.10,0.21,0.29], limit=1)
</code></pre>
This stores all the data in a new `vecs` schema in your database. It took me a while to grasp the nature of structured (eg, manage tables/data with migrations) with unstructured/nosql, but the use cases for vectors are very often geared towards data scientists/engineers. There is some more info about the interop between these approaches here: <a href="https://supabase.com/docs/guides/ai/structured-unstructured">https://supabase.com/docs/guides/ai/structured-unstructured</a>
hi, author here & happy to answer any questions<p>Really looking forward to the next steps with vecs and would love to hear any thoughts about the `future ideas`.<p>Mainly, what kind of interface would you like to see for adapters/transforms so collections can feel like you're inserting text/images/video/whatever rather than passing vectors around?