Skip to content

Commit 5ee12e0

Browse files
committed
fix: use just print, change example output to quote
1 parent b701d79 commit 5ee12e0

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

docs/examples/data-analyst.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ python/uv-run -m pydantic_ai_examples.data_analyst
2828

2929
Output (debug):
3030

31-
```
32-
examples/pydantic_ai_examples/data_analyst.py:103 <module>
33-
result.output: (
34-
'Based on my analysis of the cornell-movie-review-data/rotten_tomatoes dataset, there are **4,265 negative com'
35-
'ments** in the training split. The dataset is balanced, with an equal number of positive comments.'
36-
) (str) len=207
37-
```
31+
32+
> Based on my analysis of the Cornell Movie Review dataset (rotten_tomatoes), there are **4,265 negative comments** in the training split. These are the reviews labeled as 'neg' (represented by 0 in the dataset).
33+
3834

3935

4036
## Example Code
@@ -46,8 +42,7 @@ examples/pydantic_ai_examples/data_analyst.py:103 <module>
4642

4743
### Choosing a Model
4844

49-
This example requires using a model that understands DuckDB SQL. I am using
50-
Anthropic Claude 3.7. You can use other models but check with `clai`:
45+
This example requires using a model that understands DuckDB SQL. You can check with `clai`:
5146

5247
```sh
5348
> clai -m bedrock:us.anthropic.claude-3-7-sonnet-20250219-v1:0

examples/pydantic_ai_examples/data_analyst.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import datasets
44
import duckdb
55
import pandas as pd
6-
from devtools import debug
76

87
from pydantic_ai import Agent, ModelRetry, RunContext
98

@@ -105,4 +104,4 @@ def display(ctx: RunContext[AnalystAgentDeps], name: str) -> str:
105104
user_prompt='Count how many negative comments are there in the dataset `cornell-movie-review-data/rotten_tomatoes`',
106105
deps=deps,
107106
)
108-
debug(result.output)
107+
print(result.output)

0 commit comments

Comments
 (0)