pydantic-ai-examples 0.2.11__py3-none-any.whl → 0.2.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.

Potentially problematic release.


This version of pydantic-ai-examples might be problematic. Click here for more details.

@@ -92,7 +92,7 @@ class InvalidRequest(BaseModel):
92
92
 
93
93
 
94
94
  Response: TypeAlias = Union[Success, InvalidRequest]
95
- agent: Agent[Deps, Response] = Agent(
95
+ agent = Agent[Deps, Response](
96
96
  'google-gla:gemini-1.5-flash',
97
97
  # Type ignore while we wait for PEP-0747, nonetheless unions will work fine everywhere else
98
98
  output_type=Response, # type: ignore
@@ -33,16 +33,12 @@ async def stream_from_agent(prompt: str, chatbot: list[dict], past_messages: lis
33
33
  for message in result.new_messages():
34
34
  for call in message.parts:
35
35
  if isinstance(call, ToolCallPart):
36
- call_args = (
37
- call.args.args_json
38
- if hasattr(call.args, 'args_json')
39
- else json.dumps(call.args.args_dict)
40
- )
36
+ call_args = call.args_as_json_str()
41
37
  metadata = {
42
38
  'title': f'🛠️ Using {TOOL_TO_DISPLAY_NAME[call.tool_name]}',
43
39
  }
44
40
  if call.tool_call_id is not None:
45
- metadata['id'] = {call.tool_call_id}
41
+ metadata['id'] = call.tool_call_id
46
42
 
47
43
  gr_message = {
48
44
  'role': 'assistant',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-ai-examples
3
- Version: 0.2.11
3
+ Version: 0.2.13
4
4
  Summary: Examples of how to use PydanticAI and what it can do.
5
5
  Author-email: Samuel Colvin <samuel@pydantic.dev>
6
6
  License-Expression: MIT
@@ -31,8 +31,8 @@ Requires-Dist: fastapi>=0.115.4
31
31
  Requires-Dist: gradio>=5.9.0; python_version > '3.9'
32
32
  Requires-Dist: logfire[asyncpg,fastapi,httpx,sqlite3]>=2.6
33
33
  Requires-Dist: mcp[cli]>=1.4.1; python_version >= '3.10'
34
- Requires-Dist: pydantic-ai-slim[anthropic,groq,openai,vertexai]==0.2.11
35
- Requires-Dist: pydantic-evals==0.2.11
34
+ Requires-Dist: pydantic-ai-slim[anthropic,groq,openai,vertexai]==0.2.13
35
+ Requires-Dist: pydantic-evals==0.2.13
36
36
  Requires-Dist: python-multipart>=0.0.17
37
37
  Requires-Dist: rich>=13.9.2
38
38
  Requires-Dist: uvicorn>=0.32.0
@@ -8,11 +8,11 @@ pydantic_ai_examples/pydantic_model.py,sha256=veskNKY-PaPGYkWkTfjLGKfF_fvGh09fJ2
8
8
  pydantic_ai_examples/question_graph.py,sha256=POIBYGNDRyqAg08ReglBPcAZAcqHJMdcpCA2VOwiWNw,5107
9
9
  pydantic_ai_examples/rag.py,sha256=mFEnJqofVbx_1jru2FZWgskfyDP965IFfanwSlbQzMs,8005
10
10
  pydantic_ai_examples/roulette_wheel.py,sha256=WUPklPKsnmJy-NoPY20mC-AI0820T-YMAYvAljKyiOc,1653
11
- pydantic_ai_examples/sql_gen.py,sha256=-p87HJ8RNO4JmnrVkdbNDJB7nej-V0TxMX37iihkewM,5207
11
+ pydantic_ai_examples/sql_gen.py,sha256=x-vRRDe93DRW83RWgirXkQdthMFwSGcHm0VIoBgvdaE,5200
12
12
  pydantic_ai_examples/stream_markdown.py,sha256=4YcUIXI29gwV5rgUb-u7uaf6el7FxfsY9Rcoo1t2_EA,2447
13
13
  pydantic_ai_examples/stream_whales.py,sha256=WqadBOTe15B_QW8Z6TaWkK2G7Abl5llBbTGjtaI2D1s,3229
14
14
  pydantic_ai_examples/weather_agent.py,sha256=ALacJXoGhCHiGEWMsT-fvshKY2Z9pDjcZxcbVbGcrek,4931
15
- pydantic_ai_examples/weather_agent_gradio.py,sha256=0Of2pYrT1H-qt2NjBXzLovI-1D_nl-afRtIBPJ9xTZM,4893
15
+ pydantic_ai_examples/weather_agent_gradio.py,sha256=k3ORCcOMt_rp7WZuzChyRq_vFGFtKaiqTBxmjm8NGF4,4727
16
16
  pydantic_ai_examples/evals/__init__.py,sha256=4f1v2o4F-gnUVtlkZU-dpwwwbLhqRxMcZv676atjNLg,115
17
17
  pydantic_ai_examples/evals/agent.py,sha256=KjCsUiL28RCNT6NwoQnQCwJ0xRw3EUGdIrYhlIjmVqI,2042
18
18
  pydantic_ai_examples/evals/custom_evaluators.py,sha256=Uz37_wbT4uA6s9fl46nTsH3NQKyS1KamMPPP860stww,2245
@@ -25,7 +25,7 @@ pydantic_ai_examples/evals/datasets/time_range_v1.yaml,sha256=pSUawuDen4NQt2RqqJ
25
25
  pydantic_ai_examples/evals/datasets/time_range_v1_schema.json,sha256=xS-wRRSvcoG2FcQZGdL0i332mbjsZh9MOSJAND6VkWU,19932
26
26
  pydantic_ai_examples/evals/datasets/time_range_v2.yaml,sha256=zIffxC5bR2l05MrrECJsTHiagFaz8nIPTH-YrmjJz8I,4326
27
27
  pydantic_ai_examples/evals/datasets/time_range_v2_schema.json,sha256=GDbDtBH1skdbUzK5Wd_0-SNXTmEWHMTYhhshaLsq_1Q,21309
28
- pydantic_ai_examples-0.2.11.dist-info/METADATA,sha256=JY2rGqBQZENz08MZOl33Q-xV3g-CsghCsUmiFB-kXpU,2573
29
- pydantic_ai_examples-0.2.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
- pydantic_ai_examples-0.2.11.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
31
- pydantic_ai_examples-0.2.11.dist-info/RECORD,,
28
+ pydantic_ai_examples-0.2.13.dist-info/METADATA,sha256=3CtuaNmuAqPOP0QlUc6QUrU6M3pTmFnqdHURBiIMMx8,2573
29
+ pydantic_ai_examples-0.2.13.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
30
+ pydantic_ai_examples-0.2.13.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
31
+ pydantic_ai_examples-0.2.13.dist-info/RECORD,,