Merge pull request #111 from daily-co/user-transcription-aggregator

pipeline: add UserTranscriptionAggregator
This commit is contained in:
Aleix Conchillo Flaqué
2024-04-09 23:34:52 +08:00
committed by GitHub
4 changed files with 87 additions and 14 deletions

View File

@@ -3,8 +3,8 @@ import aiohttp
import logging
import os
from dailyai.pipeline.aggregators import (
LLMResponseAggregator,
UserResponseAggregator,
LLMAssistantResponseAggregator,
LLMUserResponseAggregator,
)
from dailyai.pipeline.pipeline import Pipeline
@@ -63,8 +63,8 @@ async def main(room_url: str, token):
await transport.run_interruptible_pipeline(
pipeline,
post_processor=LLMResponseAggregator(messages),
pre_processor=UserResponseAggregator(messages),
post_processor=LLMAssistantResponseAggregator(messages),
pre_processor=LLMUserResponseAggregator(messages),
)
transport.transcription_settings["extra"]["punctuate"] = False