a few updates

This commit is contained in:
Blaine Kasten
2026-03-19 13:37:21 -05:00
parent 077610184d
commit 591c02fb0e
4 changed files with 28 additions and 32 deletions

View File

@@ -55,21 +55,17 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
stt = TogetherSTTService(api_key=os.getenv("TOGETHER_API_KEY"))
tts = TogetherTTSService(
tts = TogetherTTSService(api_key=os.getenv("TOGETHER_API_KEY"))
llm = TogetherLLMService(
api_key=os.getenv("TOGETHER_API_KEY"),
voice="tara",
settings=TogetherLLMService.Settings(
model="Qwen/Qwen3.5-9B",
system_instruction="You are a helpful LLM in a WebRTC call. Your goal is to demonstrate your capabilities in a succinct way. Your output will be spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.",
),
)
llm = TogetherLLMService(api_key=os.getenv("TOGETHER_API_KEY"))
messages = [
{
"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 spoken aloud, so avoid special characters that can't easily be spoken, such as emojis or bullet points. Respond to what the user said in a creative and helpful way.",
},
]
context = LLMContext(messages)
context = LLMContext()
user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
context,
user_params=LLMUserAggregatorParams(vad_analyzer=SileroVADAnalyzer()),
@@ -100,7 +96,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
async def on_client_connected(transport, client):
logger.info(f"Client connected")
# Kick off the conversation.
messages.append({"role": "system", "content": "Please introduce yourself to the user."})
context.add_message({"role": "user", "content": "Please introduce yourself"})
await task.queue_frames([LLMRunFrame()])
@transport.event_handler("on_client_disconnected")