mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-28 07:28:30 +02:00
Fix upload_records deprecation for upload_points (#622)
* Fix upload_records deprecation for upload_points * Change models.Record for models.PointStruct * Added warning for qdrant-client version 1.7.1 or higher requirement * Better styling without bullet point
This commit is contained in:
@@ -33,9 +33,13 @@ pip install -U sentence-transformers
|
||||
Once encoded, this data needs to be kept somewhere. Qdrant lets you store data as embeddings. You can also use Qdrant to run search queries against this data. This means that you can ask the engine to give you relevant answers that go way beyond keyword matching.
|
||||
|
||||
```bash
|
||||
pip install qdrant-client
|
||||
pip install -U qdrant-client
|
||||
```
|
||||
|
||||
<aside role="status">
|
||||
This tutorial requires qdrant-client version 1.7.1 or higher.
|
||||
</aside>
|
||||
|
||||
### Import the models
|
||||
|
||||
Once the two main frameworks are defined, you need to specify the exact models this engine will use. Before you do, activate the Python prompt (`>>>`) with the `python` command.
|
||||
@@ -172,10 +176,10 @@ qdrant.recreate_collection(
|
||||
Tell the database to upload `documents` to the `my_books` collection. This will give each record an id and a payload. The payload is just the metadata from the dataset.
|
||||
|
||||
```python
|
||||
qdrant.upload_records(
|
||||
qdrant.upload_points(
|
||||
collection_name="my_books",
|
||||
records=[
|
||||
models.Record(
|
||||
points=[
|
||||
models.PointStruct(
|
||||
id=idx, vector=encoder.encode(doc["description"]).tolist(), payload=doc
|
||||
)
|
||||
for idx, doc in enumerate(documents)
|
||||
|
||||
Reference in New Issue
Block a user