mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-26 14:38:30 +02:00
Change deprecated embedding_function to embeddings
This commit is contained in:
@@ -37,6 +37,10 @@ If you prefer reusing an existing collection, you can create an instance of Qdra
|
||||
```
|
||||
import qdrant_client
|
||||
|
||||
embeddings = HuggingFaceEmbeddings(
|
||||
model_name="sentence-transformers/all-mpnet-base-v2"
|
||||
)
|
||||
|
||||
client = qdrant_client.QdrantClient(
|
||||
"<qdrant-url>",
|
||||
api_key="<qdrant-api-key>", # For Qdrant Cloud, None for local instance
|
||||
@@ -44,7 +48,7 @@ client = qdrant_client.QdrantClient(
|
||||
|
||||
doc_store = Qdrant(
|
||||
client=client, collection_name="texts",
|
||||
embedding_function=embeddings.embed_query,
|
||||
embeddings=embeddings,
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user