ThyTran1402 opened a new pull request, #813: URL: https://github.com/apache/burr/pull/813
[Short description explaining the high-level reason for the pull request] Extends the `@streaming_action.pydantic()` decorator to accept union types (e.g., `Model1 | Model2` or `Union[Model1, Model2]`) for the `stream_type` parameter. Previously, only single BaseModel types or `dict` were accepted, limiting flexibility for streaming actions that yield multiple result types. ## Changes - **burr/core/action.py** - **burr/integrations/pydantic.py**: - **tests/integrations/test_streaming_union_types.py** ## How I tested this **Unit Tests**: Created comprehensive test suite with 10 tests that all pass ## Notes Resolved: #607 ## Checklist - [ ] PR has an informative and human-readable title (this will be pulled into the release notes) - [ ] Changes are limited to a single goal (no scope creep) - [ ] Code passed the pre-commit check & code is left cleaner/nicer than when first encountered. - [ ] Any _change_ in functionality is tested - [ ] New functions are documented (with a description, list of inputs, and expected output) - [ ] Placeholder code is flagged / future TODOs are captured in comments - [ ] Project documentation has been updated if adding/changing functionality. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
