pydantic-ai-examples 1.8.0__py3-none-any.whl → 1.9.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pydantic-ai-examples might be problematic. Click here for more details.

@@ -6,9 +6,9 @@ from datetime import datetime
6
6
  from zoneinfo import ZoneInfo
7
7
 
8
8
  from pydantic_ai import Agent
9
+ from pydantic_ai.ui.ag_ui.app import AGUIApp
9
10
 
10
11
  agent = Agent('openai:gpt-5-mini')
11
- app = agent.to_ag_ui()
12
12
 
13
13
 
14
14
  @agent.tool_plain
@@ -23,3 +23,6 @@ async def current_time(timezone: str = 'UTC') -> str:
23
23
  """
24
24
  tz: ZoneInfo = ZoneInfo(timezone)
25
25
  return datetime.now(tz=tz).isoformat()
26
+
27
+
28
+ app = AGUIApp(agent)
@@ -9,6 +9,7 @@ from pydantic import BaseModel, Field
9
9
 
10
10
  from ag_ui.core import EventType, StateDeltaEvent, StateSnapshotEvent
11
11
  from pydantic_ai import Agent
12
+ from pydantic_ai.ui.ag_ui.app import AGUIApp
12
13
 
13
14
  StepStatus = Literal['pending', 'completed']
14
15
 
@@ -116,4 +117,4 @@ async def update_plan_step(
116
117
  )
117
118
 
118
119
 
119
- app = agent.to_ag_ui()
120
+ app = AGUIApp(agent)
@@ -8,6 +8,7 @@ from __future__ import annotations
8
8
  from textwrap import dedent
9
9
 
10
10
  from pydantic_ai import Agent
11
+ from pydantic_ai.ui.ag_ui.app import AGUIApp
11
12
 
12
13
  agent = Agent(
13
14
  'openai:gpt-5-mini',
@@ -23,4 +24,4 @@ agent = Agent(
23
24
  ),
24
25
  )
25
26
 
26
- app = agent.to_ag_ui()
27
+ app = AGUIApp(agent)
@@ -8,7 +8,8 @@ from pydantic import BaseModel
8
8
 
9
9
  from ag_ui.core import CustomEvent, EventType
10
10
  from pydantic_ai import Agent, RunContext
11
- from pydantic_ai.ag_ui import StateDeps
11
+ from pydantic_ai.ui import StateDeps
12
+ from pydantic_ai.ui.ag_ui.app import AGUIApp
12
13
 
13
14
 
14
15
  class DocumentState(BaseModel):
@@ -74,4 +75,4 @@ async def story_instructions(ctx: RunContext[StateDeps[DocumentState]]) -> str:
74
75
  )
75
76
 
76
77
 
77
- app = agent.to_ag_ui(deps=StateDeps(DocumentState()))
78
+ app = AGUIApp(agent, deps=StateDeps(DocumentState()))
@@ -9,7 +9,8 @@ from pydantic import BaseModel, Field
9
9
 
10
10
  from ag_ui.core import EventType, StateSnapshotEvent
11
11
  from pydantic_ai import Agent, RunContext
12
- from pydantic_ai.ag_ui import StateDeps
12
+ from pydantic_ai.ui import StateDeps
13
+ from pydantic_ai.ui.ag_ui.app import AGUIApp
13
14
 
14
15
 
15
16
  class SkillLevel(str, Enum):
@@ -135,4 +136,4 @@ async def recipe_instructions(ctx: RunContext[StateDeps[RecipeSnapshot]]) -> str
135
136
  )
136
137
 
137
138
 
138
- app = agent.to_ag_ui(deps=StateDeps(RecipeSnapshot()))
139
+ app = AGUIApp(agent, deps=StateDeps(RecipeSnapshot()))
@@ -6,6 +6,7 @@ No special handling is required for this feature.
6
6
  from __future__ import annotations
7
7
 
8
8
  from pydantic_ai import Agent
9
+ from pydantic_ai.ui.ag_ui.app import AGUIApp
9
10
 
10
11
  agent = Agent('openai:gpt-5-mini')
11
- app = agent.to_ag_ui()
12
+ app = AGUIApp(agent)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-ai-examples
3
- Version: 1.8.0
3
+ Version: 1.9.1
4
4
  Summary: Examples of how to use Pydantic AI and what it can do.
5
5
  Author-email: Samuel Colvin <samuel@pydantic.dev>, Marcelo Trylesinski <marcelotryle@gmail.com>, David Montague <david@pydantic.dev>, Alex Hall <alex@pydantic.dev>, Douwe Maan <douwe@pydantic.dev>
6
6
  License-Expression: MIT
@@ -34,8 +34,8 @@ Requires-Dist: logfire[asyncpg,fastapi,httpx,sqlite3]>=3.14.1
34
34
  Requires-Dist: mcp[cli]>=1.4.1
35
35
  Requires-Dist: modal>=1.0.4
36
36
  Requires-Dist: pandas>=2.2.3
37
- Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==1.8.0
38
- Requires-Dist: pydantic-evals==1.8.0
37
+ Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==1.9.1
38
+ Requires-Dist: pydantic-evals==1.9.1
39
39
  Requires-Dist: python-multipart>=0.0.17
40
40
  Requires-Dist: rich>=13.9.2
41
41
  Requires-Dist: uvicorn>=0.32.0
@@ -18,12 +18,12 @@ pydantic_ai_examples/weather_agent_gradio.py,sha256=MCoNp5TgWj628ABoZpTUVJYIeSV_
18
18
  pydantic_ai_examples/ag_ui/__init__.py,sha256=ZZs2V-5e9RaLl_7hJAq9-0Juk_f0mk2Vr7a4QT2QB-k,1174
19
19
  pydantic_ai_examples/ag_ui/__main__.py,sha256=PMycatJt8Abb-Q8HXRGZoEY6vnOcvRebH7iI9MxLknA,225
20
20
  pydantic_ai_examples/ag_ui/api/__init__.py,sha256=Pe307_ET_ERKBP-8Vs4L1yZRkK3ILPpajwxDpeW8YiI,673
21
- pydantic_ai_examples/ag_ui/api/agentic_chat.py,sha256=PsKHQpL-sx2cgMKg9uW1qQlRAQpPOK6EAES7VBevJXQ,532
22
- pydantic_ai_examples/ag_ui/api/agentic_generative_ui.py,sha256=dbP6MIw2GBdkgBqfAxXklFpHwxBH8trp7HR7He6QnMQ,3488
23
- pydantic_ai_examples/ag_ui/api/human_in_the_loop.py,sha256=MmfUwxp9EEELzS2ikx-Y1uY3LUmr8M7k2M7Fre7tma8,764
24
- pydantic_ai_examples/ag_ui/api/predictive_state_updates.py,sha256=oAvnz6LQLCEuEhMqWVmEDuVuHJOoLObdzGmppJFHLSc,2123
25
- pydantic_ai_examples/ag_ui/api/shared_state.py,sha256=J09k2Ry83K3aCwbsEq9j3k8e7EJiD6fJRjzjaYOt8IE,3801
26
- pydantic_ai_examples/ag_ui/api/tool_based_generative_ui.py,sha256=zSUcn31wDksEStPofSuvjF0Arc0TglpvCzm_-bVG-PM,218
21
+ pydantic_ai_examples/ag_ui/api/agentic_chat.py,sha256=QGb7q4AMq5PD1-D-S-71GsMs3wAhH2niUeRryhjL12s,577
22
+ pydantic_ai_examples/ag_ui/api/agentic_generative_ui.py,sha256=RnkSjb8C_J9kXPuB7nFI1knkPF30OkOoSRXoAX2h2Ck,3531
23
+ pydantic_ai_examples/ag_ui/api/human_in_the_loop.py,sha256=Jb_0Sryb4mUOZmr1k9MVTciGUAcC8-tzuyNCaCTWZhc,807
24
+ pydantic_ai_examples/ag_ui/api/predictive_state_updates.py,sha256=PO3SZPCzmWowpEPnqez-oLlMRsPD3MnJArpdwDYThO4,2165
25
+ pydantic_ai_examples/ag_ui/api/shared_state.py,sha256=dr7vCTuZN2tyUrdroD25r69YBPjQFeAPaOt_NbenHyE,3843
26
+ pydantic_ai_examples/ag_ui/api/tool_based_generative_ui.py,sha256=rW0Inzd9_yDqdTE6HmnnF7M-LsR_l4woiwlGbJBHLSM,261
27
27
  pydantic_ai_examples/evals/__init__.py,sha256=4f1v2o4F-gnUVtlkZU-dpwwwbLhqRxMcZv676atjNLg,115
28
28
  pydantic_ai_examples/evals/agent.py,sha256=o_l6I4DF3HXh7fgsmyz7mViq1ckdFV1Hxq_B7KJPLa0,2041
29
29
  pydantic_ai_examples/evals/custom_evaluators.py,sha256=siSpALUMrUGJ1DDrm0Ejniuxhmxhlvee_jubgXjOAeU,2244
@@ -44,7 +44,7 @@ pydantic_ai_examples/slack_lead_qualifier/modal.py,sha256=f464AaeyP-n3UIfvEVVc4D
44
44
  pydantic_ai_examples/slack_lead_qualifier/models.py,sha256=WTp6D2WCASXqrjPVT3vGgTSYATLPBM3_cjq9wvXMRao,1586
45
45
  pydantic_ai_examples/slack_lead_qualifier/slack.py,sha256=VJVfMeUXYClWUJBLHNuaW8PB2sxjNzpTC-O_AJwcxQ4,833
46
46
  pydantic_ai_examples/slack_lead_qualifier/store.py,sha256=04vB4eZWKk_Tx0b9K4QuVI1U24JEyJyBS4X76cui7OI,896
47
- pydantic_ai_examples-1.8.0.dist-info/METADATA,sha256=5MmWc0mCoCTmRE7W_Z0IGdsUyejVlX4TI6wMh2jcXX0,2760
48
- pydantic_ai_examples-1.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
- pydantic_ai_examples-1.8.0.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
50
- pydantic_ai_examples-1.8.0.dist-info/RECORD,,
47
+ pydantic_ai_examples-1.9.1.dist-info/METADATA,sha256=HTe0GLNQqAvRYTPE2KX0sbPm8ixuIK4XEyvMb3yzjZ4,2760
48
+ pydantic_ai_examples-1.9.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
+ pydantic_ai_examples-1.9.1.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
50
+ pydantic_ai_examples-1.9.1.dist-info/RECORD,,