Skip to content

Commit 0835073

Browse files
authored
Merge branch 'main' into main
2 parents 63d1b84 + 9c31521 commit 0835073

Some content is hidden

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

82 files changed

+8565
-1452
lines changed

.github/workflows/after-ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ jobs:
4545
name: deploy-docs-preview
4646

4747
steps:
48+
- run: echo "$GITHUB_EVENT_JSON"
49+
env:
50+
GITHUB_EVENT_JSON: ${{ toJSON(github.event) }}
51+
4852
- uses: actions/checkout@v4
4953

5054
- uses: actions/setup-node@v4
@@ -57,17 +61,20 @@ jobs:
5761
enable-cache: true
5862
cache-suffix: deploy-docs-preview
5963

60-
- uses: dawidd6/action-download-artifact@v6
64+
- id: download-artifact
65+
uses: dawidd6/action-download-artifact@v6
6166
with:
6267
workflow: ci.yml
6368
name: site
6469
path: site
6570
commit: ${{ github.event.workflow_run.head_sha }}
6671
allow_forks: true
6772
workflow_conclusion: completed
73+
if_no_artifact_found: warn
6874

6975
- uses: cloudflare/wrangler-action@v3
7076
id: deploy
77+
if: steps.download-artifact.outputs.found_artifact == 'true'
7178
with:
7279
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
7380
environment: previews
@@ -77,12 +84,9 @@ jobs:
7784
--var GIT_COMMIT_SHA:${{ github.event.workflow_run.head_sha }}
7885
--var GIT_BRANCH:${{ github.event.workflow_run.head_branch }}
7986
80-
- run: echo "$GITHUB_EVENT_JSON"
81-
env:
82-
GITHUB_EVENT_JSON: ${{ toJSON(github.event) }}
83-
8487
- name: Set preview URL
8588
run: uv run --no-project --with httpx .github/set_docs_pr_preview_url.py
89+
if: steps.deploy.outcome == 'success'
8690
env:
8791
DEPLOY_OUTPUT: ${{ steps.deploy.outputs.command-output }}
8892
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/ci.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ jobs:
142142
test:
143143
name: test on ${{ matrix.python-version }} (${{ matrix.install.name }})
144144
runs-on: ubuntu-latest
145-
timeout-minutes: 15
145+
timeout-minutes: 20
146146
strategy:
147147
fail-fast: false
148148
matrix:
@@ -198,7 +198,7 @@ jobs:
198198
test-lowest-versions:
199199
name: test on ${{ matrix.python-version }} (lowest-versions)
200200
runs-on: ubuntu-latest
201-
timeout-minutes: 15
201+
timeout-minutes: 20
202202
strategy:
203203
fail-fast: false
204204
matrix:
@@ -263,7 +263,7 @@ jobs:
263263
with:
264264
python-version: ${{ matrix.python-version }}
265265
enable-cache: true
266-
cache-suffix: all-extras
266+
cache-suffix: examples
267267

268268
- name: cache HuggingFace models
269269
uses: actions/cache@v4
@@ -473,7 +473,12 @@ jobs:
473473
import os
474474
import tweepy
475475
476-
client = tweepy.Client(os.getenv("TWITTER_ACCESS_TOKEN"))
476+
client = tweepy.Client(
477+
access_token=os.getenv("TWITTER_ACCESS_TOKEN"),
478+
access_token_secret=os.getenv("TWITTER_ACCESS_TOKEN_SECRET"),
479+
consumer_key=os.getenv("TWITTER_CONSUMER_KEY"),
480+
consumer_secret=os.getenv("TWITTER_CONSUMER_SECRET"),
481+
)
477482
version = os.getenv("VERSION").strip('"')
478483
tweet = os.getenv("TWEET").format(version=version)
479484
client.create_tweet(text=tweet)
@@ -483,4 +488,7 @@ jobs:
483488
Pydantic AI version {version} is out! 🎉
484489
485490
https://github.com/pydantic/pydantic-ai/releases/tag/v{version}
491+
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
492+
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
486493
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
494+
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env*/
1010
/TODO.md
1111
/postgres-data/
1212
.DS_Store
13-
examples/pydantic_ai_examples/.chat_app_messages.sqlite
13+
.chat_app_messages.sqlite
1414
.cache/
1515
.vscode/
1616
/question_graph_history.json

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ Designed to give your IDE or AI coding agent as much context as possible for aut
5050
5. **Powerful Evals**:
5151
Enables you to systematically test and [evaluate](https://ai.pydantic.dev/evals) the performance and accuracy of the agentic systems you build, and monitor the performance over time in Pydantic Logfire.
5252

53-
6. **MCP, A2A, and AG-UI**:
54-
Integrates the [Model Context Protocol](https://ai.pydantic.dev/mcp/client), [Agent2Agent](https://ai.pydantic.dev/a2a), and [AG-UI](https://ai.pydantic.dev/ag-ui) standards to give your agent access to external tools and data, let it interoperate with other agents, and build interactive applications with streaming event-based communication.
53+
6. **MCP, A2A, and UI**:
54+
Integrates the [Model Context Protocol](https://ai.pydantic.dev/mcp/overview), [Agent2Agent](https://ai.pydantic.dev/a2a), and various [UI event stream](https://ai.pydantic.dev/ui/overview) standards to give your agent access to external tools and data, let it interoperate with other agents, and build interactive applications with streaming event-based communication.
5555

5656
7. **Human-in-the-Loop Tool Approval**:
5757
Easily lets you flag that certain tool calls [require approval](https://ai.pydantic.dev/deferred-tools#human-in-the-loop-tool-approval) before they can proceed, possibly depending on tool call arguments, conversation history, or user preferences.

docs-site/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const redirect_lookup: Record<string, string> = {
5555
'/examples': 'examples/setup/',
5656
'/mcp': '/mcp/overview/',
5757
'/models': '/models/overview/',
58+
'/ag-ui': '/ui/ag-ui/'
5859
}
5960

6061
function redirect(pathname: string): string | null {

docs-site/wrangler.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ compatibility_date = "2025-06-17"
44
routes = ["ai.pydantic.dev/*"]
55
main = "src/index.ts"
66
workers_dev = false
7+
preview_urls = true
78
compatibility_flags = [ "nodejs_compat_v2" ]
89

910
[vars]

docs/agents.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ async def main():
103103
FinalResultEvent(tool_name=None, tool_call_id=None),
104104
PartDeltaEvent(index=0, delta=TextPartDelta(content_delta='Mexico is Mexico ')),
105105
PartDeltaEvent(index=0, delta=TextPartDelta(content_delta='City.')),
106+
PartEndEvent(
107+
index=0, part=TextPart(content='The capital of Mexico is Mexico City.')
108+
),
106109
AgentRunResultEvent(
107110
result=AgentRunResult(output='The capital of Mexico is Mexico City.')
108111
),

docs/api/ui/ag_ui.md

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

docs/api/ui/base.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `pydantic_ai.ui`
2+
3+
::: pydantic_ai.ui

docs/api/ui/vercel_ai.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# `pydantic_ai.ui.vercel_ai`
2+
3+
::: pydantic_ai.ui.vercel_ai
4+
5+
::: pydantic_ai.ui.vercel_ai.request_types
6+
7+
::: pydantic_ai.ui.vercel_ai.response_types

0 commit comments

Comments
 (0)