Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added troubleshooting section to the docs page #583

Merged
merged 3 commits into from
Jan 2, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
samuelcolvin marked this conversation as resolved.
Show resolved Hide resolved

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
Loading