From 5bbbc1f849716b2a258d71129d34b1193a9a447c Mon Sep 17 00:00:00 2001 From: Jon Taylor Date: Wed, 26 Jun 2024 18:24:14 +0100 Subject: [PATCH] added pause to start and new intro prompt --- examples/fast-chatbot/bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/fast-chatbot/bot.py b/examples/fast-chatbot/bot.py index a2ee96484..ed80ae965 100644 --- a/examples/fast-chatbot/bot.py +++ b/examples/fast-chatbot/bot.py @@ -10,6 +10,7 @@ import asyncio import aiohttp import os import sys +import time from typing import Optional from pydantic import BaseModel, ValidationError @@ -138,8 +139,10 @@ async def main(settings: BotSettings): # When the first participant joins, the bot should introduce itself. @ transport.event_handler("on_first_participant_joined") async def on_first_participant_joined(transport, participant): + # Provide some air whilst tracks subscribe + time.sleep(2) messages.append( - {"role": "system", "content": "Please introduce yourself to the user."}) + {"content": "Briefly introduce yourself by saying 'hello, I'm FastBot, how can I help you today?'"}) await task.queue_frames([LLMMessagesFrame(messages)]) runner = PipelineRunner()