Fix interruptible pipeline runner and aggregator.

This commit is contained in:
Moishe Lettvin
2024-03-07 08:31:55 -05:00
parent b4505b7eff
commit d5683c4f24
6 changed files with 55 additions and 25 deletions

View File

@@ -1,7 +1,7 @@
import asyncio
import aiohttp
import os
from dailyai.pipeline.aggregators import LLMAssistantContextAggregator, LLMUserContextAggregator
from dailyai.pipeline.aggregators import LLMAssistantContextAggregator, LLMResponseAggregator, LLMUserContextAggregator
from dailyai.pipeline.pipeline import Pipeline
from dailyai.services.ai_services import FrameLogger
@@ -46,8 +46,8 @@ async def main(room_url: str, token):
await transport.run_interruptible_pipeline(
pipeline,
post_processor=LLMAssistantContextAggregator(
messages, transport._my_participant_id
post_processor=LLMResponseAggregator(
messages
),
pre_processor=LLMUserContextAggregator(
messages, transport._my_participant_id, complete_sentences=False