pydantic-ai-examples 0.8.0__tar.gz → 0.8.1__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.8.0 → pydantic_ai_examples-0.8.1}/PKG-INFO +3 -3
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/chat_app.py +1 -1
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/stream_markdown.py +1 -1
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/stream_whales.py +1 -1
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/.gitignore +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/LICENSE +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/README.md +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/__main__.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/__init__.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/__main__.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/api/__init__.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/api/agentic_chat.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/api/agentic_generative_ui.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/api/human_in_the_loop.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/api/predictive_state_updates.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/api/shared_state.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/api/tool_based_generative_ui.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/bank_support.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/chat_app.html +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/chat_app.ts +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/data_analyst.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/__init__.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/agent.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/custom_evaluators.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/datasets/time_range_v1.yaml +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/datasets/time_range_v1_schema.json +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/datasets/time_range_v2.yaml +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/datasets/time_range_v2_schema.json +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/example_01_generate_dataset.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/example_02_add_custom_evaluators.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/example_03_unit_testing.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/example_04_compare_models.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/models.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/flight_booking.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/py.typed +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/pydantic_model.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/question_graph.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/rag.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/roulette_wheel.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/__init__.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/agent.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/app.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/functions.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/modal.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/models.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/slack.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/slack_lead_qualifier/store.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/sql_gen.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/weather_agent.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/weather_agent_gradio.py +0 -0
- {pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai-examples
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.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
|
|
@@ -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.8.
|
|
39
|
-
Requires-Dist: pydantic-evals==0.8.
|
|
38
|
+
Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==0.8.1
|
|
39
|
+
Requires-Dist: pydantic-evals==0.8.1
|
|
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
|
|
@@ -127,7 +127,7 @@ async def post_chat(
|
|
|
127
127
|
messages = await database.get_messages()
|
|
128
128
|
# run the agent with the user prompt and the chat history
|
|
129
129
|
async with agent.run_stream(prompt, message_history=messages) as result:
|
|
130
|
-
async for text in result.
|
|
130
|
+
async for text in result.stream_output(debounce_by=0.01):
|
|
131
131
|
# text here is a `str` and the frontend wants
|
|
132
132
|
# JSON encoded ModelResponse, so we create one
|
|
133
133
|
m = ModelResponse(parts=[TextPart(text)], timestamp=result.timestamp())
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/stream_markdown.py
RENAMED
|
@@ -42,7 +42,7 @@ async def main():
|
|
|
42
42
|
console.log(f'Using model: {model}')
|
|
43
43
|
with Live('', console=console, vertical_overflow='visible') as live:
|
|
44
44
|
async with agent.run_stream(prompt, model=model) as result:
|
|
45
|
-
async for message in result.
|
|
45
|
+
async for message in result.stream_output():
|
|
46
46
|
live.update(Markdown(message))
|
|
47
47
|
console.log(result.usage())
|
|
48
48
|
else:
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/stream_whales.py
RENAMED
|
@@ -51,7 +51,7 @@ async def main():
|
|
|
51
51
|
) as result:
|
|
52
52
|
console.print('Response:', style='green')
|
|
53
53
|
|
|
54
|
-
async for whales in result.
|
|
54
|
+
async for whales in result.stream_output(debounce_by=0.01):
|
|
55
55
|
table = Table(
|
|
56
56
|
title='Species of Whale',
|
|
57
57
|
caption='Streaming Structured responses from GPT-4',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/__init__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/ag_ui/__main__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/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.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/bank_support.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/chat_app.html
RENAMED
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/data_analyst.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/__init__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/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.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/evals/models.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/flight_booking.py
RENAMED
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/pydantic_model.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/question_graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.8.0 → pydantic_ai_examples-0.8.1}/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.8.0 → pydantic_ai_examples-0.8.1}/pydantic_ai_examples/weather_agent.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|