mirror of
https://github.com/qdrant/landing_page.git
synced 2026-09-28 07:28:30 +02:00
Merge pull request #243 from qdrant/integration/llama-index-fix
Use QdrantVectorStore instead of GPTQdrantIndex that was removed from LI
This commit is contained in:
@@ -8,16 +8,17 @@ weight: 200
|
||||
LlamaIndex (formerly GPT Index) acts as an interface between your external data and Large Language Models. So you can bring your
|
||||
private data and augment LLMs with it. LlamaIndex simplifies data ingestion and indexing, integrating Qdrant as a vector index.
|
||||
|
||||
Installing LlamaIndex is straightforward if we use pip as a package manager:
|
||||
Installing LlamaIndex is straightforward if we use pip as a package manager. Qdrant is not installed by default, so we need to
|
||||
install it separately:
|
||||
|
||||
```bash
|
||||
pip install llama-index
|
||||
pip install llama-index qdrant-client
|
||||
```
|
||||
|
||||
LlamaIndex requires providing an instance of `QdrantClient`, so it can interact with Qdrant server.
|
||||
|
||||
```python
|
||||
from llama_index import GPTQdrantIndex
|
||||
from llama_index.vector_stores.qdrant import QdrantVectorStore
|
||||
|
||||
import qdrant_client
|
||||
|
||||
@@ -26,7 +27,7 @@ client = qdrant_client.QdrantClient(
|
||||
api_key="<qdrant-api-key>", # For Qdrant Cloud, None for local instance
|
||||
)
|
||||
|
||||
index = GPTQdrantIndex.from_documents(documents, client=client, collection_name="documents")
|
||||
index = QdrantVectorStore(client=client, collection_name="documents")
|
||||
```
|
||||
|
||||
The library [comes with a notebook](https://github.com/jerryjliu/llama_index/blob/main/docs/examples/vector_stores/QdrantIndexDemo.ipynb)
|
||||
|
||||
Reference in New Issue
Block a user