pydantic-ai-slim 0.2.0__py3-none-any.whl → 0.2.2__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/_cli.py +49 -11
- pydantic_ai/agent.py +68 -7
- pydantic_ai/messages.py +4 -0
- pydantic_ai/models/anthropic.py +3 -2
- pydantic_ai/providers/bedrock.py +8 -2
- {pydantic_ai_slim-0.2.0.dist-info → pydantic_ai_slim-0.2.2.dist-info}/METADATA +3 -3
- {pydantic_ai_slim-0.2.0.dist-info → pydantic_ai_slim-0.2.2.dist-info}/RECORD +9 -9
- {pydantic_ai_slim-0.2.0.dist-info → pydantic_ai_slim-0.2.2.dist-info}/WHEEL +0 -0
- {pydantic_ai_slim-0.2.0.dist-info → pydantic_ai_slim-0.2.2.dist-info}/entry_points.txt +0 -0
pydantic_ai/_cli.py
CHANGED
|
@@ -2,6 +2,7 @@ from __future__ import annotations as _annotations
|
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
4
|
import asyncio
|
|
5
|
+
import importlib
|
|
5
6
|
import sys
|
|
6
7
|
from asyncio import CancelledError
|
|
7
8
|
from collections.abc import Sequence
|
|
@@ -12,6 +13,9 @@ from typing import Any, cast
|
|
|
12
13
|
|
|
13
14
|
from typing_inspection.introspection import get_literal_values
|
|
14
15
|
|
|
16
|
+
from pydantic_ai.result import OutputDataT
|
|
17
|
+
from pydantic_ai.tools import AgentDepsT
|
|
18
|
+
|
|
15
19
|
from . import __version__
|
|
16
20
|
from .agent import Agent
|
|
17
21
|
from .exceptions import UserError
|
|
@@ -42,6 +46,15 @@ except ImportError as _import_error:
|
|
|
42
46
|
__all__ = 'cli', 'cli_exit'
|
|
43
47
|
|
|
44
48
|
|
|
49
|
+
PYDANTIC_AI_HOME = Path.home() / '.pydantic-ai'
|
|
50
|
+
"""The home directory for PydanticAI CLI.
|
|
51
|
+
|
|
52
|
+
This folder is used to store the prompt history and configuration.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
PROMPT_HISTORY_PATH = PYDANTIC_AI_HOME / 'prompt-history.txt'
|
|
56
|
+
|
|
57
|
+
|
|
45
58
|
class SimpleCodeBlock(CodeBlock):
|
|
46
59
|
"""Customised code blocks in markdown.
|
|
47
60
|
|
|
@@ -114,6 +127,11 @@ Special prompts:
|
|
|
114
127
|
# e.g. we want to show `openai:gpt-4o` but not `gpt-4o`
|
|
115
128
|
qualified_model_names = [n for n in get_literal_values(KnownModelName.__value__) if ':' in n]
|
|
116
129
|
arg.completer = argcomplete.ChoicesCompleter(qualified_model_names) # type: ignore[reportPrivateUsage]
|
|
130
|
+
parser.add_argument(
|
|
131
|
+
'-a',
|
|
132
|
+
'--agent',
|
|
133
|
+
help='Custom Agent to use, in format "module:variable", e.g. "mymodule.submodule:my_agent"',
|
|
134
|
+
)
|
|
117
135
|
parser.add_argument(
|
|
118
136
|
'-l',
|
|
119
137
|
'--list-models',
|
|
@@ -146,8 +164,22 @@ Special prompts:
|
|
|
146
164
|
console.print(f' {model}', highlight=False)
|
|
147
165
|
return 0
|
|
148
166
|
|
|
167
|
+
agent: Agent[None, str] = cli_agent
|
|
168
|
+
if args.agent:
|
|
169
|
+
try:
|
|
170
|
+
module_path, variable_name = args.agent.split(':')
|
|
171
|
+
module = importlib.import_module(module_path)
|
|
172
|
+
agent = getattr(module, variable_name)
|
|
173
|
+
if not isinstance(agent, Agent):
|
|
174
|
+
console.print(f'[red]Error: {args.agent} is not an Agent instance[/red]')
|
|
175
|
+
return 1
|
|
176
|
+
console.print(f'[green]Using custom agent:[/green] [magenta]{args.agent}[/magenta]', highlight=False)
|
|
177
|
+
except ValueError:
|
|
178
|
+
console.print('[red]Error: Agent must be specified in "module:variable" format[/red]')
|
|
179
|
+
return 1
|
|
180
|
+
|
|
149
181
|
try:
|
|
150
|
-
|
|
182
|
+
agent.model = infer_model(args.model)
|
|
151
183
|
except UserError as e:
|
|
152
184
|
console.print(f'Error initializing [magenta]{args.model}[/magenta]:\n[red]{e}[/red]')
|
|
153
185
|
return 1
|
|
@@ -162,22 +194,27 @@ Special prompts:
|
|
|
162
194
|
|
|
163
195
|
if prompt := cast(str, args.prompt):
|
|
164
196
|
try:
|
|
165
|
-
asyncio.run(ask_agent(
|
|
197
|
+
asyncio.run(ask_agent(agent, prompt, stream, console, code_theme))
|
|
166
198
|
except KeyboardInterrupt:
|
|
167
199
|
pass
|
|
168
200
|
return 0
|
|
169
201
|
|
|
170
|
-
history = Path.home() / f'.{prog_name}-prompt-history.txt'
|
|
171
202
|
# doing this instead of `PromptSession[Any](history=` allows mocking of PromptSession in tests
|
|
172
|
-
session: PromptSession[Any] = PromptSession(history=FileHistory(str(
|
|
203
|
+
session: PromptSession[Any] = PromptSession(history=FileHistory(str(PROMPT_HISTORY_PATH)))
|
|
173
204
|
try:
|
|
174
|
-
return asyncio.run(run_chat(session, stream,
|
|
205
|
+
return asyncio.run(run_chat(session, stream, agent, console, code_theme, prog_name))
|
|
175
206
|
except KeyboardInterrupt: # pragma: no cover
|
|
176
207
|
return 0
|
|
177
208
|
|
|
178
209
|
|
|
179
210
|
async def run_chat(
|
|
180
|
-
session: PromptSession[Any],
|
|
211
|
+
session: PromptSession[Any],
|
|
212
|
+
stream: bool,
|
|
213
|
+
agent: Agent[AgentDepsT, OutputDataT],
|
|
214
|
+
console: Console,
|
|
215
|
+
code_theme: str,
|
|
216
|
+
prog_name: str,
|
|
217
|
+
deps: AgentDepsT = None,
|
|
181
218
|
) -> int:
|
|
182
219
|
multiline = False
|
|
183
220
|
messages: list[ModelMessage] = []
|
|
@@ -199,30 +236,31 @@ async def run_chat(
|
|
|
199
236
|
return exit_value
|
|
200
237
|
else:
|
|
201
238
|
try:
|
|
202
|
-
messages = await ask_agent(agent, text, stream, console, code_theme, messages)
|
|
239
|
+
messages = await ask_agent(agent, text, stream, console, code_theme, deps, messages)
|
|
203
240
|
except CancelledError: # pragma: no cover
|
|
204
241
|
console.print('[dim]Interrupted[/dim]')
|
|
205
242
|
|
|
206
243
|
|
|
207
244
|
async def ask_agent(
|
|
208
|
-
agent: Agent,
|
|
245
|
+
agent: Agent[AgentDepsT, OutputDataT],
|
|
209
246
|
prompt: str,
|
|
210
247
|
stream: bool,
|
|
211
248
|
console: Console,
|
|
212
249
|
code_theme: str,
|
|
250
|
+
deps: AgentDepsT = None,
|
|
213
251
|
messages: list[ModelMessage] | None = None,
|
|
214
252
|
) -> list[ModelMessage]:
|
|
215
253
|
status = Status('[dim]Working on it…[/dim]', console=console)
|
|
216
254
|
|
|
217
255
|
if not stream:
|
|
218
256
|
with status:
|
|
219
|
-
result = await agent.run(prompt, message_history=messages)
|
|
220
|
-
content = result.output
|
|
257
|
+
result = await agent.run(prompt, message_history=messages, deps=deps)
|
|
258
|
+
content = str(result.output)
|
|
221
259
|
console.print(Markdown(content, code_theme=code_theme))
|
|
222
260
|
return result.all_messages()
|
|
223
261
|
|
|
224
262
|
with status, ExitStack() as stack:
|
|
225
|
-
async with agent.iter(prompt, message_history=messages) as agent_run:
|
|
263
|
+
async with agent.iter(prompt, message_history=messages, deps=deps) as agent_run:
|
|
226
264
|
live = Live('', refresh_per_second=15, console=console, vertical_overflow='ellipsis')
|
|
227
265
|
async for node in agent_run:
|
|
228
266
|
if Agent.is_model_request_node(node):
|
pydantic_ai/agent.py
CHANGED
|
@@ -12,7 +12,7 @@ from typing import TYPE_CHECKING, Any, Callable, ClassVar, Generic, cast, final,
|
|
|
12
12
|
|
|
13
13
|
from opentelemetry.trace import NoOpTracer, use_span
|
|
14
14
|
from pydantic.json_schema import GenerateJsonSchema
|
|
15
|
-
from typing_extensions import Literal, Never,
|
|
15
|
+
from typing_extensions import Literal, Never, Self, TypeIs, TypeVar, deprecated
|
|
16
16
|
|
|
17
17
|
from pydantic_graph import End, Graph, GraphRun, GraphRunContext
|
|
18
18
|
from pydantic_graph._utils import get_event_loop
|
|
@@ -459,7 +459,7 @@ class Agent(Generic[AgentDepsT, OutputDataT]):
|
|
|
459
459
|
self,
|
|
460
460
|
user_prompt: str | Sequence[_messages.UserContent] | None,
|
|
461
461
|
*,
|
|
462
|
-
output_type:
|
|
462
|
+
output_type: None = None,
|
|
463
463
|
message_history: list[_messages.ModelMessage] | None = None,
|
|
464
464
|
model: models.Model | models.KnownModelName | str | None = None,
|
|
465
465
|
deps: AgentDepsT = None,
|
|
@@ -468,7 +468,23 @@ class Agent(Generic[AgentDepsT, OutputDataT]):
|
|
|
468
468
|
usage: _usage.Usage | None = None,
|
|
469
469
|
infer_name: bool = True,
|
|
470
470
|
**_deprecated_kwargs: Never,
|
|
471
|
-
) -> AbstractAsyncContextManager[AgentRun[AgentDepsT,
|
|
471
|
+
) -> AbstractAsyncContextManager[AgentRun[AgentDepsT, OutputDataT]]: ...
|
|
472
|
+
|
|
473
|
+
@overload
|
|
474
|
+
def iter(
|
|
475
|
+
self,
|
|
476
|
+
user_prompt: str | Sequence[_messages.UserContent] | None,
|
|
477
|
+
*,
|
|
478
|
+
output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT],
|
|
479
|
+
message_history: list[_messages.ModelMessage] | None = None,
|
|
480
|
+
model: models.Model | models.KnownModelName | str | None = None,
|
|
481
|
+
deps: AgentDepsT = None,
|
|
482
|
+
model_settings: ModelSettings | None = None,
|
|
483
|
+
usage_limits: _usage.UsageLimits | None = None,
|
|
484
|
+
usage: _usage.Usage | None = None,
|
|
485
|
+
infer_name: bool = True,
|
|
486
|
+
**_deprecated_kwargs: Never,
|
|
487
|
+
) -> AbstractAsyncContextManager[AgentRun[AgentDepsT, RunOutputDataT]]: ...
|
|
472
488
|
|
|
473
489
|
@overload
|
|
474
490
|
@deprecated('`result_type` is deprecated, use `output_type` instead.')
|
|
@@ -1621,7 +1637,7 @@ class Agent(Generic[AgentDepsT, OutputDataT]):
|
|
|
1621
1637
|
@staticmethod
|
|
1622
1638
|
def is_model_request_node(
|
|
1623
1639
|
node: _agent_graph.AgentNode[T, S] | End[result.FinalResult[S]],
|
|
1624
|
-
) ->
|
|
1640
|
+
) -> TypeIs[_agent_graph.ModelRequestNode[T, S]]:
|
|
1625
1641
|
"""Check if the node is a `ModelRequestNode`, narrowing the type if it is.
|
|
1626
1642
|
|
|
1627
1643
|
This method preserves the generic parameters while narrowing the type, unlike a direct call to `isinstance`.
|
|
@@ -1631,7 +1647,7 @@ class Agent(Generic[AgentDepsT, OutputDataT]):
|
|
|
1631
1647
|
@staticmethod
|
|
1632
1648
|
def is_call_tools_node(
|
|
1633
1649
|
node: _agent_graph.AgentNode[T, S] | End[result.FinalResult[S]],
|
|
1634
|
-
) ->
|
|
1650
|
+
) -> TypeIs[_agent_graph.CallToolsNode[T, S]]:
|
|
1635
1651
|
"""Check if the node is a `CallToolsNode`, narrowing the type if it is.
|
|
1636
1652
|
|
|
1637
1653
|
This method preserves the generic parameters while narrowing the type, unlike a direct call to `isinstance`.
|
|
@@ -1641,7 +1657,7 @@ class Agent(Generic[AgentDepsT, OutputDataT]):
|
|
|
1641
1657
|
@staticmethod
|
|
1642
1658
|
def is_user_prompt_node(
|
|
1643
1659
|
node: _agent_graph.AgentNode[T, S] | End[result.FinalResult[S]],
|
|
1644
|
-
) ->
|
|
1660
|
+
) -> TypeIs[_agent_graph.UserPromptNode[T, S]]:
|
|
1645
1661
|
"""Check if the node is a `UserPromptNode`, narrowing the type if it is.
|
|
1646
1662
|
|
|
1647
1663
|
This method preserves the generic parameters while narrowing the type, unlike a direct call to `isinstance`.
|
|
@@ -1651,7 +1667,7 @@ class Agent(Generic[AgentDepsT, OutputDataT]):
|
|
|
1651
1667
|
@staticmethod
|
|
1652
1668
|
def is_end_node(
|
|
1653
1669
|
node: _agent_graph.AgentNode[T, S] | End[result.FinalResult[S]],
|
|
1654
|
-
) ->
|
|
1670
|
+
) -> TypeIs[End[result.FinalResult[S]]]:
|
|
1655
1671
|
"""Check if the node is a `End`, narrowing the type if it is.
|
|
1656
1672
|
|
|
1657
1673
|
This method preserves the generic parameters while narrowing the type, unlike a direct call to `isinstance`.
|
|
@@ -1672,6 +1688,51 @@ class Agent(Generic[AgentDepsT, OutputDataT]):
|
|
|
1672
1688
|
finally:
|
|
1673
1689
|
await exit_stack.aclose()
|
|
1674
1690
|
|
|
1691
|
+
async def to_cli(self: Self, deps: AgentDepsT = None) -> None:
|
|
1692
|
+
"""Run the agent in a CLI chat interface.
|
|
1693
|
+
|
|
1694
|
+
Example:
|
|
1695
|
+
```python {title="agent_to_cli.py" test="skip"}
|
|
1696
|
+
from pydantic_ai import Agent
|
|
1697
|
+
|
|
1698
|
+
agent = Agent('openai:gpt-4o', instructions='You always respond in Italian.')
|
|
1699
|
+
|
|
1700
|
+
async def main():
|
|
1701
|
+
await agent.to_cli()
|
|
1702
|
+
```
|
|
1703
|
+
"""
|
|
1704
|
+
from prompt_toolkit import PromptSession
|
|
1705
|
+
from prompt_toolkit.history import FileHistory
|
|
1706
|
+
from rich.console import Console
|
|
1707
|
+
|
|
1708
|
+
from pydantic_ai._cli import PROMPT_HISTORY_PATH, run_chat
|
|
1709
|
+
|
|
1710
|
+
# TODO(Marcelo): We need to refactor the CLI code to be able to be able to just pass `agent`, `deps` and
|
|
1711
|
+
# `prog_name` from here.
|
|
1712
|
+
|
|
1713
|
+
session: PromptSession[Any] = PromptSession(history=FileHistory(str(PROMPT_HISTORY_PATH)))
|
|
1714
|
+
await run_chat(
|
|
1715
|
+
session=session,
|
|
1716
|
+
stream=True,
|
|
1717
|
+
agent=self,
|
|
1718
|
+
deps=deps,
|
|
1719
|
+
console=Console(),
|
|
1720
|
+
code_theme='monokai',
|
|
1721
|
+
prog_name='pydantic-ai',
|
|
1722
|
+
)
|
|
1723
|
+
|
|
1724
|
+
def to_cli_sync(self: Self, deps: AgentDepsT = None) -> None:
|
|
1725
|
+
"""Run the agent in a CLI chat interface with the non-async interface.
|
|
1726
|
+
|
|
1727
|
+
```python {title="agent_to_cli_sync.py" test="skip"}
|
|
1728
|
+
from pydantic_ai import Agent
|
|
1729
|
+
|
|
1730
|
+
agent = Agent('openai:gpt-4o', instructions='You always respond in Italian.')
|
|
1731
|
+
agent.to_cli_sync()
|
|
1732
|
+
```
|
|
1733
|
+
"""
|
|
1734
|
+
return get_event_loop().run_until_complete(self.to_cli(deps=deps))
|
|
1735
|
+
|
|
1675
1736
|
|
|
1676
1737
|
@dataclasses.dataclass(repr=False)
|
|
1677
1738
|
class AgentRun(Generic[AgentDepsT, OutputDataT]):
|
pydantic_ai/messages.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations as _annotations
|
|
2
2
|
|
|
3
|
+
import base64
|
|
3
4
|
import uuid
|
|
4
5
|
from collections.abc import Sequence
|
|
5
6
|
from dataclasses import dataclass, field, replace
|
|
@@ -341,6 +342,9 @@ class UserPromptPart:
|
|
|
341
342
|
content.append(part)
|
|
342
343
|
elif isinstance(part, (ImageUrl, AudioUrl, DocumentUrl, VideoUrl)):
|
|
343
344
|
content.append({'kind': part.kind, 'url': part.url})
|
|
345
|
+
elif isinstance(part, BinaryContent):
|
|
346
|
+
base64_data = base64.b64encode(part.data).decode()
|
|
347
|
+
content.append({'kind': part.kind, 'content': base64_data, 'media_type': part.media_type})
|
|
344
348
|
else:
|
|
345
349
|
content.append({'kind': part.kind})
|
|
346
350
|
return Event('gen_ai.user.message', body={'content': content, 'role': 'user'})
|
pydantic_ai/models/anthropic.py
CHANGED
|
@@ -284,7 +284,7 @@ class AnthropicModel(Model):
|
|
|
284
284
|
|
|
285
285
|
async def _map_message(self, messages: list[ModelMessage]) -> tuple[str, list[MessageParam]]:
|
|
286
286
|
"""Just maps a `pydantic_ai.Message` to a `anthropic.types.MessageParam`."""
|
|
287
|
-
|
|
287
|
+
system_prompt_parts: list[str] = []
|
|
288
288
|
anthropic_messages: list[MessageParam] = []
|
|
289
289
|
for m in messages:
|
|
290
290
|
if isinstance(m, ModelRequest):
|
|
@@ -293,7 +293,7 @@ class AnthropicModel(Model):
|
|
|
293
293
|
] = []
|
|
294
294
|
for request_part in m.parts:
|
|
295
295
|
if isinstance(request_part, SystemPromptPart):
|
|
296
|
-
|
|
296
|
+
system_prompt_parts.append(request_part.content)
|
|
297
297
|
elif isinstance(request_part, UserPromptPart):
|
|
298
298
|
async for content in self._map_user_prompt(request_part):
|
|
299
299
|
user_content_params.append(content)
|
|
@@ -333,6 +333,7 @@ class AnthropicModel(Model):
|
|
|
333
333
|
anthropic_messages.append(MessageParam(role='assistant', content=assistant_content_params))
|
|
334
334
|
else:
|
|
335
335
|
assert_never(m)
|
|
336
|
+
system_prompt = '\n\n'.join(system_prompt_parts)
|
|
336
337
|
if instructions := self._get_instructions(messages):
|
|
337
338
|
system_prompt = f'{instructions}\n\n{system_prompt}'
|
|
338
339
|
return system_prompt, anthropic_messages
|
pydantic_ai/providers/bedrock.py
CHANGED
|
@@ -44,6 +44,7 @@ class BedrockProvider(Provider[BaseClient]):
|
|
|
44
44
|
aws_access_key_id: str | None = None,
|
|
45
45
|
aws_secret_access_key: str | None = None,
|
|
46
46
|
aws_session_token: str | None = None,
|
|
47
|
+
profile_name: str | None = None,
|
|
47
48
|
aws_read_timeout: float | None = None,
|
|
48
49
|
aws_connect_timeout: float | None = None,
|
|
49
50
|
) -> None: ...
|
|
@@ -56,6 +57,7 @@ class BedrockProvider(Provider[BaseClient]):
|
|
|
56
57
|
aws_access_key_id: str | None = None,
|
|
57
58
|
aws_secret_access_key: str | None = None,
|
|
58
59
|
aws_session_token: str | None = None,
|
|
60
|
+
profile_name: str | None = None,
|
|
59
61
|
aws_read_timeout: float | None = None,
|
|
60
62
|
aws_connect_timeout: float | None = None,
|
|
61
63
|
) -> None:
|
|
@@ -67,6 +69,7 @@ class BedrockProvider(Provider[BaseClient]):
|
|
|
67
69
|
aws_access_key_id: The AWS access key ID.
|
|
68
70
|
aws_secret_access_key: The AWS secret access key.
|
|
69
71
|
aws_session_token: The AWS session token.
|
|
72
|
+
profile_name: The AWS profile name.
|
|
70
73
|
aws_read_timeout: The read timeout for Bedrock client.
|
|
71
74
|
aws_connect_timeout: The connect timeout for Bedrock client.
|
|
72
75
|
"""
|
|
@@ -76,12 +79,15 @@ class BedrockProvider(Provider[BaseClient]):
|
|
|
76
79
|
try:
|
|
77
80
|
read_timeout = aws_read_timeout or float(os.getenv('AWS_READ_TIMEOUT', 300))
|
|
78
81
|
connect_timeout = aws_connect_timeout or float(os.getenv('AWS_CONNECT_TIMEOUT', 60))
|
|
79
|
-
|
|
80
|
-
'bedrock-runtime',
|
|
82
|
+
session = boto3.Session(
|
|
81
83
|
aws_access_key_id=aws_access_key_id,
|
|
82
84
|
aws_secret_access_key=aws_secret_access_key,
|
|
83
85
|
aws_session_token=aws_session_token,
|
|
84
86
|
region_name=region_name,
|
|
87
|
+
profile_name=profile_name,
|
|
88
|
+
)
|
|
89
|
+
self._client = session.client( # type: ignore[reportUnknownMemberType]
|
|
90
|
+
'bedrock-runtime',
|
|
85
91
|
config=Config(read_timeout=read_timeout, connect_timeout=connect_timeout),
|
|
86
92
|
)
|
|
87
93
|
except NoRegionError as exc: # pragma: no cover
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydantic-ai-slim
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Agent Framework / shim to use Pydantic with LLMs, slim package
|
|
5
5
|
Author-email: Samuel Colvin <samuel@pydantic.dev>, Marcelo Trylesinski <marcelotryle@gmail.com>, David Montague <david@pydantic.dev>, Alex Hall <alex@pydantic.dev>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -29,7 +29,7 @@ Requires-Dist: exceptiongroup; python_version < '3.11'
|
|
|
29
29
|
Requires-Dist: griffe>=1.3.2
|
|
30
30
|
Requires-Dist: httpx>=0.27
|
|
31
31
|
Requires-Dist: opentelemetry-api>=1.28.0
|
|
32
|
-
Requires-Dist: pydantic-graph==0.2.
|
|
32
|
+
Requires-Dist: pydantic-graph==0.2.2
|
|
33
33
|
Requires-Dist: pydantic>=2.10
|
|
34
34
|
Requires-Dist: typing-inspection>=0.4.0
|
|
35
35
|
Provides-Extra: anthropic
|
|
@@ -45,7 +45,7 @@ Requires-Dist: cohere>=5.13.11; (platform_system != 'Emscripten') and extra == '
|
|
|
45
45
|
Provides-Extra: duckduckgo
|
|
46
46
|
Requires-Dist: duckduckgo-search>=7.0.0; extra == 'duckduckgo'
|
|
47
47
|
Provides-Extra: evals
|
|
48
|
-
Requires-Dist: pydantic-evals==0.2.
|
|
48
|
+
Requires-Dist: pydantic-evals==0.2.2; extra == 'evals'
|
|
49
49
|
Provides-Extra: groq
|
|
50
50
|
Requires-Dist: groq>=0.15.0; extra == 'groq'
|
|
51
51
|
Provides-Extra: logfire
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
pydantic_ai/__init__.py,sha256=5flxyMQJVrHRMQ3MYaZf1el2ctNs0JmPClKbw2Q-Lsk,1160
|
|
2
2
|
pydantic_ai/__main__.py,sha256=Q_zJU15DUA01YtlJ2mnaLCoId2YmgmreVEERGuQT-Y0,132
|
|
3
3
|
pydantic_ai/_agent_graph.py,sha256=28JXHfSU78tBWZJr3ZES6gWB5wZoevyk8rMlbHDHfFc,35145
|
|
4
|
-
pydantic_ai/_cli.py,sha256=
|
|
4
|
+
pydantic_ai/_cli.py,sha256=tCUKc3wDOdH4uFb2XIoeKFIPZD7_MM1Mb-GNiEQKtoM,12266
|
|
5
5
|
pydantic_ai/_griffe.py,sha256=Sf_DisE9k2TA0VFeVIK2nf1oOct5MygW86PBCACJkFA,5244
|
|
6
6
|
pydantic_ai/_output.py,sha256=w_kBc5Lx5AmI0APbohxxYgpFd5VAwh6K0IjP7QIOu9U,11209
|
|
7
7
|
pydantic_ai/_parts_manager.py,sha256=kG4xynxXHAr9uGFwCVqqhsGCac5a_UjFdRBucoTCXEE,12189
|
|
8
8
|
pydantic_ai/_pydantic.py,sha256=1EO1tv-ULj3l_L1qMcC7gIOKTL2e2a-xTbUD_kqKiOg,8921
|
|
9
9
|
pydantic_ai/_system_prompt.py,sha256=602c2jyle2R_SesOrITBDETZqsLk4BZ8Cbo8yEhmx04,1120
|
|
10
10
|
pydantic_ai/_utils.py,sha256=Vlww1AMQMTvFfGRlFKAyvl4VrE24Lk1MH28EwVTWy8c,10122
|
|
11
|
-
pydantic_ai/agent.py,sha256=
|
|
11
|
+
pydantic_ai/agent.py,sha256=fzoQAvgUa6RmeQo4YFidkdiSt04e5ckp6Hxa_m5a0Rg,91934
|
|
12
12
|
pydantic_ai/exceptions.py,sha256=1ujJeB3jDDQ-pH5ydBYrgStvR35-GlEW0bYGTGEr4ME,3127
|
|
13
13
|
pydantic_ai/format_as_xml.py,sha256=IINfh1evWDphGahqHNLBArB5dQ4NIqS3S-kru35ztGg,372
|
|
14
14
|
pydantic_ai/format_prompt.py,sha256=qdKep95Sjlr7u1-qag4JwPbjoURbG0GbeU_l5ODTNw4,4466
|
|
15
15
|
pydantic_ai/mcp.py,sha256=UsiBsg2ZuFh0OTMc-tvvxzfyW9YiPSIe6h8_KGloxqI,11312
|
|
16
|
-
pydantic_ai/messages.py,sha256=
|
|
16
|
+
pydantic_ai/messages.py,sha256=d6r41kHUF13ctpF5rFG11BK3Idj6ecH9JbKiQvDdgnA,30827
|
|
17
17
|
pydantic_ai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
pydantic_ai/result.py,sha256=DgoUd0LqNd9DWPab6iwculKYvZ5JZHuGvToj0kkibvs,27625
|
|
19
19
|
pydantic_ai/settings.py,sha256=U2XzZ9y1fIi_L6yCGTugZRxfk7_01rk5GKSgFqySHL4,3520
|
|
@@ -24,7 +24,7 @@ pydantic_ai/common_tools/duckduckgo.py,sha256=Ty9tu1rCwMfGKgz1JAaC2q_4esmL6QvpkH
|
|
|
24
24
|
pydantic_ai/common_tools/tavily.py,sha256=Q1xxSF5HtXAaZ10Pp-OaDOHXwJf2mco9wScGEQXD7E4,2495
|
|
25
25
|
pydantic_ai/models/__init__.py,sha256=JJTqwoqTUIfDS4GoA5F82ccjBCunwnX-GwQ_KODhHB4,19949
|
|
26
26
|
pydantic_ai/models/_json_schema.py,sha256=RD0cIU9mOGIdRuhkjLtPdlwfmF8XDOP1kLevIOLudaE,6540
|
|
27
|
-
pydantic_ai/models/anthropic.py,sha256=
|
|
27
|
+
pydantic_ai/models/anthropic.py,sha256=0w2-XbyCTJquq8tcQzQdSiYMW3IOaWUgUiMKa0ycjhI,20952
|
|
28
28
|
pydantic_ai/models/bedrock.py,sha256=BZcgFzhM1MzQLgzkDrtIJXTZzmcfCruDlGPOi-f1vfA,26098
|
|
29
29
|
pydantic_ai/models/cohere.py,sha256=QXR3y8qTXkmTMVa_f0p-B0aUlqX_LEYt5x73SVzbbUI,11766
|
|
30
30
|
pydantic_ai/models/fallback.py,sha256=AFLfpLIne56O3sjhMQANL3-RfTBli10g42D6fkpjE-c,4940
|
|
@@ -39,7 +39,7 @@ pydantic_ai/models/wrapper.py,sha256=_NUXpLFkJw90Ngq-hSS23vfEzWTPNCiJdeA5HTfLlyY
|
|
|
39
39
|
pydantic_ai/providers/__init__.py,sha256=5NQ-LxVNGYXXcq1QaWua2Y8_QuA2GfiV852dtNRBMps,2572
|
|
40
40
|
pydantic_ai/providers/anthropic.py,sha256=0WzWEDseBaJ5eyEatvnDXBtDZKA9-od4BuPZn9NoTPw,2812
|
|
41
41
|
pydantic_ai/providers/azure.py,sha256=6liJWEgz5uHN1xkDG3J7aiMjL_twWuW7h51-RC3cLvo,4205
|
|
42
|
-
pydantic_ai/providers/bedrock.py,sha256=
|
|
42
|
+
pydantic_ai/providers/bedrock.py,sha256=fHw3wF0qq-y0BmWfCxAX9ezQGAgeSkOtYyIS7-nT7bo,3454
|
|
43
43
|
pydantic_ai/providers/cohere.py,sha256=WOFZCllgVbWciF4nNkG3pCqw4poy57VEGyux2mVntbQ,2667
|
|
44
44
|
pydantic_ai/providers/deepseek.py,sha256=_5JPzDGWsyVyTBX-yYYdy5aZwUOWNCVgoWI-UoBamms,2193
|
|
45
45
|
pydantic_ai/providers/google_gla.py,sha256=MJM7aRZRdP4kFlNg0ZHgC95O0wH02OQgbNiDQeK9fZo,1600
|
|
@@ -47,7 +47,7 @@ pydantic_ai/providers/google_vertex.py,sha256=WAwPxKTARVzs8DFs2veEUOJSur0krDOo9-
|
|
|
47
47
|
pydantic_ai/providers/groq.py,sha256=DoY6qkfhuemuKB5JXhUkqG-3t1HQkxwSXoE_kHQIAK0,2788
|
|
48
48
|
pydantic_ai/providers/mistral.py,sha256=FAS7yKn26yWy7LTmEiBSvqe0HpTXi8_nIf824vE6RFQ,2892
|
|
49
49
|
pydantic_ai/providers/openai.py,sha256=ePF-QWwLkGkSE5w245gTTDVR3VoTIUqFoIhQ0TAoUiA,2866
|
|
50
|
-
pydantic_ai_slim-0.2.
|
|
51
|
-
pydantic_ai_slim-0.2.
|
|
52
|
-
pydantic_ai_slim-0.2.
|
|
53
|
-
pydantic_ai_slim-0.2.
|
|
50
|
+
pydantic_ai_slim-0.2.2.dist-info/METADATA,sha256=xG01EN4b9lpWtfNjclQQCv_sZzOLSVj9NgtKS3hIFQU,3680
|
|
51
|
+
pydantic_ai_slim-0.2.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
52
|
+
pydantic_ai_slim-0.2.2.dist-info/entry_points.txt,sha256=kbKxe2VtDCYS06hsI7P3uZGxcVC08-FPt1rxeiMpIps,50
|
|
53
|
+
pydantic_ai_slim-0.2.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|