Skip to content

feat: add to_dict/from_dict to StreamingChunk #9567

@sjrl

Description

@sjrl

Is your feature request related to a problem? Please describe.
Follow up from #9543

Currently, StreamingChunk is the only dataclass that does not support serialization and deserialization. This could create a potential failure if this dataclass is used as inputs to breakpoints, which rely on schema utility functions to serialize and deserialize component inputs.

However, currently none of our components return StreamingChunks as output so it's unlikely that this will cause issues with the pipeline breakpoints feature.

Relevant discussion: Comment by @sjrl on PR #9526

Solution you'd like
Add proper to_dict and from_dict methods to StreamingChunk.

Metadata

Metadata

Assignees

Labels

P3Low priority, leave it in the backlog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions