pydantic-ai-slim 1.0.13__py3-none-any.whl → 1.0.14__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-slim might be problematic. Click here for more details.
- pydantic_ai/_agent_graph.py +2 -4
- pydantic_ai/models/openai.py +0 -1
- {pydantic_ai_slim-1.0.13.dist-info → pydantic_ai_slim-1.0.14.dist-info}/METADATA +3 -3
- {pydantic_ai_slim-1.0.13.dist-info → pydantic_ai_slim-1.0.14.dist-info}/RECORD +7 -7
- {pydantic_ai_slim-1.0.13.dist-info → pydantic_ai_slim-1.0.14.dist-info}/WHEEL +0 -0
- {pydantic_ai_slim-1.0.13.dist-info → pydantic_ai_slim-1.0.14.dist-info}/entry_points.txt +0 -0
- {pydantic_ai_slim-1.0.13.dist-info → pydantic_ai_slim-1.0.14.dist-info}/licenses/LICENSE +0 -0
pydantic_ai/_agent_graph.py
CHANGED
|
@@ -458,15 +458,13 @@ class ModelRequestNode(AgentNode[DepsT, NodeRunEndT]):
|
|
|
458
458
|
|
|
459
459
|
original_history = ctx.state.message_history[:]
|
|
460
460
|
message_history = await _process_message_history(original_history, ctx.deps.history_processors, run_context)
|
|
461
|
-
# Never merge the new `ModelRequest` with the one preceding it, to keep `new_messages()` from accidentally including part of the existing message history
|
|
462
|
-
message_history = [*_clean_message_history(message_history[:-1]), message_history[-1]]
|
|
463
461
|
# `ctx.state.message_history` is the same list used by `capture_run_messages`, so we should replace its contents, not the reference
|
|
464
462
|
ctx.state.message_history[:] = message_history
|
|
465
463
|
# Update the new message index to ensure `result.new_messages()` returns the correct messages
|
|
466
464
|
ctx.deps.new_message_index -= len(original_history) - len(message_history)
|
|
467
465
|
|
|
468
|
-
#
|
|
469
|
-
# but don't store it in the message history on state.
|
|
466
|
+
# Merge possible consecutive trailing `ModelRequest`s into one, with tool call parts before user parts,
|
|
467
|
+
# but don't store it in the message history on state. This is just for the benefit of model classes that want clear user/assistant boundaries.
|
|
470
468
|
# See `tests/test_tools.py::test_parallel_tool_return_with_deferred` for an example where this is necessary
|
|
471
469
|
message_history = _clean_message_history(message_history)
|
|
472
470
|
|
pydantic_ai/models/openai.py
CHANGED
|
@@ -1532,7 +1532,6 @@ class OpenAIStreamedResponse(StreamedResponse):
|
|
|
1532
1532
|
|
|
1533
1533
|
async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]:
|
|
1534
1534
|
async for chunk in self._response:
|
|
1535
|
-
print(chunk)
|
|
1536
1535
|
self._usage += _map_usage(chunk)
|
|
1537
1536
|
|
|
1538
1537
|
if chunk.id: # pragma: no branch
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai-slim
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.14
|
|
4
4
|
Summary: Agent Framework / shim to use Pydantic with LLMs, slim package
|
|
5
5
|
Project-URL: Homepage, https://github.com/pydantic/pydantic-ai/tree/main/pydantic_ai_slim
|
|
6
6
|
Project-URL: Source, https://github.com/pydantic/pydantic-ai/tree/main/pydantic_ai_slim
|
|
@@ -33,7 +33,7 @@ Requires-Dist: genai-prices>=0.0.28
|
|
|
33
33
|
Requires-Dist: griffe>=1.3.2
|
|
34
34
|
Requires-Dist: httpx>=0.27
|
|
35
35
|
Requires-Dist: opentelemetry-api>=1.28.0
|
|
36
|
-
Requires-Dist: pydantic-graph==1.0.
|
|
36
|
+
Requires-Dist: pydantic-graph==1.0.14
|
|
37
37
|
Requires-Dist: pydantic>=2.10
|
|
38
38
|
Requires-Dist: typing-inspection>=0.4.0
|
|
39
39
|
Provides-Extra: a2a
|
|
@@ -57,7 +57,7 @@ Requires-Dist: dbos>=1.14.0; extra == 'dbos'
|
|
|
57
57
|
Provides-Extra: duckduckgo
|
|
58
58
|
Requires-Dist: ddgs>=9.0.0; extra == 'duckduckgo'
|
|
59
59
|
Provides-Extra: evals
|
|
60
|
-
Requires-Dist: pydantic-evals==1.0.
|
|
60
|
+
Requires-Dist: pydantic-evals==1.0.14; extra == 'evals'
|
|
61
61
|
Provides-Extra: google
|
|
62
62
|
Requires-Dist: google-genai>=1.31.0; extra == 'google'
|
|
63
63
|
Provides-Extra: groq
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
pydantic_ai/__init__.py,sha256=ncKgkl6nkEbiI8yLeAQx4yFPEcIJ1xgyddxVX-f-wiE,4838
|
|
2
2
|
pydantic_ai/__main__.py,sha256=Q_zJU15DUA01YtlJ2mnaLCoId2YmgmreVEERGuQT-Y0,132
|
|
3
3
|
pydantic_ai/_a2a.py,sha256=3_pl7JW2yHdu31qLgCrdcTZTqXaJNjAwUV6zavah_w8,12159
|
|
4
|
-
pydantic_ai/_agent_graph.py,sha256=
|
|
4
|
+
pydantic_ai/_agent_graph.py,sha256=ejbRDXwDhKWiksa58R6jAjRha_QzM6GuefaZvJD3TA4,53258
|
|
5
5
|
pydantic_ai/_cli.py,sha256=n1MX7p-UKH6ZWPNwiGPZTVcXYhXG8OiJIuNMeYX5k2M,14053
|
|
6
6
|
pydantic_ai/_function_schema.py,sha256=UnDGh7Wh5z70pEaRujXF_hKsSibQdN2ywI6lZGz3LUo,11663
|
|
7
7
|
pydantic_ai/_griffe.py,sha256=BphvTL00FHxsSY56GM-bNyCOdwrpL0T3LbDQITWUK_Q,5280
|
|
@@ -67,7 +67,7 @@ pydantic_ai/models/huggingface.py,sha256=NY870MVS-9_HpEL3SwA9sj-e_1aofUypI0qXDKK
|
|
|
67
67
|
pydantic_ai/models/instrumented.py,sha256=J8eVTutr3UP1r_wd5sM5c0BIdzkRqT-EGgd2NiF0ssQ,22319
|
|
68
68
|
pydantic_ai/models/mcp_sampling.py,sha256=qY4y4nXbRpNp2QbkfjzWLvF_8KLZGXypz4cc0lYRHXU,3553
|
|
69
69
|
pydantic_ai/models/mistral.py,sha256=Jtcng1ga56U77-1a6R8VwjMOwCZpZAZTje5qgw7ZVBY,33952
|
|
70
|
-
pydantic_ai/models/openai.py,sha256=
|
|
70
|
+
pydantic_ai/models/openai.py,sha256=ZyR5EHCKzi9LwUGAUnXOMjcXL_BgB6G16aCt7uyoSF4,92562
|
|
71
71
|
pydantic_ai/models/test.py,sha256=wATXt4OvSYqyStJDsiCbujLbZWXEeztdTormsJOZbTs,20267
|
|
72
72
|
pydantic_ai/models/wrapper.py,sha256=nwh8Gea59blbr1JDKlUnkYICuI9TUubC4qP7iZRRW28,2440
|
|
73
73
|
pydantic_ai/profiles/__init__.py,sha256=FMMCAkEnaK5pNdOEjnxy_sZR5Aj_XF2HHg3Uv8rNj1M,3294
|
|
@@ -121,8 +121,8 @@ pydantic_ai/toolsets/prefixed.py,sha256=0KwcDkW8OM36ZUsOLVP5h-Nj2tPq78L3_E2c-1Fb
|
|
|
121
121
|
pydantic_ai/toolsets/prepared.py,sha256=Zjfz6S8In6PBVxoKFN9sKPN984zO6t0awB7Lnq5KODw,1431
|
|
122
122
|
pydantic_ai/toolsets/renamed.py,sha256=JuLHpi-hYPiSPlaTpN8WiXLiGsywYK0axi2lW2Qs75k,1637
|
|
123
123
|
pydantic_ai/toolsets/wrapper.py,sha256=KRzF1p8dncHbva8CE6Ud-IC5E_aygIHlwH5atXK55k4,1673
|
|
124
|
-
pydantic_ai_slim-1.0.
|
|
125
|
-
pydantic_ai_slim-1.0.
|
|
126
|
-
pydantic_ai_slim-1.0.
|
|
127
|
-
pydantic_ai_slim-1.0.
|
|
128
|
-
pydantic_ai_slim-1.0.
|
|
124
|
+
pydantic_ai_slim-1.0.14.dist-info/METADATA,sha256=ShPYXYRzjuw6MLy43l4A2XEeY3H5XGJz1FxCYGur5HM,4631
|
|
125
|
+
pydantic_ai_slim-1.0.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
126
|
+
pydantic_ai_slim-1.0.14.dist-info/entry_points.txt,sha256=kbKxe2VtDCYS06hsI7P3uZGxcVC08-FPt1rxeiMpIps,50
|
|
127
|
+
pydantic_ai_slim-1.0.14.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
|
|
128
|
+
pydantic_ai_slim-1.0.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|