mirror of
https://github.com/qdrant/landing_page.git
synced 2026-10-04 10:28:29 +02:00
docs: Use local inference modern-sparse-neural-retrieval.md (#1600)
* docs: Update to use local inference Signed-off-by: Anush008 <anushshetty90@gmail.com> * chore: Review updates Signed-off-by: Anush008 <anushshetty90@gmail.com> * chore: Formatting Signed-off-by: Anush008 <anushshetty90@gmail.com> --------- Signed-off-by: Anush008 <anushshetty90@gmail.com>
This commit is contained in:
@@ -156,7 +156,7 @@ LangGraph works with a state-based system. We define our state like this:
|
||||
|
||||
```python
|
||||
class State(TypedDict):
|
||||
messages: Annotated[list, add_messages]
|
||||
messages: Annotated[list, add_messages]
|
||||
```
|
||||
---
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ We are going to need a couple of Python packages to run our application. They mi
|
||||
`dspy-ai` package and `qdrant` extra:
|
||||
|
||||
```shell
|
||||
pip install dspy-ai[qdrant]
|
||||
pip install dspy-ai dspy-qdrant
|
||||
```
|
||||
|
||||
### Qdrant Hybrid Cloud
|
||||
@@ -181,7 +181,7 @@ gemma_model = dspy.OllamaLocal(
|
||||
Similarly, we have to define connection to our Qdrant Hybrid Cloud cluster:
|
||||
|
||||
```python
|
||||
from dspy.retrieve.qdrant_rm import QdrantRM
|
||||
from dspy_qdrant import QdrantRM
|
||||
from qdrant_client import QdrantClient, models
|
||||
|
||||
client = QdrantClient(
|
||||
|
||||
@@ -17,7 +17,7 @@ Qdrant can be used as a retrieval mechanism in the DSPy flow.
|
||||
|
||||
For the Qdrant retrieval integration, include `dspy-ai` with the `qdrant` extra:
|
||||
```bash
|
||||
pip install dspy-ai[qdrant]
|
||||
pip install dspy-ai dspy-qdrant
|
||||
```
|
||||
|
||||
## Usage
|
||||
@@ -25,7 +25,7 @@ pip install dspy-ai[qdrant]
|
||||
We can configure `DSPy` settings to use the Qdrant retriever model like so:
|
||||
```python
|
||||
import dspy
|
||||
from dspy.retrieve.qdrant_rm import QdrantRM
|
||||
from dspy_qdrant import QdrantRM
|
||||
|
||||
from qdrant_client import QdrantClient
|
||||
|
||||
|
||||
Reference in New Issue
Block a user