pydantic-ai-examples 0.7.2__tar.gz → 0.7.3__tar.gz
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.
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/PKG-INFO +3 -3
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/flight_booking.py +3 -3
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/.gitignore +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/LICENSE +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/README.md +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/__main__.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/__init__.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/__main__.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/__init__.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/agentic_chat.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/agentic_generative_ui.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/human_in_the_loop.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/predictive_state_updates.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/shared_state.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/tool_based_generative_ui.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/bank_support.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/chat_app.html +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/chat_app.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/chat_app.ts +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/data_analyst.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/__init__.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/agent.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/custom_evaluators.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/datasets/time_range_v1.yaml +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/datasets/time_range_v1_schema.json +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/datasets/time_range_v2.yaml +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/datasets/time_range_v2_schema.json +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/example_01_generate_dataset.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/example_02_add_custom_evaluators.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/example_03_unit_testing.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/example_04_compare_models.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/models.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/py.typed +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/pydantic_model.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/question_graph.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/rag.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/roulette_wheel.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/__init__.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/agent.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/app.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/functions.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/modal.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/models.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/slack.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/slack_lead_qualifier/store.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/sql_gen.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/stream_markdown.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/stream_whales.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/weather_agent.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/weather_agent_gradio.py +0 -0
- {pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai-examples
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.3
|
|
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
|
|
@@ -35,8 +35,8 @@ Requires-Dist: logfire[asyncpg,fastapi,httpx,sqlite3]>=3.14.1
|
|
|
35
35
|
Requires-Dist: mcp[cli]>=1.4.1; python_version >= '3.10'
|
|
36
36
|
Requires-Dist: modal>=1.0.4
|
|
37
37
|
Requires-Dist: pandas>=2.2.3
|
|
38
|
-
Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==0.7.
|
|
39
|
-
Requires-Dist: pydantic-evals==0.7.
|
|
38
|
+
Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==0.7.3
|
|
39
|
+
Requires-Dist: pydantic-evals==0.7.3
|
|
40
40
|
Requires-Dist: python-multipart>=0.0.17
|
|
41
41
|
Requires-Dist: rich>=13.9.2
|
|
42
42
|
Requires-Dist: uvicorn>=0.32.0
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/flight_booking.py
RENAMED
|
@@ -13,7 +13,7 @@ from rich.prompt import Prompt
|
|
|
13
13
|
|
|
14
14
|
from pydantic_ai import Agent, ModelRetry, RunContext
|
|
15
15
|
from pydantic_ai.messages import ModelMessage
|
|
16
|
-
from pydantic_ai.usage import
|
|
16
|
+
from pydantic_ai.usage import RunUsage, UsageLimits
|
|
17
17
|
|
|
18
18
|
# 'if-token-present' means nothing will be sent (and the example will work) if you don't have logfire configured
|
|
19
19
|
logfire.configure(send_to_logfire='if-token-present')
|
|
@@ -182,7 +182,7 @@ async def main():
|
|
|
182
182
|
req_date=datetime.date(2025, 1, 10),
|
|
183
183
|
)
|
|
184
184
|
message_history: list[ModelMessage] | None = None
|
|
185
|
-
usage:
|
|
185
|
+
usage: RunUsage = RunUsage()
|
|
186
186
|
# run the agent until a satisfactory flight is found
|
|
187
187
|
while True:
|
|
188
188
|
result = await search_agent.run(
|
|
@@ -213,7 +213,7 @@ async def main():
|
|
|
213
213
|
)
|
|
214
214
|
|
|
215
215
|
|
|
216
|
-
async def find_seat(usage:
|
|
216
|
+
async def find_seat(usage: RunUsage) -> SeatPreference:
|
|
217
217
|
message_history: list[ModelMessage] | None = None
|
|
218
218
|
while True:
|
|
219
219
|
answer = Prompt.ask('What seat would you like?')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/__init__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/__main__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/ag_ui/api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/bank_support.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/chat_app.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/data_analyst.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/__init__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/evals/models.py
RENAMED
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/pydantic_model.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/question_graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/roulette_wheel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/stream_markdown.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/stream_whales.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.7.2 → pydantic_ai_examples-0.7.3}/pydantic_ai_examples/weather_agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|