-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Docs: add docs and tests for RunContext.partial_output in output tools
#3726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Docs: add docs and tests for RunContext.partial_output in output tools
#3726
Conversation
|
When I was working on tests, I discovered that It seems this is what was discussed in #3393 (comment), so it does not deserve a new issue? Here are the tests that demonstrate bugged behavior: link Should I include the failing streaming test with |
|
About tests: I created a new class designed to test Here are the changes: test_output_validator_partial_sync before: pydantic-ai/tests/test_agent.py Lines 363 to 377 in ccefddc
after: test_agent.py::TestPartialOutput::test_output_validator_texthttps://github.com/Danipulok/pydantic-ai/blob/d08191ee0e84ea2ae54fd4c28e8d5076986c281e/tests/test_agent.py#L370-L387 test_output_validator_partial_stream_text pydantic-ai/tests/test_agent.py Lines 380 to 409 in ccefddc
after: test_streaming.py::TestPartialOutput::test_output_validator_texthttps://github.com/Danipulok/pydantic-ai/blob/d08191ee0e84ea2ae54fd4c28e8d5076986c281e/tests/test_streaming.py#L762-L789 test_output_validator_partial_stream_output before: pydantic-ai/tests/test_agent.py Lines 412 to 439 in ccefddc
after: test_streaming.py::TestPartialOutput::test_output_validator_structuredhttps://github.com/Danipulok/pydantic-ai/blob/d08191ee0e84ea2ae54fd4c28e8d5076986c281e/tests/test_streaming.py#L791-L818 |
Closes #3624