pydantic-ai 0.4.3__py3-none-any.whl → 0.4.5__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 might be problematic. Click here for more details.

README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  <a href="https://ai.pydantic.dev/">
3
3
  <picture>
4
4
  <source media="(prefers-color-scheme: dark)" srcset="https://ai.pydantic.dev/img/pydantic-ai-dark.svg">
5
- <img src="https://ai.pydantic.dev/img/pydantic-ai-light.svg" alt="PydanticAI">
5
+ <img src="https://ai.pydantic.dev/img/pydantic-ai-light.svg" alt="Pydantic AI">
6
6
  </picture>
7
7
  </a>
8
8
  </div>
@@ -24,47 +24,47 @@
24
24
 
25
25
  ---
26
26
 
27
- PydanticAI is a Python agent framework designed to make it less painful to build production grade applications with Generative AI.
27
+ Pydantic AI is a Python agent framework designed to make it less painful to build production grade applications with Generative AI.
28
28
 
29
- FastAPI revolutionized web development by offering an innovative and ergonomic design, built on the foundation of [Pydantic](https://docs.pydantic.dev).
29
+ FastAPI revolutionized web development by offering an innovative and ergonomic design, built on the foundation of [Pydantic Validation](https://docs.pydantic.dev).
30
30
 
31
- Similarly, virtually every agent framework and LLM library in Python uses Pydantic, yet when we began to use LLMs in [Pydantic Logfire](https://pydantic.dev/logfire), we couldn't find anything that gave us the same feeling.
31
+ Similarly, virtually every agent framework and LLM library in Python uses Pydantic Validation, yet when we began to use LLMs in [Pydantic Logfire](https://pydantic.dev/logfire), we couldn't find anything that gave us the same feeling.
32
32
 
33
- We built PydanticAI with one simple aim: to bring that FastAPI feeling to GenAI app development.
33
+ We built Pydantic AI with one simple aim: to bring that FastAPI feeling to GenAI app development.
34
34
 
35
- ## Why use PydanticAI
35
+ ## Why use Pydantic AI
36
36
 
37
- * __Built by the Pydantic Team__
38
- Built by the team behind [Pydantic](https://docs.pydantic.dev/latest/) (the validation layer of the OpenAI SDK, the Anthropic SDK, LangChain, LlamaIndex, AutoGPT, Transformers, CrewAI, Instructor and many more).
37
+ - **Built by the Pydantic Team**
38
+ Built by the team behind [Pydantic Validation](https://docs.pydantic.dev/latest/) (the validation layer of the OpenAI SDK, the Anthropic SDK, LangChain, LlamaIndex, AutoGPT, Transformers, CrewAI, Instructor and many more).
39
39
 
40
- * __Model-agnostic__
41
- Supports OpenAI, Anthropic, Gemini, Deepseek, Ollama, Groq, Cohere, and Mistral, and there is a simple interface to implement support for [other models](https://ai.pydantic.dev/models/).
40
+ - **Model-agnostic**
41
+ Supports OpenAI, Anthropic, Gemini, Deepseek, Ollama, Groq, Cohere, and Mistral, and there is a simple interface to implement support for [other models](https://ai.pydantic.dev/models/).
42
42
 
43
- * __Pydantic Logfire Integration__
44
- Seamlessly [integrates](https://ai.pydantic.dev/logfire/) with [Pydantic Logfire](https://pydantic.dev/logfire) for real-time debugging, performance monitoring, and behavior tracking of your LLM-powered applications.
43
+ - **Pydantic Logfire Integration**
44
+ Seamlessly [integrates](https://ai.pydantic.dev/logfire/) with [Pydantic Logfire](https://pydantic.dev/logfire) for real-time debugging, performance monitoring, and behavior tracking of your LLM-powered applications.
45
45
 
46
- * __Type-safe__
47
- Designed to make [type checking](https://ai.pydantic.dev/agents/#static-type-checking) as powerful and informative as possible for you.
46
+ - **Type-safe**
47
+ Designed to make [type checking](https://ai.pydantic.dev/agents/#static-type-checking) as powerful and informative as possible for you.
48
48
 
49
- * __Python-centric Design__
50
- Leverages Python's familiar control flow and agent composition to build your AI-driven projects, making it easy to apply standard Python best practices you'd use in any other (non-AI) project.
49
+ - **Python-centric Design**
50
+ Leverages Python's familiar control flow and agent composition to build your AI-driven projects, making it easy to apply standard Python best practices you'd use in any other (non-AI) project.
51
51
 
52
- * __Structured Responses__
53
- Harnesses the power of [Pydantic](https://docs.pydantic.dev/latest/) to [validate and structure](https://ai.pydantic.dev/output/#structured-output) model outputs, ensuring responses are consistent across runs.
52
+ - **Structured Responses**
53
+ Harnesses the power of [Pydantic Validation](https://docs.pydantic.dev/latest/) to [validate and structure](https://ai.pydantic.dev/output/#structured-output) model outputs, ensuring responses are consistent across runs.
54
54
 
55
- * __Dependency Injection System__
56
- Offers an optional [dependency injection](https://ai.pydantic.dev/dependencies/) system to provide data and services to your agent's [system prompts](https://ai.pydantic.dev/agents/#system-prompts), [tools](https://ai.pydantic.dev/tools/) and [output validators](https://ai.pydantic.dev/output/#output-validator-functions).
57
- This is useful for testing and eval-driven iterative development.
55
+ - **Dependency Injection System**
56
+ Offers an optional [dependency injection](https://ai.pydantic.dev/dependencies/) system to provide data and services to your agent's [system prompts](https://ai.pydantic.dev/agents/#system-prompts), [tools](https://ai.pydantic.dev/tools/) and [output validators](https://ai.pydantic.dev/output/#output-validator-functions).
57
+ This is useful for testing and eval-driven iterative development.
58
58
 
59
- * __Streamed Responses__
60
- Provides the ability to [stream](https://ai.pydantic.dev/output/#streamed-results) LLM outputs continuously, with immediate validation, ensuring rapid and accurate outputs.
59
+ - **Streamed Responses**
60
+ Provides the ability to [stream](https://ai.pydantic.dev/output/#streamed-results) LLM outputs continuously, with immediate validation, ensuring rapid and accurate outputs.
61
61
 
62
- * __Graph Support__
63
- [Pydantic Graph](https://ai.pydantic.dev/graph) provides a powerful way to define graphs using typing hints, this is useful in complex applications where standard control flow can degrade to spaghetti code.
62
+ - **Graph Support**
63
+ [Pydantic Graph](https://ai.pydantic.dev/graph) provides a powerful way to define graphs using typing hints, this is useful in complex applications where standard control flow can degrade to spaghetti code.
64
64
 
65
65
  ## Hello World Example
66
66
 
67
- Here's a minimal example of PydanticAI:
67
+ Here's a minimal example of Pydantic AI:
68
68
 
69
69
  ```python
70
70
  from pydantic_ai import Agent
@@ -78,7 +78,7 @@ agent = Agent(
78
78
  )
79
79
 
80
80
  # Run the agent synchronously, conducting a conversation with the LLM.
81
- # Here the exchange should be very short: PydanticAI will send the system prompt and the user query to the LLM,
81
+ # Here the exchange should be very short: Pydantic AI will send the system prompt and the user query to the LLM,
82
82
  # the model will return a text response. See below for a more complex run.
83
83
  result = agent.run_sync('Where does "hello world" come from?')
84
84
  print(result.output)
@@ -93,7 +93,7 @@ Not very interesting yet, but we can easily add "tools", dynamic system prompts,
93
93
 
94
94
  ## Tools & Dependency Injection Example
95
95
 
96
- Here is a concise example using PydanticAI to build a support agent for a bank:
96
+ Here is a concise example using Pydantic AI to build a support agent for a bank:
97
97
 
98
98
  **(Better documented example [in the docs](https://ai.pydantic.dev/#tools-dependency-injection-example))**
99
99
 
@@ -187,8 +187,8 @@ async def main():
187
187
 
188
188
  ## Next Steps
189
189
 
190
- To try PydanticAI yourself, follow the instructions [in the examples](https://ai.pydantic.dev/examples/).
190
+ To try Pydantic AI yourself, follow the instructions [in the examples](https://ai.pydantic.dev/examples/).
191
191
 
192
- Read the [docs](https://ai.pydantic.dev/agents/) to learn more about building applications with PydanticAI.
192
+ Read the [docs](https://ai.pydantic.dev/agents/) to learn more about building applications with Pydantic AI.
193
193
 
194
- Read the [API Reference](https://ai.pydantic.dev/api/agent/) to understand PydanticAI's interface.
194
+ Read the [API Reference](https://ai.pydantic.dev/api/agent/) to understand Pydantic AI's interface.
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-ai
3
- Version: 0.4.3
3
+ Version: 0.4.5
4
4
  Summary: Agent Framework / shim to use Pydantic with LLMs
5
5
  Project-URL: Homepage, https://ai.pydantic.dev
6
6
  Project-URL: Source, https://github.com/pydantic/pydantic-ai
7
7
  Project-URL: Documentation, https://ai.pydantic.dev
8
8
  Project-URL: Changelog, https://github.com/pydantic/pydantic-ai/releases
9
- Author-email: Samuel Colvin <samuel@pydantic.dev>, Marcelo Trylesinski <marcelotryle@gmail.com>, David Montague <david@pydantic.dev>, Alex Hall <alex@pydantic.dev>
9
+ 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>
10
10
  License-Expression: MIT
11
11
  License-File: LICENSE
12
12
  Classifier: Development Status :: 4 - Beta
@@ -28,11 +28,11 @@ Classifier: Topic :: Internet
28
28
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
29
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
30
  Requires-Python: >=3.9
31
- Requires-Dist: pydantic-ai-slim[anthropic,bedrock,cli,cohere,evals,google,groq,huggingface,mcp,mistral,openai,vertexai]==0.4.3
31
+ Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,bedrock,cli,cohere,evals,google,groq,huggingface,mcp,mistral,openai,vertexai]==0.4.5
32
32
  Provides-Extra: a2a
33
33
  Requires-Dist: fasta2a>=0.4.1; extra == 'a2a'
34
34
  Provides-Extra: examples
35
- Requires-Dist: pydantic-ai-examples==0.4.3; extra == 'examples'
35
+ Requires-Dist: pydantic-ai-examples==0.4.5; extra == 'examples'
36
36
  Provides-Extra: logfire
37
37
  Requires-Dist: logfire>=3.11.0; extra == 'logfire'
38
38
  Description-Content-Type: text/markdown
@@ -41,7 +41,7 @@ Description-Content-Type: text/markdown
41
41
  <a href="https://ai.pydantic.dev/">
42
42
  <picture>
43
43
  <source media="(prefers-color-scheme: dark)" srcset="https://ai.pydantic.dev/img/pydantic-ai-dark.svg">
44
- <img src="https://ai.pydantic.dev/img/pydantic-ai-light.svg" alt="PydanticAI">
44
+ <img src="https://ai.pydantic.dev/img/pydantic-ai-light.svg" alt="Pydantic AI">
45
45
  </picture>
46
46
  </a>
47
47
  </div>
@@ -63,47 +63,47 @@ Description-Content-Type: text/markdown
63
63
 
64
64
  ---
65
65
 
66
- PydanticAI is a Python agent framework designed to make it less painful to build production grade applications with Generative AI.
66
+ Pydantic AI is a Python agent framework designed to make it less painful to build production grade applications with Generative AI.
67
67
 
68
- FastAPI revolutionized web development by offering an innovative and ergonomic design, built on the foundation of [Pydantic](https://docs.pydantic.dev).
68
+ FastAPI revolutionized web development by offering an innovative and ergonomic design, built on the foundation of [Pydantic Validation](https://docs.pydantic.dev).
69
69
 
70
- Similarly, virtually every agent framework and LLM library in Python uses Pydantic, yet when we began to use LLMs in [Pydantic Logfire](https://pydantic.dev/logfire), we couldn't find anything that gave us the same feeling.
70
+ Similarly, virtually every agent framework and LLM library in Python uses Pydantic Validation, yet when we began to use LLMs in [Pydantic Logfire](https://pydantic.dev/logfire), we couldn't find anything that gave us the same feeling.
71
71
 
72
- We built PydanticAI with one simple aim: to bring that FastAPI feeling to GenAI app development.
72
+ We built Pydantic AI with one simple aim: to bring that FastAPI feeling to GenAI app development.
73
73
 
74
- ## Why use PydanticAI
74
+ ## Why use Pydantic AI
75
75
 
76
- * __Built by the Pydantic Team__
77
- Built by the team behind [Pydantic](https://docs.pydantic.dev/latest/) (the validation layer of the OpenAI SDK, the Anthropic SDK, LangChain, LlamaIndex, AutoGPT, Transformers, CrewAI, Instructor and many more).
76
+ - **Built by the Pydantic Team**
77
+ Built by the team behind [Pydantic Validation](https://docs.pydantic.dev/latest/) (the validation layer of the OpenAI SDK, the Anthropic SDK, LangChain, LlamaIndex, AutoGPT, Transformers, CrewAI, Instructor and many more).
78
78
 
79
- * __Model-agnostic__
80
- Supports OpenAI, Anthropic, Gemini, Deepseek, Ollama, Groq, Cohere, and Mistral, and there is a simple interface to implement support for [other models](https://ai.pydantic.dev/models/).
79
+ - **Model-agnostic**
80
+ Supports OpenAI, Anthropic, Gemini, Deepseek, Ollama, Groq, Cohere, and Mistral, and there is a simple interface to implement support for [other models](https://ai.pydantic.dev/models/).
81
81
 
82
- * __Pydantic Logfire Integration__
83
- Seamlessly [integrates](https://ai.pydantic.dev/logfire/) with [Pydantic Logfire](https://pydantic.dev/logfire) for real-time debugging, performance monitoring, and behavior tracking of your LLM-powered applications.
82
+ - **Pydantic Logfire Integration**
83
+ Seamlessly [integrates](https://ai.pydantic.dev/logfire/) with [Pydantic Logfire](https://pydantic.dev/logfire) for real-time debugging, performance monitoring, and behavior tracking of your LLM-powered applications.
84
84
 
85
- * __Type-safe__
86
- Designed to make [type checking](https://ai.pydantic.dev/agents/#static-type-checking) as powerful and informative as possible for you.
85
+ - **Type-safe**
86
+ Designed to make [type checking](https://ai.pydantic.dev/agents/#static-type-checking) as powerful and informative as possible for you.
87
87
 
88
- * __Python-centric Design__
89
- Leverages Python's familiar control flow and agent composition to build your AI-driven projects, making it easy to apply standard Python best practices you'd use in any other (non-AI) project.
88
+ - **Python-centric Design**
89
+ Leverages Python's familiar control flow and agent composition to build your AI-driven projects, making it easy to apply standard Python best practices you'd use in any other (non-AI) project.
90
90
 
91
- * __Structured Responses__
92
- Harnesses the power of [Pydantic](https://docs.pydantic.dev/latest/) to [validate and structure](https://ai.pydantic.dev/output/#structured-output) model outputs, ensuring responses are consistent across runs.
91
+ - **Structured Responses**
92
+ Harnesses the power of [Pydantic Validation](https://docs.pydantic.dev/latest/) to [validate and structure](https://ai.pydantic.dev/output/#structured-output) model outputs, ensuring responses are consistent across runs.
93
93
 
94
- * __Dependency Injection System__
95
- Offers an optional [dependency injection](https://ai.pydantic.dev/dependencies/) system to provide data and services to your agent's [system prompts](https://ai.pydantic.dev/agents/#system-prompts), [tools](https://ai.pydantic.dev/tools/) and [output validators](https://ai.pydantic.dev/output/#output-validator-functions).
96
- This is useful for testing and eval-driven iterative development.
94
+ - **Dependency Injection System**
95
+ Offers an optional [dependency injection](https://ai.pydantic.dev/dependencies/) system to provide data and services to your agent's [system prompts](https://ai.pydantic.dev/agents/#system-prompts), [tools](https://ai.pydantic.dev/tools/) and [output validators](https://ai.pydantic.dev/output/#output-validator-functions).
96
+ This is useful for testing and eval-driven iterative development.
97
97
 
98
- * __Streamed Responses__
99
- Provides the ability to [stream](https://ai.pydantic.dev/output/#streamed-results) LLM outputs continuously, with immediate validation, ensuring rapid and accurate outputs.
98
+ - **Streamed Responses**
99
+ Provides the ability to [stream](https://ai.pydantic.dev/output/#streamed-results) LLM outputs continuously, with immediate validation, ensuring rapid and accurate outputs.
100
100
 
101
- * __Graph Support__
102
- [Pydantic Graph](https://ai.pydantic.dev/graph) provides a powerful way to define graphs using typing hints, this is useful in complex applications where standard control flow can degrade to spaghetti code.
101
+ - **Graph Support**
102
+ [Pydantic Graph](https://ai.pydantic.dev/graph) provides a powerful way to define graphs using typing hints, this is useful in complex applications where standard control flow can degrade to spaghetti code.
103
103
 
104
104
  ## Hello World Example
105
105
 
106
- Here's a minimal example of PydanticAI:
106
+ Here's a minimal example of Pydantic AI:
107
107
 
108
108
  ```python
109
109
  from pydantic_ai import Agent
@@ -117,7 +117,7 @@ agent = Agent(
117
117
  )
118
118
 
119
119
  # Run the agent synchronously, conducting a conversation with the LLM.
120
- # Here the exchange should be very short: PydanticAI will send the system prompt and the user query to the LLM,
120
+ # Here the exchange should be very short: Pydantic AI will send the system prompt and the user query to the LLM,
121
121
  # the model will return a text response. See below for a more complex run.
122
122
  result = agent.run_sync('Where does "hello world" come from?')
123
123
  print(result.output)
@@ -132,7 +132,7 @@ Not very interesting yet, but we can easily add "tools", dynamic system prompts,
132
132
 
133
133
  ## Tools & Dependency Injection Example
134
134
 
135
- Here is a concise example using PydanticAI to build a support agent for a bank:
135
+ Here is a concise example using Pydantic AI to build a support agent for a bank:
136
136
 
137
137
  **(Better documented example [in the docs](https://ai.pydantic.dev/#tools-dependency-injection-example))**
138
138
 
@@ -226,8 +226,8 @@ async def main():
226
226
 
227
227
  ## Next Steps
228
228
 
229
- To try PydanticAI yourself, follow the instructions [in the examples](https://ai.pydantic.dev/examples/).
229
+ To try Pydantic AI yourself, follow the instructions [in the examples](https://ai.pydantic.dev/examples/).
230
230
 
231
- Read the [docs](https://ai.pydantic.dev/agents/) to learn more about building applications with PydanticAI.
231
+ Read the [docs](https://ai.pydantic.dev/agents/) to learn more about building applications with Pydantic AI.
232
232
 
233
- Read the [API Reference](https://ai.pydantic.dev/api/agent/) to understand PydanticAI's interface.
233
+ Read the [API Reference](https://ai.pydantic.dev/api/agent/) to understand Pydantic AI's interface.
@@ -0,0 +1,6 @@
1
+ README.md,sha256=bRQiIpEWIZOUki4ChFf6CYLwyz1xpbVY-KELGDhaRKA,9980
2
+ pydantic_ai-0.4.5.dist-info/METADATA,sha256=xlmHsW9vZLDr6IwSeIuYGDGKfFfePE2GhI3cjrewLQ8,11885
3
+ pydantic_ai-0.4.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
+ pydantic_ai-0.4.5.dist-info/entry_points.txt,sha256=kbKxe2VtDCYS06hsI7P3uZGxcVC08-FPt1rxeiMpIps,50
5
+ pydantic_ai-0.4.5.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
6
+ pydantic_ai-0.4.5.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- README.md,sha256=TpI5kgS6AcvsZY8fEkrEml5sje6_gCDHMIzs_IwRIEI,9906
2
- pydantic_ai-0.4.3.dist-info/METADATA,sha256=t-LwNysng22ZZCuAetTluCWMjvvCsQV-IB6wdBAptZs,11772
3
- pydantic_ai-0.4.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
4
- pydantic_ai-0.4.3.dist-info/entry_points.txt,sha256=kbKxe2VtDCYS06hsI7P3uZGxcVC08-FPt1rxeiMpIps,50
5
- pydantic_ai-0.4.3.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
6
- pydantic_ai-0.4.3.dist-info/RECORD,,