Update examples to use the class Settings alias

This commit is contained in:
Mark Backman
2026-03-07 09:15:24 -05:00
parent 26631a9c31
commit cd28c82de3
264 changed files with 1172 additions and 1155 deletions

View File

@@ -22,7 +22,7 @@ from pipecat.processors.aggregators.llm_response_universal import (
)
from pipecat.runner.types import RunnerArguments
from pipecat.runner.utils import create_transport
from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService, AWSNovaSonicLLMSettings
from pipecat.services.aws.nova_sonic.llm import AWSNovaSonicLLMService
from pipecat.transports.base_transport import BaseTransport, TransportParams
from pipecat.transports.daily.transport import DailyParams
from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams
@@ -52,7 +52,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"),
access_key_id=os.getenv("AWS_ACCESS_KEY_ID"),
region=os.getenv("AWS_REGION"),
settings=AWSNovaSonicLLMSettings(
settings=AWSNovaSonicLLMService.Settings(
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.",
),
)
@@ -91,7 +91,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
await asyncio.sleep(10)
logger.info("Updating AWS Nova Sonic LLM settings: temperature=0.1")
await task.queue_frame(
LLMUpdateSettingsFrame(delta=AWSNovaSonicLLMSettings(temperature=0.1))
LLMUpdateSettingsFrame(delta=AWSNovaSonicLLMService.Settings(temperature=0.1))
)
@transport.event_handler("on_client_disconnected")