Skip to content

Commit 5d05916

Browse files
Merge branch 'main' into update-versins
2 parents 5d3112f + 420166d commit 5d05916

File tree

103 files changed

+9221
-1368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+9221
-1368
lines changed

clai/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ positional arguments:
6868
options:
6969
-h, --help show this help message and exit
7070
-m [MODEL], --model [MODEL]
71-
Model to use, in format "<provider>:<model>" e.g. "openai:gpt-4o" or "anthropic:claude-3-7-sonnet-latest". Defaults to "openai:gpt-4o".
71+
Model to use, in format "<provider>:<model>" e.g. "openai:gpt-4.1" or "anthropic:claude-sonnet-4-0". Defaults to "openai:gpt-4.1".
7272
-a AGENT, --agent AGENT
7373
Custom Agent to use, in format "module:variable", e.g. "mymodule.submodule:my_agent"
7474
-l, --list-models List all available models and exit

clai/pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ name = "clai"
1515
dynamic = ["version", "dependencies"]
1616
description = "PydanticAI CLI: command line interface to chat to LLMs"
1717
authors = [
18-
{ name = "Samuel Colvin", email = "[email protected]" },
19-
{ name = "Marcelo Trylesinski", email = "[email protected]" },
20-
{ name = "David Montague", email = "[email protected]" },
21-
{ name = "Alex Hall", email = "[email protected]" },
18+
{ name = "Samuel Colvin", email = "[email protected]" },
19+
{ name = "Marcelo Trylesinski", email = "[email protected]" },
20+
{ name = "David Montague", email = "[email protected]" },
21+
{ name = "Alex Hall", email = "[email protected]" },
22+
{ name = "Douwe Maan", email = "[email protected]" },
2223
]
2324
license = "MIT"
2425
readme = "README.md"

docs/agents.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ with capture_run_messages() as messages: # (2)!
826826
result = agent.run_sync('Please get me the volume of a box with size 6.')
827827
except UnexpectedModelBehavior as e:
828828
print('An error occurred:', e)
829-
#> An error occurred: Tool exceeded max retries count of 1
829+
#> An error occurred: Tool 'calc_volume' exceeded max retries count of 1
830830
print('cause:', repr(e.__cause__))
831831
#> cause: ModelRetry('Please try again.')
832832
print('messages:', messages)

docs/api/ext.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# `pydantic_ai.ext`
2+
3+
::: pydantic_ai.ext.langchain
4+
5+
::: pydantic_ai.ext.aci

docs/api/models/huggingface.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `pydantic_ai.models.huggingface`
2+
3+
## Setup
4+
5+
For details on how to set up authentication with this model, see [model configuration for Hugging Face](../../models/huggingface.md).
6+
7+
::: pydantic_ai.models.huggingface

docs/api/output.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
- PromptedOutput
1111
- TextOutput
1212
- StructuredDict
13+
- DeferredToolCalls

docs/api/providers.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,5 @@
3131
::: pydantic_ai.providers.github.GitHubProvider
3232

3333
::: pydantic_ai.providers.openrouter.OpenRouterProvider
34+
35+
::: pydantic_ai.providers.huggingface.HuggingFaceProvider

docs/api/toolsets.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# `pydantic_ai.toolsets`
2+
3+
::: pydantic_ai.toolsets
4+
options:
5+
members:
6+
- AbstractToolset
7+
- CombinedToolset
8+
- DeferredToolset
9+
- FilteredToolset
10+
- FunctionToolset
11+
- PrefixedToolset
12+
- RenamedToolset
13+
- PreparedToolset
14+
- WrapperToolset

docs/cli.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ uvx clai --help
6060
You can specify which model to use with the `--model` flag:
6161

6262
```bash
63-
uvx clai --model anthropic:claude-3-7-sonnet-latest
63+
uvx clai --model anthropic:claude-sonnet-4-0
6464
```
6565

6666
(a full list of models available can be printed with `uvx clai --list-models`)
@@ -72,7 +72,7 @@ You can specify a custom agent using the `--agent` flag with a module path and v
7272
```python {title="custom_agent.py" test="skip"}
7373
from pydantic_ai import Agent
7474

75-
agent = Agent('openai:gpt-4o', instructions='You always respond in Italian.')
75+
agent = Agent('openai:gpt-4.1', instructions='You always respond in Italian.')
7676
```
7777

7878
Then run:
@@ -92,7 +92,7 @@ Additionally, you can directly launch CLI mode from an `Agent` instance using `A
9292
```python {title="agent_to_cli_sync.py" test="skip" hl_lines=4}
9393
from pydantic_ai import Agent
9494

95-
agent = Agent('openai:gpt-4o', instructions='You always respond in Italian.')
95+
agent = Agent('openai:gpt-4.1', instructions='You always respond in Italian.')
9696
agent.to_cli_sync()
9797
```
9898

@@ -101,7 +101,7 @@ You can also use the async interface with `Agent.to_cli()`:
101101
```python {title="agent_to_cli.py" test="skip" hl_lines=6}
102102
from pydantic_ai import Agent
103103

104-
agent = Agent('openai:gpt-4o', instructions='You always respond in Italian.')
104+
agent = Agent('openai:gpt-4.1', instructions='You always respond in Italian.')
105105

106106
async def main():
107107
await agent.to_cli()

docs/common-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PydanticAI ships with native tools that can be used to enhance your agent's capa
55
## DuckDuckGo Search Tool
66

77
The DuckDuckGo search tool allows you to search the web for information. It is built on top of the
8-
[DuckDuckGo API](https://github.com/deedy5/duckduckgo_search).
8+
[DuckDuckGo API](https://github.com/deedy5/ddgs).
99

1010
### Installation
1111

0 commit comments

Comments
 (0)