pydantic-ai-examples 0.2.11__tar.gz → 0.2.13__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.2.11 → pydantic_ai_examples-0.2.13}/PKG-INFO +3 -3
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/sql_gen.py +1 -1
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/weather_agent_gradio.py +2 -6
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/.gitignore +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/LICENSE +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/README.md +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/__main__.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/bank_support.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/chat_app.html +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/chat_app.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/chat_app.ts +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/__init__.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/agent.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/custom_evaluators.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/datasets/time_range_v1.yaml +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/datasets/time_range_v1_schema.json +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/datasets/time_range_v2.yaml +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/datasets/time_range_v2_schema.json +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/example_01_generate_dataset.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/example_02_add_custom_evaluators.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/example_03_unit_testing.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/example_04_compare_models.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/models.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/flight_booking.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/pydantic_model.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/question_graph.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/rag.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/roulette_wheel.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/stream_markdown.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/stream_whales.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/weather_agent.py +0 -0
- {pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai-examples
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.13
|
|
4
4
|
Summary: Examples of how to use PydanticAI and what it can do.
|
|
5
5
|
Author-email: Samuel Colvin <samuel@pydantic.dev>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -31,8 +31,8 @@ Requires-Dist: fastapi>=0.115.4
|
|
|
31
31
|
Requires-Dist: gradio>=5.9.0; python_version > '3.9'
|
|
32
32
|
Requires-Dist: logfire[asyncpg,fastapi,httpx,sqlite3]>=2.6
|
|
33
33
|
Requires-Dist: mcp[cli]>=1.4.1; python_version >= '3.10'
|
|
34
|
-
Requires-Dist: pydantic-ai-slim[anthropic,groq,openai,vertexai]==0.2.
|
|
35
|
-
Requires-Dist: pydantic-evals==0.2.
|
|
34
|
+
Requires-Dist: pydantic-ai-slim[anthropic,groq,openai,vertexai]==0.2.13
|
|
35
|
+
Requires-Dist: pydantic-evals==0.2.13
|
|
36
36
|
Requires-Dist: python-multipart>=0.0.17
|
|
37
37
|
Requires-Dist: rich>=13.9.2
|
|
38
38
|
Requires-Dist: uvicorn>=0.32.0
|
|
@@ -92,7 +92,7 @@ class InvalidRequest(BaseModel):
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
Response: TypeAlias = Union[Success, InvalidRequest]
|
|
95
|
-
agent
|
|
95
|
+
agent = Agent[Deps, Response](
|
|
96
96
|
'google-gla:gemini-1.5-flash',
|
|
97
97
|
# Type ignore while we wait for PEP-0747, nonetheless unions will work fine everywhere else
|
|
98
98
|
output_type=Response, # type: ignore
|
|
@@ -33,16 +33,12 @@ async def stream_from_agent(prompt: str, chatbot: list[dict], past_messages: lis
|
|
|
33
33
|
for message in result.new_messages():
|
|
34
34
|
for call in message.parts:
|
|
35
35
|
if isinstance(call, ToolCallPart):
|
|
36
|
-
call_args = (
|
|
37
|
-
call.args.args_json
|
|
38
|
-
if hasattr(call.args, 'args_json')
|
|
39
|
-
else json.dumps(call.args.args_dict)
|
|
40
|
-
)
|
|
36
|
+
call_args = call.args_as_json_str()
|
|
41
37
|
metadata = {
|
|
42
38
|
'title': f'🛠️ Using {TOOL_TO_DISPLAY_NAME[call.tool_name]}',
|
|
43
39
|
}
|
|
44
40
|
if call.tool_call_id is not None:
|
|
45
|
-
metadata['id'] =
|
|
41
|
+
metadata['id'] = call.tool_call_id
|
|
46
42
|
|
|
47
43
|
gr_message = {
|
|
48
44
|
'role': 'assistant',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/__main__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/bank_support.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/chat_app.html
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/chat_app.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/chat_app.ts
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/__init__.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/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.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/evals/models.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/flight_booking.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/pydantic_model.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/question_graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/roulette_wheel.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/stream_markdown.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/stream_whales.py
RENAMED
|
File without changes
|
{pydantic_ai_examples-0.2.11 → pydantic_ai_examples-0.2.13}/pydantic_ai_examples/weather_agent.py
RENAMED
|
File without changes
|
|
File without changes
|