|
2 | 2 |
|
3 | 3 | ## Install |
4 | 4 |
|
5 | | -As Outlines is a library allowing you to run models from various different providers, it does not include the necessary dependencies for any provider by default. As a result, to use the [`OutlinesModel`][pydantic_ai.models.OutlinesModel], you must install `pydantic-ai-slim` with an optional group composed of outlines, a dash, and the name of the specific model provider you would use through Outlines. For instance: |
| 5 | +As Outlines is a library allowing you to run models from various different providers, it does not include the necessary dependencies for any provider by default. As a result, to use the [`OutlinesModel`][pydantic_ai.models.outlines.OutlinesModel], you must install `pydantic-ai-slim` with an optional group composed of outlines, a dash, and the name of the specific model provider you would use through Outlines. For instance: |
6 | 6 |
|
7 | 7 | ```bash |
8 | 8 | pip/uv-add "pydantic-ai-slim[outlines-transformers]" |
@@ -51,11 +51,11 @@ Alternatively, you can use some `OutlinesModel` class methods made to load a spe |
51 | 51 |
|
52 | 52 | There are methods for the 5 Outlines models that are officially supported in the integration into Pydantic AI: |
53 | 53 |
|
54 | | -- [`from_transformers`][pydantic_ai.models.OutlinesModel.from_transformers] |
55 | | -- [`from_llamacpp`][pydantic_ai.models.OutlinesModel.from_llamacpp] |
56 | | -- [`from_mlxlm`][pydantic_ai.models.OutlinesModel.from_mlxlm] |
57 | | -- [`from_sglang`][pydantic_ai.models.OutlinesModel.from_sglang] |
58 | | -- [`from_vllm_offline`][pydantic_ai.models.OutlinesModel.from_vllm_offline] |
| 54 | +- [`from_transformers`][pydantic_ai.models.outlines.OutlinesModel.from_transformers] |
| 55 | +- [`from_llamacpp`][pydantic_ai.models.outlines.OutlinesModel.from_llamacpp] |
| 56 | +- [`from_mlxlm`][pydantic_ai.models.outlines.OutlinesModel.from_mlxlm] |
| 57 | +- [`from_sglang`][pydantic_ai.models.outlines.OutlinesModel.from_sglang] |
| 58 | +- [`from_vllm_offline`][pydantic_ai.models.outlines.OutlinesModel.from_vllm_offline] |
59 | 59 |
|
60 | 60 | #### Transformers |
61 | 61 |
|
@@ -125,7 +125,7 @@ model = OutlinesModel.from_vllm_offline( |
125 | 125 |
|
126 | 126 | Once you have initialized an `OutlinesModel`, you can use it with an Agent as with all other Pydantic AI models. |
127 | 127 |
|
128 | | -As Outlines is focused on structured output, this provider supports the `output_type` component through the [`NativeOutput`][pydantic_ai.outputs.NativeOutput] format. There is not need to include information on the required output format in your prompt, instructions based on the `output_type` will be included automatically. |
| 128 | +As Outlines is focused on structured output, this provider supports the `output_type` component through the [`NativeOutput`][pydantic_ai.output.NativeOutput] format. There is not need to include information on the required output format in your prompt, instructions based on the `output_type` will be included automatically. |
129 | 129 |
|
130 | 130 | ```python {test="skip"} |
131 | 131 | from pydantic import BaseModel |
|
0 commit comments