Skip to content

Extend streaming_generator to also return the Pipeline result #146

@anakin87

Description

@anakin87

Currently, Hayhooks provides streaming_generator and async_streaming_generator utility functions that can be used to stream the pipeline chunks to the client. Info.

These functions work by attaching a streaming_callback to the components in the Pipeline that support streaming, and then streaming the generated chunks.

Even if the Pipeline is executed, the final result is not returned.

In some cases, it would be helpful to have access to both the streamed output and the final result.

Think for example of a RAG pipeline where we also want to show users the original source documents (coming from a Retriever or an AnswerBuilder).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions