From 812f7789f32afeef3b643b671cbecbd3ce84c80a Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Thu, 27 Jul 2023 10:37:53 -0500 Subject: [PATCH 1/2] docs fixes --- docs/api.md | 6 +++--- docs/concepts_adapters.md | 8 ++++---- docs/support_changelog.md | 5 +++-- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/api.md b/docs/api.md index 20e9329..d114094 100644 --- a/docs/api.md +++ b/docs/api.md @@ -184,14 +184,14 @@ Adapters are an optional feature to transform data before adding to or querying For a complete list of available adapters, see [built-in adapters](concepts_adapters.md#built-in-adapters). -As an example, we'll create a collection with an adapter that chunks text into paragraphs and converts each chunk into an embedding vector using the `all-Mini-LM6-v2` model. +As an example, we'll create a collection with an adapter that chunks text into paragraphs and converts each chunk into an embedding vector using the `all-MiniLM-L6-v2` model. First, install `vecs` with optional dependencies for text embeddings: ```sh pip install "vecs[text_embedding]" ``` -Then create a collection with an adapter to chunk text into paragraphs and embed each paragraph using the `all-Mini-LM6-v2` 384 dimensional text embedding model. +Then create a collection with an adapter to chunk text into paragraphs and embed each paragraph using the `all-MiniLM-L6-v2` 384 dimensional text embedding model. ```python import vecs @@ -206,7 +206,7 @@ docs = vx.get_or_create_collection( adapter=Adapter( [ ParagraphChunker(skip_during_query=True), - TextEmbedding(model='all-Mini-LM6-v2'), + TextEmbedding(model='all-MiniLM-L6-v2'), ] ) ) diff --git a/docs/concepts_adapters.md b/docs/concepts_adapters.md index 902f1a3..81b71df 100644 --- a/docs/concepts_adapters.md +++ b/docs/concepts_adapters.md @@ -5,14 +5,14 @@ Adapters are an optional feature to transform data before adding to or querying Additionally, adapter transformations are applied lazily and can internally batch operations which can make them more memory and CPU efficient compared to manually executing transforms. ## Example: -As an example, we'll create a collection with an adapter that chunks text into paragraphs and converts each chunk into an embedding vector using the `all-Mini-LM6-v2` model. +As an example, we'll create a collection with an adapter that chunks text into paragraphs and converts each chunk into an embedding vector using the `all-MiniLM-L6-v2` model. First, install `vecs` with optional dependencies for text embeddings: ```sh pip install "vecs[text_embedding]" ``` -Then create a collection with an adapter to chunk text into paragraphs and embed each paragraph using the `all-Mini-LM6-v2` 384 dimensional text embedding model. +Then create a collection with an adapter to chunk text into paragraphs and embed each paragraph using the `all-MiniLM-L6-v2` 384 dimensional text embedding model. ```python import vecs @@ -27,7 +27,7 @@ docs = vx.get_or_create_collection( adapter=Adapter( [ ParagraphChunker(skip_during_query=True), - TextEmbedding(model='all-Mini-LM6-v2'), + TextEmbedding(model='all-MiniLM-L6-v2'), ] ) ) @@ -111,7 +111,7 @@ vx.get_or_create_collection( name="docs", adapter=Adapter( [ - TextEmbedding(model='all-Mini-LM6-v2') + TextEmbedding(model='all-MiniLM-L6-v2') ] ) ) diff --git a/docs/support_changelog.md b/docs/support_changelog.md index 29abf61..4c65d49 100644 --- a/docs/support_changelog.md +++ b/docs/support_changelog.md @@ -12,9 +12,10 @@ - Feature: Uses (indexed) containment operator `@>` for metadata equality filters where possible - Docs: Added docstrings to all methods, functions and modules -## master +## 0.3.0 - Feature: Collections can have `adapters` allowing upserting/querying by native media t types - Breaking Change: Renamed argument `Collection.upsert(vectors, ...)` to `Collection.upsert(records, ...)` in support of adapters - Breaking Change: Renamed argument `Collection.query(query_vector, ...)` to `Collection.query(data, ...)` in support of adapters -- Added + +## master From 43b73fada702bd7a08762c2ec6adf6f1763de05e Mon Sep 17 00:00:00 2001 From: Oliver Rice Date: Fri, 28 Jul 2023 08:44:35 -0500 Subject: [PATCH 2/2] copy changes to readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8eeb83a..31b5b83 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ docs = vx.create_collection(name="docs", dimension=3) # add records to the *docs* collection docs.upsert( - vectors=[ + records=[ ( "vec0", # the vector's identifier [0.1, 0.2, 0.3], # the vector. list or np.array @@ -76,7 +76,7 @@ docs.create_index() # query the collection filtering metadata for "year" = 2012 docs.query( - query_vector=[0.4,0.5,0.6], # required + data=[0.4,0.5,0.6], # required limit=1, # number of records to return filters={"year": {"$eq": 2012}}, # metadata filters )