mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-09 12:58:31 +02:00
Add Python snippets
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
```python
|
||||
client.create_vector_name(
|
||||
collection_name="{collection_name}",
|
||||
vector_name="{vector_name}",
|
||||
vector_name_config=models.DenseVectorNameConfig(
|
||||
dense=models.DenseVectorConfig(
|
||||
size=256,
|
||||
distance=models.Distance.COSINE,
|
||||
),
|
||||
),
|
||||
)
|
||||
```
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
from qdrant_client import QdrantClient, models # @hide
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333") # @hide
|
||||
|
||||
client.create_vector_name(
|
||||
collection_name="{collection_name}",
|
||||
vector_name="{vector_name}",
|
||||
vector_name_config=models.DenseVectorNameConfig(
|
||||
dense=models.DenseVectorConfig(
|
||||
size=256,
|
||||
distance=models.Distance.COSINE,
|
||||
),
|
||||
),
|
||||
)
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
```python
|
||||
client.create_vector_name(
|
||||
collection_name="{collection_name}",
|
||||
vector_name="{vector_name}",
|
||||
vector_name_config=models.SparseVectorNameConfig(
|
||||
sparse=models.SparseVectorConfig(
|
||||
modifier=models.Modifier.IDF,
|
||||
),
|
||||
),
|
||||
)
|
||||
```
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
from qdrant_client import QdrantClient, models # @hide
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333") # @hide
|
||||
|
||||
client.create_vector_name(
|
||||
collection_name="{collection_name}",
|
||||
vector_name="{vector_name}",
|
||||
vector_name_config=models.SparseVectorNameConfig(
|
||||
sparse=models.SparseVectorConfig(
|
||||
modifier=models.Modifier.IDF,
|
||||
),
|
||||
),
|
||||
)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
```python
|
||||
client.delete_vector_name(
|
||||
collection_name="{collection_name}",
|
||||
vector_name="{vector_name}",
|
||||
)
|
||||
```
|
||||
@@ -0,0 +1,8 @@
|
||||
from qdrant_client import QdrantClient # @hide
|
||||
|
||||
client = QdrantClient(url="http://localhost:6333") # @hide
|
||||
|
||||
client.delete_vector_name(
|
||||
collection_name="{collection_name}",
|
||||
vector_name="{vector_name}",
|
||||
)
|
||||
Reference in New Issue
Block a user