Skip to content

Commit

Permalink
Added troubleshooting section to the docs page (#583)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew Malone <[email protected]>
Co-authored-by: Samuel Colvin <[email protected]>
Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Jan 2, 2025
1 parent 4537c07 commit b8648e8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
10 changes: 0 additions & 10 deletions docs/agents.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,6 @@ _(This example is complete, it can be run "as is")_

You can also pass messages from previous runs to continue a conversation or provide context, as described in [Messages and Chat History](message-history.md).

!!! note "jupyter notebooks"
If you're running `pydantic-ai` in a jupyter notebook, you might consider using [`nest-asyncio`](https://pypi.org/project/nest-asyncio/)
to manage conflicts between event loops that occur between jupyter's event loops and `pydantic-ai`'s.

Before you execute any agent runs, do the following:
```python {test="skip" lint="skip"}
import nest_asyncio

nest_asyncio.apply()
```

### Additional Configuration

Expand Down
16 changes: 16 additions & 0 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Troubleshooting

Common/known issues are shown below with associated solutions.

## Jupyter Notebooks

If you're running `pydantic-ai` in a jupyter notebook, you might consider using [`nest-asyncio`](https://pypi.org/project/nest-asyncio/)
to manage conflicts between event loops that occur between Jupyter's event loops and `pydantic-ai`'s.

Before you execute any agent runs, do the following:

```python {test="skip" lint="skip"}
import nest_asyncio

nest_asyncio.apply()
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ nav:
- install.md
- help.md
- contributing.md
- troubleshooting.md
- Documentation:
- agents.md
- models.md
Expand Down

0 comments on commit b8648e8

Please sign in to comment.