From 410dbd3dfc415e4b8733753447b85a79c0000045 Mon Sep 17 00:00:00 2001 From: TomTom101 Date: Sun, 2 Jun 2024 20:16:11 +0200 Subject: [PATCH 1/2] fix: Fixed imports, support new PipelineParams --- examples/foundational/07b-interruptible-langchain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/foundational/07b-interruptible-langchain.py b/examples/foundational/07b-interruptible-langchain.py index 5e32964f9..bda1d92fc 100644 --- a/examples/foundational/07b-interruptible-langchain.py +++ b/examples/foundational/07b-interruptible-langchain.py @@ -17,11 +17,11 @@ from pipecat.frames.frames import LLMMessagesFrame from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineTask +from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_response import ( LLMAssistantResponseAggregator, LLMUserResponseAggregator) +from pipecat.processors.frameworks.langchain import LangchainProcessor from pipecat.services.elevenlabs import ElevenLabsTTSService -from pipecat.services.langchain import LangchainProcessor from pipecat.transports.services.daily import DailyParams, DailyTransport from pipecat.vad.silero import SileroVADAnalyzer @@ -103,7 +103,7 @@ async def main(room_url: str, token): ] ) - task = PipelineTask(pipeline, allow_interruptions=True) + task = PipelineTask(pipeline, PipelineParams(allow_interruptions=True)) @transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): From 89673a4040d27ecc64aea848580017e28bf2600d Mon Sep 17 00:00:00 2001 From: TomTom101 Date: Sun, 2 Jun 2024 20:19:55 +0200 Subject: [PATCH 2/2] test(langchain): Use new PipelineParams in test --- tests/test_langchain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_langchain.py b/tests/test_langchain.py index 0f3ccdc86..cd4161f23 100644 --- a/tests/test_langchain.py +++ b/tests/test_langchain.py @@ -10,7 +10,7 @@ UserStoppedSpeakingFrame) from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.runner import PipelineRunner -from pipecat.pipeline.task import PipelineTask +from pipecat.pipeline.task import PipelineParams, PipelineTask from pipecat.processors.aggregators.llm_response import ( LLMAssistantResponseAggregator, LLMUserResponseAggregator) from pipecat.processors.frame_processor import FrameProcessor @@ -63,7 +63,7 @@ async def test_langchain(self): ] ) - task = PipelineTask(pipeline) + task = PipelineTask(pipeline, PipelineParams(allow_interruptions=False)) await task.queue_frames( [ UserStartedSpeakingFrame(),