pydantic-ai-slim 0.1.4__py3-none-any.whl → 0.1.6__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/messages.py CHANGED
@@ -327,11 +327,18 @@ class UserPromptPart:
327
327
  """Part type identifier, this is available on all parts as a discriminator."""
328
328
 
329
329
  def otel_event(self) -> Event:
330
+ content: str | list[dict[str, Any] | str]
330
331
  if isinstance(self.content, str):
331
332
  content = self.content
332
333
  else:
333
- # TODO figure out what to record for images and audio
334
- content = [part if isinstance(part, str) else {'kind': part.kind} for part in self.content]
334
+ content = []
335
+ for part in self.content:
336
+ if isinstance(part, str):
337
+ content.append(part)
338
+ elif isinstance(part, (ImageUrl, AudioUrl, DocumentUrl, VideoUrl)):
339
+ content.append({'kind': part.kind, 'url': part.url})
340
+ else:
341
+ content.append({'kind': part.kind})
335
342
  return Event('gen_ai.user.message', body={'content': content, 'role': 'user'})
336
343
 
337
344
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-ai-slim
3
- Version: 0.1.4
3
+ Version: 0.1.6
4
4
  Summary: Agent Framework / shim to use Pydantic with LLMs, slim package
5
5
  Author-email: Samuel Colvin <samuel@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.1.4
32
+ Requires-Dist: pydantic-graph==0.1.6
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.1.4; extra == 'evals'
48
+ Requires-Dist: pydantic-evals==0.1.6; extra == 'evals'
49
49
  Provides-Extra: groq
50
50
  Requires-Dist: groq>=0.15.0; extra == 'groq'
51
51
  Provides-Extra: logfire
@@ -60,7 +60,7 @@ Provides-Extra: tavily
60
60
  Requires-Dist: tavily-python>=0.5.0; extra == 'tavily'
61
61
  Provides-Extra: vertexai
62
62
  Requires-Dist: google-auth>=2.36.0; extra == 'vertexai'
63
- Requires-Dist: requests>=2.32.3; extra == 'vertexai'
63
+ Requires-Dist: requests>=2.32.2; extra == 'vertexai'
64
64
  Description-Content-Type: text/markdown
65
65
 
66
66
  # PydanticAI Slim
@@ -13,7 +13,7 @@ pydantic_ai/exceptions.py,sha256=gvbFsFkAzSXOo_d1nfjy09kDHUGv1j5q70Uk-wKYGi8,316
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=l33wV5JaZTXBYEHMxfdFP2e5SlqGw_D7bB90zDNKAdA,9440
16
- pydantic_ai/messages.py,sha256=q85oSf9GtjUlhXywgo--SrBWD-br6X2hQF8DrJvuY0U,29852
16
+ pydantic_ai/messages.py,sha256=qA9X0GVS-EL3e-1XliQylcNllp3bE3R5iEJP6tywq5c,30113
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=n-Y69s0Tkbo2k65ZwNmIu1nMypO9HadqUDLjZgGQS_Q,3374
@@ -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=fcR1uSwORo0jtevX7-wOjvcfT8ojMAaKY81uN5uYymM,2661
49
49
  pydantic_ai/providers/openai.py,sha256=ePF-QWwLkGkSE5w245gTTDVR3VoTIUqFoIhQ0TAoUiA,2866
50
- pydantic_ai_slim-0.1.4.dist-info/METADATA,sha256=qS0LDBW0o7TNS_Fr1APWd_VXd6VqpsKPsPCMHJKgAos,3551
51
- pydantic_ai_slim-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
- pydantic_ai_slim-0.1.4.dist-info/entry_points.txt,sha256=KxQSmlMS8GMTkwTsl4_q9a5nJvBjj3HWeXx688wLrKg,45
53
- pydantic_ai_slim-0.1.4.dist-info/RECORD,,
50
+ pydantic_ai_slim-0.1.6.dist-info/METADATA,sha256=0I0zU3NYVVy2Y9Is8XbTTKzmAdITG0ofCyyWuQqlXQQ,3551
51
+ pydantic_ai_slim-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
+ pydantic_ai_slim-0.1.6.dist-info/entry_points.txt,sha256=KxQSmlMS8GMTkwTsl4_q9a5nJvBjj3HWeXx688wLrKg,45
53
+ pydantic_ai_slim-0.1.6.dist-info/RECORD,,