Skip to content

Commit f77fcda

Browse files
committed
simplify docs
1 parent 8510b87 commit f77fcda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/output.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,9 +472,9 @@ _(This example is complete, it can be run "as is")_
472472

473473
#### Partial validation during streaming {#partial-validation}
474474

475-
When [streaming responses](#streaming-model-responses), output validators are called multiple times - once for each partial response and once for the final response. By default, validators receive `allow_partial=False`, meaning they treat all responses the same way.
475+
When [streaming responses](#streaming-model-responses), you can pass allow_partial=True to validate_response_output to make Pydantic output validators use partial validation.
476476

477-
However, you can add a `partial: bool` parameter as the last argument to your validator to distinguish between partial and final validation. This is useful when you want to skip expensive validation during streaming but apply full validation to the final result:
477+
By adding a `partial: bool` parameter as the last argument, you can access this information within output validator functions as well.
478478

479479
```python
480480
from pydantic_ai import Agent, ModelRetry, RunContext

0 commit comments

Comments
 (0)