Use more flexibile aggregator
This commit is contained in:
@@ -6,10 +6,7 @@ import urllib.parse
|
||||
|
||||
from dailyai.services.daily_transport_service import DailyTransportService
|
||||
from dailyai.services.azure_ai_services import AzureLLMService, AzureTTSService
|
||||
from dailyai.queue_aggregators import (
|
||||
TranscriptionToLLMMessageAggregator,
|
||||
LLMResponseToLLMMessageAggregator,
|
||||
)
|
||||
from dailyai.queue_aggregators import LLMContextAggregator
|
||||
|
||||
async def main(room_url:str, token):
|
||||
global transport
|
||||
@@ -38,8 +35,12 @@ async def main(room_url:str, token):
|
||||
{"role": "system", "content": "You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be converted to audio. Respond to what the user said in a creative and helpful way."},
|
||||
]
|
||||
|
||||
tma_in = TranscriptionToLLMMessageAggregator(messages, transport.my_participant_id)
|
||||
tma_out = LLMResponseToLLMMessageAggregator(messages)
|
||||
tma_in = LLMContextAggregator(
|
||||
messages, "user", transport.my_participant_id
|
||||
)
|
||||
tma_out = LLMContextAggregator(
|
||||
messages, "assistant", transport.my_participant_id
|
||||
)
|
||||
await tts.run_to_queue(
|
||||
transport.send_queue,
|
||||
tma_out.run(
|
||||
|
||||
Reference in New Issue
Block a user