pydantic-ai-examples 0.8.0__py3-none-any.whl → 0.8.1__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.

@@ -127,7 +127,7 @@ async def post_chat(
127
127
  messages = await database.get_messages()
128
128
  # run the agent with the user prompt and the chat history
129
129
  async with agent.run_stream(prompt, message_history=messages) as result:
130
- async for text in result.stream(debounce_by=0.01):
130
+ async for text in result.stream_output(debounce_by=0.01):
131
131
  # text here is a `str` and the frontend wants
132
132
  # JSON encoded ModelResponse, so we create one
133
133
  m = ModelResponse(parts=[TextPart(text)], timestamp=result.timestamp())
@@ -42,7 +42,7 @@ async def main():
42
42
  console.log(f'Using model: {model}')
43
43
  with Live('', console=console, vertical_overflow='visible') as live:
44
44
  async with agent.run_stream(prompt, model=model) as result:
45
- async for message in result.stream():
45
+ async for message in result.stream_output():
46
46
  live.update(Markdown(message))
47
47
  console.log(result.usage())
48
48
  else:
@@ -51,7 +51,7 @@ async def main():
51
51
  ) as result:
52
52
  console.print('Response:', style='green')
53
53
 
54
- async for whales in result.stream(debounce_by=0.01):
54
+ async for whales in result.stream_output(debounce_by=0.01):
55
55
  table = Table(
56
56
  title='Species of Whale',
57
57
  caption='Streaming Structured responses from GPT-4',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydantic-ai-examples
3
- Version: 0.8.0
3
+ Version: 0.8.1
4
4
  Summary: Examples of how to use Pydantic AI and what it can do.
5
5
  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>
6
6
  License-Expression: MIT
@@ -35,8 +35,8 @@ Requires-Dist: logfire[asyncpg,fastapi,httpx,sqlite3]>=3.14.1
35
35
  Requires-Dist: mcp[cli]>=1.4.1; python_version >= '3.10'
36
36
  Requires-Dist: modal>=1.0.4
37
37
  Requires-Dist: pandas>=2.2.3
38
- Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==0.8.0
39
- Requires-Dist: pydantic-evals==0.8.0
38
+ Requires-Dist: pydantic-ai-slim[ag-ui,anthropic,groq,openai,vertexai]==0.8.1
39
+ Requires-Dist: pydantic-evals==0.8.1
40
40
  Requires-Dist: python-multipart>=0.0.17
41
41
  Requires-Dist: rich>=13.9.2
42
42
  Requires-Dist: uvicorn>=0.32.0
@@ -1,7 +1,7 @@
1
1
  pydantic_ai_examples/__main__.py,sha256=i0LEo2JBOZ-gnHED0ou5Bya43gi7KmOyQ_jKN7M5Ces,1647
2
2
  pydantic_ai_examples/bank_support.py,sha256=vJL2zLEq19OztP1fUGG7_6cYHllvxvzkafFMqukimMo,2726
3
3
  pydantic_ai_examples/chat_app.html,sha256=90XhxrpDAT09mPVTn9edEn8PqAD-tHxWkeeMz9r_okQ,2580
4
- pydantic_ai_examples/chat_app.py,sha256=zrurOhwbjPDTYi9FkYZF3wMxc2AT9PFckM-xngQ5188,7105
4
+ pydantic_ai_examples/chat_app.py,sha256=3rfU8ZTG_F14KxPE9stb9aJ7LhPFOL_pK4APEnwcWoQ,7112
5
5
  pydantic_ai_examples/chat_app.ts,sha256=2KfZ2rJU2o0iCPjelyqEi5sH6vfemzWaa5Evx_VcAE4,3307
6
6
  pydantic_ai_examples/data_analyst.py,sha256=vSpfIWpxNgaZqKx2DJD721ZA3QgSjaZkTixy5OHz9xY,3753
7
7
  pydantic_ai_examples/flight_booking.py,sha256=YPCS6v6RtVggFawPMhAjTPFMuihPlecM5a5QB919Pqc,7450
@@ -11,8 +11,8 @@ pydantic_ai_examples/question_graph.py,sha256=POIBYGNDRyqAg08ReglBPcAZAcqHJMdcpC
11
11
  pydantic_ai_examples/rag.py,sha256=mFEnJqofVbx_1jru2FZWgskfyDP965IFfanwSlbQzMs,8005
12
12
  pydantic_ai_examples/roulette_wheel.py,sha256=2YHKbGzYOkLsd98hO3ntjM6pChR1UpmsRrLD36Qh5f0,1654
13
13
  pydantic_ai_examples/sql_gen.py,sha256=HLNR6-Ah_7T0IodE62Tk88-MP3_w_LOybTocyaIV3dU,5201
14
- pydantic_ai_examples/stream_markdown.py,sha256=-ucIev91GExnTuEokT54jq-feXXp2CUP7B_3lvt2l9I,2447
15
- pydantic_ai_examples/stream_whales.py,sha256=KC1oth1rMpFtS1-Tbc9EHMtt-BynahH_SGAEJD5sfIE,2714
14
+ pydantic_ai_examples/stream_markdown.py,sha256=rdhrR6XkqoeOpfv_xFbRpKDV4drEAd8ZrsFBXVrdvHs,2454
15
+ pydantic_ai_examples/stream_whales.py,sha256=Yoa7IuqN_6fowfYSINW39uPCthYu9FKChF-QBmQqWb8,2721
16
16
  pydantic_ai_examples/weather_agent.py,sha256=E42RbuVDJzxlBw9lF2ARNSNAhL1HWVEmTt5MN70DyDU,3187
17
17
  pydantic_ai_examples/weather_agent_gradio.py,sha256=WVoRqD74jEvGyUs5VHmsRIGduLMu2sP7GHvc3E79T6A,4521
18
18
  pydantic_ai_examples/ag_ui/__init__.py,sha256=ZZs2V-5e9RaLl_7hJAq9-0Juk_f0mk2Vr7a4QT2QB-k,1174
@@ -44,7 +44,7 @@ pydantic_ai_examples/slack_lead_qualifier/modal.py,sha256=f464AaeyP-n3UIfvEVVc4D
44
44
  pydantic_ai_examples/slack_lead_qualifier/models.py,sha256=WTp6D2WCASXqrjPVT3vGgTSYATLPBM3_cjq9wvXMRao,1586
45
45
  pydantic_ai_examples/slack_lead_qualifier/slack.py,sha256=VJVfMeUXYClWUJBLHNuaW8PB2sxjNzpTC-O_AJwcxQ4,833
46
46
  pydantic_ai_examples/slack_lead_qualifier/store.py,sha256=04vB4eZWKk_Tx0b9K4QuVI1U24JEyJyBS4X76cui7OI,896
47
- pydantic_ai_examples-0.8.0.dist-info/METADATA,sha256=6L50A8FglK6ivfk_m5dAlRphAPdb9SrjFs0SMOdc8-E,2846
48
- pydantic_ai_examples-0.8.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
- pydantic_ai_examples-0.8.0.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
50
- pydantic_ai_examples-0.8.0.dist-info/RECORD,,
47
+ pydantic_ai_examples-0.8.1.dist-info/METADATA,sha256=q4_0xcptzJ9JLMmg4_XvX8QX78nWDsLFllw1QKt8A80,2846
48
+ pydantic_ai_examples-0.8.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
49
+ pydantic_ai_examples-0.8.1.dist-info/licenses/LICENSE,sha256=vA6Jc482lEyBBuGUfD1pYx-cM7jxvLYOxPidZ30t_PQ,1100
50
+ pydantic_ai_examples-0.8.1.dist-info/RECORD,,