mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-30 16:38:31 +02:00
add embeddings
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
|
||||
---
|
||||
title: Together AI
|
||||
weight: 3000
|
||||
aliases:
|
||||
- /documentation/examples/together-ai-search/
|
||||
- /documentation/tutorials/together-ai-search/
|
||||
- /documentation/integrations/together-ai/
|
||||
---
|
||||
|
||||
# Using Together AI with Qdrant
|
||||
|
||||
Together AI focuses on collaborative AI embeddings that enhance multi-user search scenarios when integrated with Qdrant.
|
||||
|
||||
## Installation
|
||||
|
||||
You can install the required package using the following pip command:
|
||||
|
||||
```bash
|
||||
pip install togetherai
|
||||
```
|
||||
## Integration Example
|
||||
|
||||
```python
|
||||
import qdrant_client
|
||||
from qdrant_client.models import Batch
|
||||
from togetherai import TogetherAI
|
||||
|
||||
# Initialize Together AI model
|
||||
model = TogetherAI("togetherai-collab")
|
||||
|
||||
# Generate embeddings for collaborative content
|
||||
text = "Together AI enhances collaborative content search."
|
||||
embeddings = model.embed(text)
|
||||
|
||||
# Initialize Qdrant client
|
||||
qdrant_client = qdrant_client.QdrantClient(host="localhost", port=6333)
|
||||
|
||||
# Upsert the embedding into Qdrant
|
||||
qdrant_client.upsert(
|
||||
collection_name="CollaborativeContent",
|
||||
points=Batch(
|
||||
ids=[1],
|
||||
vectors=[embeddings],
|
||||
)
|
||||
)
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user