mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-29 07:58:31 +02:00
40 lines
1001 B
Markdown
40 lines
1001 B
Markdown
---
|
|
title: Cohere
|
|
weight: 700
|
|
---
|
|
|
|
# Cohere
|
|
|
|
Qdrant is compatible with Cohere [co.embed API](https://docs.cohere.ai/reference/embed) and its official Python SDK that
|
|
might be installed as any other package:
|
|
|
|
```bash
|
|
pip install cohere
|
|
```
|
|
|
|
The embeddings returned by co.embed API might be used directly in the Qdrant client's calls:
|
|
|
|
```python
|
|
import cohere
|
|
import qdrant_client
|
|
|
|
from qdrant_client.http.models import Batch
|
|
|
|
cohere_client = cohere.Client("<< your_api_key >>")
|
|
qdrant_client = qdrant_client.QdrantClient()
|
|
qdrant_client.upsert(
|
|
collection_name="MyCollection",
|
|
points=Batch(
|
|
ids=[1],
|
|
vectors=cohere_client.embed(
|
|
model="large",
|
|
texts=["The best vector database"],
|
|
).embeddings,
|
|
)
|
|
)
|
|
```
|
|
|
|
If you are interested in seeing an end-to-end project created with co.embed API and Qdrant, please check out the
|
|
"[Question Answering as a Service with Cohere and Qdrant](https://qdrant.tech/articles/qa-with-cohere-and-qdrant/)" article.
|
|
|