Skip to content

Commit

Permalink
Merge pull request #204 from TomTom101/TomTom101/langchain
Browse files Browse the repository at this point in the history
fix: Fixed imports, support new PipelineParams
  • Loading branch information
aconchillo authored Jun 2, 2024
2 parents 0197efa + 89673a4 commit dd3b408
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions examples/foundational/07b-interruptible-langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_langchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,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
Expand Down Expand Up @@ -69,7 +69,7 @@ async def test_langchain(self):
]
)

task = PipelineTask(pipeline)
task = PipelineTask(pipeline, PipelineParams(allow_interruptions=False))
await task.queue_frames(
[
UserStartedSpeakingFrame(),
Expand Down

0 comments on commit dd3b408

Please sign in to comment.