Getting started on interruptible transport pipeline runner

This commit is contained in:
Moishe Lettvin
2024-03-04 07:51:22 -05:00
parent 763a50f8ec
commit 18e7626b9f
5 changed files with 47 additions and 9 deletions

View File

@@ -139,7 +139,6 @@ class LLMFullResponseAggregator(FrameProcessor):
yield frame
class StatelessTextTransformer(FrameProcessor):
def __init__(self, transform_fn):
self.transform_fn = transform_fn
@@ -159,7 +158,11 @@ class ParallelPipeline(FrameProcessor):
self.sources = [asyncio.Queue() for _ in pipeline_definitions]
self.sink: asyncio.Queue[QueueFrame] = asyncio.Queue()
self.pipelines: list[Pipeline] = [
Pipeline(source, self.sink, pipeline_definition)
Pipeline(
pipeline_definition,
source,
self.sink,
)
for source, pipeline_definition in zip(self.sources, pipeline_definitions)
]