Use RunnerArguments in examples

This commit is contained in:
Mark Backman
2025-07-30 21:18:47 -04:00
parent 54f0bb8326
commit 90487ac144
5 changed files with 18 additions and 26 deletions

View File

@@ -19,18 +19,16 @@ from pipecat.pipeline.runner import PipelineRunner
from pipecat.pipeline.task import PipelineParams, PipelineTask
from pipecat.processors.aggregators.openai_llm_context import OpenAILLMContext
from pipecat.processors.frameworks.rtvi import RTVIConfig, RTVIObserver, RTVIProcessor
from pipecat.runner.types import (
DailyRunnerArguments,
SmallWebRTCRunnerArguments,
)
from pipecat.runner.types import DailyRunnerArguments, RunnerArguments, SmallWebRTCRunnerArguments
from pipecat.services.cartesia.tts import CartesiaTTSService
from pipecat.services.deepgram.stt import DeepgramSTTService
from pipecat.services.openai.llm import OpenAILLMService
from pipecat.transports.base_transport import BaseTransport
load_dotenv(override=True)
async def run_bot(transport):
async def run_bot(transport: BaseTransport):
"""Main bot logic that works with any transport."""
logger.info(f"Starting bot")
@@ -92,7 +90,7 @@ async def run_bot(transport):
await runner.run(task)
async def bot(runner_args: DailyRunnerArguments | SmallWebRTCRunnerArguments):
async def bot(runner_args: RunnerArguments):
"""Main bot entry point compatible with Pipecat Cloud."""
if isinstance(runner_args, DailyRunnerArguments):