Make the PatternPair action an Enum

This commit is contained in:
mattie ruth backman
2025-10-28 16:43:06 -04:00
parent e6dc1a510d
commit ccca6e8d81
4 changed files with 59 additions and 25 deletions

View File

@@ -62,7 +62,11 @@ from pipecat.services.openai.llm import OpenAILLMService
from pipecat.transports.base_transport import BaseTransport, TransportParams
from pipecat.transports.daily.transport import DailyParams
from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams
from pipecat.utils.text.pattern_pair_aggregator import PatternMatch, PatternPairAggregator
from pipecat.utils.text.pattern_pair_aggregator import (
MatchAction,
PatternMatch,
PatternPairAggregator,
)
load_dotenv(override=True)
@@ -111,7 +115,7 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
start_pattern="<voice>",
end_pattern="</voice>",
type="voice",
action="remove", # Remove tags from final text
action=MatchAction.REMOVE, # Remove tags from final text
)
# Register handler for voice switching