Haystack¶
The Haystack integration allows you to use Component
as Burr Action
using the HaystackAction
construct. You can visit the examples in burr/examples/haystack-integration
for a notebook tutorial.
- class burr.integrations.haystack.HaystackAction(
- component: Component,
- reads: list[str] | dict[str, str],
- writes: list[str] | dict[str, str],
- name: str | None = None,
- bound_params: dict | None = None,
- do_warm_up: bool = True,
Burr
Action
wrapping a HaystackComponent
.Haystack
Component
is the basic block of a HaystackPipeline
. AComponent
is instantiated, then it receives inputs for its.run()
method and returns output values.Learn more about components here: https://docs.haystack.deepset.ai/docs/custom-components
- burr.integrations.haystack.haystack_pipeline_to_burr_graph(
- pipeline: Pipeline,
Convert a Haystack Pipeline to a Burr Graph.
NOTE. This currently doesn’t support Haystack pipelines with parallel branches. Learn more https://docs.haystack.deepset.ai/docs/pipelines#branching
From the Haystack Pipeline, we can easily retrieve transitions. For actions, we need to create HaystackAction from components and map their sockets to Burr state fields
EXPERIMENTAL: This feature is experimental and may change in the future. Changes to Haystack or Burr could impact this function. Please let us know if you encounter any issues.