* fix(docs): change method name from encode to embed in DefaultEmbedding class

* fix(README.md): change method name from encode to embed in Embedding class
* fix(docs/Getting Started.ipynb): change method name from encode to embed in Embedding class
This commit is contained in:
NirantK
2023-08-23 09:49:48 +05:30
parent 3ff79e9dc7
commit 2017fdc22a
3 changed files with 4 additions and 4 deletions

View File

@@ -37,7 +37,7 @@ documents: List[str] = [
"fastembed is supported by and maintained by Qdrant."
]
embedding_model = Embedding(model_name="BAAI/bge-base-en", max_length=512)
embeddings: List[np.ndarray] = list(embedding_model.encode(documents))
embeddings: List[np.ndarray] = list(embedding_model.embed(documents))
```
## 🚒 Under the hood

View File

@@ -51,7 +51,7 @@
"]\n",
"# Initialize the DefaultEmbedding class with the desired parameters\n",
"embedding_model = Embedding(model_name=\"BAAI/bge-small-en\", max_length=512)\n",
"embeddings: List[np.ndarray] = list(embedding_model.encode(documents)) # notice that we are casting the generator to a list\n",
"embeddings: List[np.ndarray] = list(embedding_model.embed(documents)) # notice that we are casting the generator to a list\n",
"\n",
"print(embeddings[0].shape)"
]
@@ -165,7 +165,7 @@
"metadata": {},
"outputs": [],
"source": [
"embeddings: List[np.ndarray] = list(embedding_model.encode(documents)) # notice that we are casting the generator to a list"
"embeddings: List[np.ndarray] = list(embedding_model.embed(documents)) # notice that we are casting the generator to a list"
]
},
{

View File

@@ -23,7 +23,7 @@ documents: List[str] = [
"fastembed is supported by and maintained by Qdrant."
]
embedding_model = DefaultEmbedding()
embeddings: List[np.ndarray] = list(embedding_model.encode(documents))
embeddings: List[np.ndarray] = list(embedding_model.embed(documents))
```
## 🚒 Under the hood