pydantic-ai-examples 1.0.11__py3-none-any.whl → 1.0.13__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.
- pydantic_ai_examples/chat_app.py +3 -2
- pydantic_ai_examples/flight_booking.py +8 -2
- pydantic_ai_examples/question_graph.py +1 -2
- pydantic_ai_examples/weather_agent_gradio.py +1 -1
- {pydantic_ai_examples-1.0.11.dist-info → pydantic_ai_examples-1.0.13.dist-info}/METADATA +3 -3
- {pydantic_ai_examples-1.0.11.dist-info → pydantic_ai_examples-1.0.13.dist-info}/RECORD +8 -8
- {pydantic_ai_examples-1.0.11.dist-info → pydantic_ai_examples-1.0.13.dist-info}/WHEEL +0 -0
- {pydantic_ai_examples-1.0.11.dist-info → pydantic_ai_examples-1.0.13.dist-info}/licenses/LICENSE +0 -0
pydantic_ai_examples/chat_app.py
CHANGED
|
@@ -25,13 +25,14 @@ from fastapi import Depends, Request
|
|
|
25
25
|
from fastapi.responses import FileResponse, Response, StreamingResponse
|
|
26
26
|
from typing_extensions import LiteralString, ParamSpec, TypedDict
|
|
27
27
|
|
|
28
|
-
from pydantic_ai import
|
|
29
|
-
|
|
28
|
+
from pydantic_ai import (
|
|
29
|
+
Agent,
|
|
30
30
|
ModelMessage,
|
|
31
31
|
ModelMessagesTypeAdapter,
|
|
32
32
|
ModelRequest,
|
|
33
33
|
ModelResponse,
|
|
34
34
|
TextPart,
|
|
35
|
+
UnexpectedModelBehavior,
|
|
35
36
|
UserPromptPart,
|
|
36
37
|
)
|
|
37
38
|
|
|
@@ -11,8 +11,14 @@ import logfire
|
|
|
11
11
|
from pydantic import BaseModel, Field
|
|
12
12
|
from rich.prompt import Prompt
|
|
13
13
|
|
|
14
|
-
from pydantic_ai import
|
|
15
|
-
|
|
14
|
+
from pydantic_ai import (
|
|
15
|
+
Agent,
|
|
16
|
+
ModelMessage,
|
|
17
|
+
ModelRetry,
|
|
18
|
+
RunContext,
|
|
19
|
+
RunUsage,
|
|
20
|
+
UsageLimits,
|
|
21
|
+
)
|
|
16
22
|
|
|
17
23
|
# 'if-token-present' means nothing will be sent (and the example will work) if you don't have logfire configured
|
|
18
24
|
logfire.configure(send_to_logfire='if-token-present')
|
|
@@ -13,8 +13,7 @@ from pathlib import Path
|
|
|
13
13
|
import logfire
|
|
14
14
|
from groq import BaseModel
|
|
15
15
|
|
|
16
|
-
from pydantic_ai import Agent, format_as_xml
|
|
17
|
-
from pydantic_ai.messages import ModelMessage
|
|
16
|
+
from pydantic_ai import Agent, ModelMessage, format_as_xml
|
|
18
17
|
from pydantic_graph import (
|
|
19
18
|
BaseNode,
|
|
20
19
|
End,
|
|
@@ -5,7 +5,7 @@ import json
|
|
|
5
5
|
from httpx import AsyncClient
|
|
6
6
|
from pydantic import BaseModel
|
|
7
7
|
|
|
8
|
-
from pydantic_ai
|
|
8
|
+
from pydantic_ai import ToolCallPart, ToolReturnPart
|
|
9
9
|
from pydantic_ai_examples.weather_agent import Deps, weather_agent
|
|
10
10
|
|
|
11
11
|
try:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai-examples
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.13
|
|
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.0.
|
|
38
|
-
Requires-Dist: pydantic-evals==1.0.
|
|
37
|
+
Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==1.0.13
|
|
38
|
+
Requires-Dist: pydantic-evals==1.0.13
|
|
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
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
pydantic_ai_examples/__main__.py,sha256=i0LEo2JBOZ-gnHED0ou5Bya43gi7KmOyQ_jKN7M5Ces,1647
|
|
2
2
|
pydantic_ai_examples/bank_support.py,sha256=TEy19B4iyB49A-ZMv1rOZIE_bOHml5er1Qaz700e2NU,2665
|
|
3
3
|
pydantic_ai_examples/chat_app.html,sha256=90XhxrpDAT09mPVTn9edEn8PqAD-tHxWkeeMz9r_okQ,2580
|
|
4
|
-
pydantic_ai_examples/chat_app.py,sha256=
|
|
4
|
+
pydantic_ai_examples/chat_app.py,sha256=95sRAnzWZzjF_P4xhfbBZf1gG6UZnrJ25JxSlrDk0SI,7054
|
|
5
5
|
pydantic_ai_examples/chat_app.ts,sha256=2KfZ2rJU2o0iCPjelyqEi5sH6vfemzWaa5Evx_VcAE4,3307
|
|
6
6
|
pydantic_ai_examples/data_analyst.py,sha256=vSpfIWpxNgaZqKx2DJD721ZA3QgSjaZkTixy5OHz9xY,3753
|
|
7
|
-
pydantic_ai_examples/flight_booking.py,sha256=
|
|
7
|
+
pydantic_ai_examples/flight_booking.py,sha256=dPzbP386m85IzEpIPu_oh7kBi-zfdsgFzzMNdUo-fko,7418
|
|
8
8
|
pydantic_ai_examples/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
pydantic_ai_examples/pydantic_model.py,sha256=EQsHBig2bvb0PG_2XDgP9Le5xJ4n8eZJzQDGQYhDykg,775
|
|
10
|
-
pydantic_ai_examples/question_graph.py,sha256=
|
|
10
|
+
pydantic_ai_examples/question_graph.py,sha256=lVh48-vu0zRqx6Tw1Z5nh-L0fXsUqfOs5Ir_zG8128g,5075
|
|
11
11
|
pydantic_ai_examples/rag.py,sha256=lWIusQc1_CQ4GrXRJgteXfDpTfl2AZrd4qZcOXPBC5o,7976
|
|
12
12
|
pydantic_ai_examples/roulette_wheel.py,sha256=2YHKbGzYOkLsd98hO3ntjM6pChR1UpmsRrLD36Qh5f0,1654
|
|
13
13
|
pydantic_ai_examples/sql_gen.py,sha256=rRp_C0ZvfLu6rkR5wrVvgah6wd92nh1vT4UYurx5pmU,5159
|
|
14
14
|
pydantic_ai_examples/stream_markdown.py,sha256=rdhrR6XkqoeOpfv_xFbRpKDV4drEAd8ZrsFBXVrdvHs,2454
|
|
15
15
|
pydantic_ai_examples/stream_whales.py,sha256=Yoa7IuqN_6fowfYSINW39uPCthYu9FKChF-QBmQqWb8,2721
|
|
16
16
|
pydantic_ai_examples/weather_agent.py,sha256=E42RbuVDJzxlBw9lF2ARNSNAhL1HWVEmTt5MN70DyDU,3187
|
|
17
|
-
pydantic_ai_examples/weather_agent_gradio.py,sha256=
|
|
17
|
+
pydantic_ai_examples/weather_agent_gradio.py,sha256=MCoNp5TgWj628ABoZpTUVJYIeSV_C-ig08WfcssDH7A,4719
|
|
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
|
|
@@ -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.0.
|
|
48
|
-
pydantic_ai_examples-1.0.
|
|
49
|
-
pydantic_ai_examples-1.0.
|
|
50
|
-
pydantic_ai_examples-1.0.
|
|
47
|
+
pydantic_ai_examples-1.0.13.dist-info/METADATA,sha256=_g_gVc0gu_sNIaDH07WB0kgnNAWMwJoXvb1CeLUknIE,2763
|
|
48
|
+
pydantic_ai_examples-1.0.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
49
|
+
pydantic_ai_examples-1.0.13.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
|
|
50
|
+
pydantic_ai_examples-1.0.13.dist-info/RECORD,,
|
|
File without changes
|
{pydantic_ai_examples-1.0.11.dist-info → pydantic_ai_examples-1.0.13.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|