Is your feature request related to a problem? Please describe.
Currently, ByteStream and StreamingChunk are the only dataclasses that do not support serialization and deserialization. This creates inconsistencies and potential failures when these classes are used as inputs to breakpoints, which rely on schema utility functions to serialize and deserialize component inputs.
Without proper support, passing instances of these classes through breakpoint logic can lead to unexpected errors.
Note: StreamingChunk has lower priority for this task since it's never returned by any of our components as output so will probably not need to be serialized/deserialized.
Relevant discussion: Comment by @sjrl on PR #9526
Solution you'd like
Add proper to_dict and from_dict methods to both ByteStream and StreamingChunk, ensuring all dataclasses follow a consistent serialization interface.
Is your feature request related to a problem? Please describe.
Currently,
ByteStreamandStreamingChunkare the only dataclasses that do not support serialization and deserialization. This creates inconsistencies and potential failures when these classes are used as inputs to breakpoints, which rely on schema utility functions to serialize and deserialize component inputs.Without proper support, passing instances of these classes through breakpoint logic can lead to unexpected errors.
Note:
StreamingChunkhas lower priority for this task since it's never returned by any of our components as output so will probably not need to be serialized/deserialized.Relevant discussion: Comment by @sjrl on PR #9526
Solution you'd like
Add proper
to_dictandfrom_dictmethods to both ByteStream and StreamingChunk, ensuring all dataclasses follow a consistent serialization interface.