Skip to content

Commit

Permalink
tweak examples readme
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelcolvin committed Oct 22, 2024
1 parent dbc2e90 commit 51373c4
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Examples of how to use Pydantic AI and what it can do.
To run the examples, run:

```bash
uv run -m examples.<example_name>
uv run -m examples.<example_module_name>
```

## Examples

### `pydantic_model`
### `pydantic_model.py`

Simple example of using Pydantic AI to construct a Pydantic model from a text input.

Expand All @@ -27,15 +27,9 @@ with Gemini using:
PYDANTIC_AI_MODEL=gemini-1.5-pro uv run -m examples.pydantic_model
```

or
(or `PYDANTIC_AI_MODEL=gemini-1.5-flash...`)

```bash
PYDANTIC_AI_MODEL=gemini-1.5-flash uv run -m examples.pydantic_model
```

```bash

### `sql_gen`
### `sql_gen.py`

Example demonstrating how to use Pydantic AI to generate SQL queries based on user input.

Expand All @@ -45,7 +39,7 @@ uv run -m examples.sql_gen

This model uses `gemini-1.5-flash` by default since Gemini is good at single shot queries.

### `weather`
### `weather.py`

Example of Pydantic AI with multiple tools which the LLM needs to call in turn to answer a question.

Expand Down

0 comments on commit 51373c4

Please sign in to comment.