mirror of
https://github.com/qdrant/fastembed.git
synced 2026-07-23 11:20:51 -05:00
* 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:
@@ -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
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user