> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# DSPy

The SDK integrates with [DSPy](https://dspy.ai/) using `litellm`, allowing you to use quantized local models with any DSPy module that relies on the `LM` interface.

Install the `dspy` package:

```sh theme={null}
conda install dspy
```

<Warning>
  Only `pip install` packages in your conda environment once all other packages and their dependencies have been installed. For more information on installing pip packages in your conda environment, see [Installing pip packages](/docs/getting-started/working-with-conda/packages/pip-install#using-pip-install-in-a-conda-environment).
</Warning>

Here is an example of how to use DSPy with Anaconda's models:

```py theme={null}
import dspy
import anaconda_ai.integrations.litellm

lm = dspy.LM('anaconda/openhermes-2.5-mistral-7b/q4_k_m')
dspy.configure(lm=lm)

chain = dspy.ChainOfThought("question -> answer")
chain(question="Who are you?")
```

To use an already running server, use `anaconda/server/<server-name>`:

```python theme={null}
lm = dspy.LM('anaconda/server/my-server')
```

For more information on using the `dspy` package, see the [official documentation](https://dspy.ai/).
