Merge pull request #204 from TomTom101/TomTom101/langchain

fix: Fixed imports, support new PipelineParams
This commit is contained in:
Aleix Conchillo Flaqué
2024-06-03 03:16:30 +08:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -17,11 +17,11 @@ from runner import configure
from pipecat.frames.frames import LLMMessagesFrame from pipecat.frames.frames import LLMMessagesFrame
from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.runner import PipelineRunner 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 ( from pipecat.processors.aggregators.llm_response import (
LLMAssistantResponseAggregator, LLMUserResponseAggregator) LLMAssistantResponseAggregator, LLMUserResponseAggregator)
from pipecat.processors.frameworks.langchain import LangchainProcessor
from pipecat.services.elevenlabs import ElevenLabsTTSService from pipecat.services.elevenlabs import ElevenLabsTTSService
from pipecat.services.langchain import LangchainProcessor
from pipecat.transports.services.daily import DailyParams, DailyTransport from pipecat.transports.services.daily import DailyParams, DailyTransport
from pipecat.vad.silero import SileroVADAnalyzer 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") @transport.event_handler("on_first_participant_joined")
async def on_first_participant_joined(transport, participant): async def on_first_participant_joined(transport, participant):

View File

@@ -13,7 +13,7 @@ from pipecat.frames.frames import (LLMFullResponseEndFrame,
UserStoppedSpeakingFrame) UserStoppedSpeakingFrame)
from pipecat.pipeline.pipeline import Pipeline from pipecat.pipeline.pipeline import Pipeline
from pipecat.pipeline.runner import PipelineRunner 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 ( from pipecat.processors.aggregators.llm_response import (
LLMAssistantResponseAggregator, LLMUserResponseAggregator) LLMAssistantResponseAggregator, LLMUserResponseAggregator)
from pipecat.processors.frame_processor import FrameProcessor from pipecat.processors.frame_processor import FrameProcessor
@@ -69,7 +69,7 @@ class TestLangchain(unittest.IsolatedAsyncioTestCase):
] ]
) )
task = PipelineTask(pipeline) task = PipelineTask(pipeline, PipelineParams(allow_interruptions=False))
await task.queue_frames( await task.queue_frames(
[ [
UserStartedSpeakingFrame(), UserStartedSpeakingFrame(),