example: add assistant responses to simple chatbot
This commit is contained in:
@@ -8,7 +8,7 @@ from PIL import Image
|
|||||||
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 PipelineTask
|
||||||
from pipecat.processors.aggregators.llm_response import LLMUserResponseAggregator
|
from pipecat.processors.aggregators.llm_response import LLMAssistantResponseAggregator, LLMUserResponseAggregator
|
||||||
from pipecat.frames.frames import (
|
from pipecat.frames.frames import (
|
||||||
AudioRawFrame,
|
AudioRawFrame,
|
||||||
ImageRawFrame,
|
ImageRawFrame,
|
||||||
@@ -135,6 +135,7 @@ async def main(room_url: str, token):
|
|||||||
]
|
]
|
||||||
|
|
||||||
user_response = LLMUserResponseAggregator()
|
user_response = LLMUserResponseAggregator()
|
||||||
|
assistant_response = LLMAssistantResponseAggregator()
|
||||||
|
|
||||||
ta = TalkingAnimation()
|
ta = TalkingAnimation()
|
||||||
|
|
||||||
@@ -144,7 +145,8 @@ async def main(room_url: str, token):
|
|||||||
llm,
|
llm,
|
||||||
tts,
|
tts,
|
||||||
ta,
|
ta,
|
||||||
transport.output()
|
transport.output(),
|
||||||
|
assistant_response,
|
||||||
])
|
])
|
||||||
|
|
||||||
task = PipelineTask(pipeline, allow_interruptions=True)
|
task = PipelineTask(pipeline, allow_interruptions=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user