Skip to content

Commit 256c70c

Browse files
committed
use UserTurnStrategies
1 parent 9942fcf commit 256c70c

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

examples/foundational/07zg-interruptible-camb.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
from pipecat.transports.base_transport import BaseTransport, TransportParams
3030
from pipecat.transports.daily.transport import DailyParams
3131
from pipecat.transports.websocket.fastapi import FastAPIWebsocketParams
32-
from pipecat.turns.bot import TurnAnalyzerBotTurnStartStrategy
33-
from pipecat.turns.turn_start_strategies import TurnStartStrategies
32+
from pipecat.turns.user_stop import TurnAnalyzerUserTurnStopStrategy
33+
from pipecat.turns.user_turn_strategies import UserTurnStrategies
3434

3535
load_dotenv(override=True)
3636

@@ -79,11 +79,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
7979
]
8080

8181
context = LLMContext(messages)
82-
context_aggregator = LLMContextAggregatorPair(
82+
user_aggregator, assistant_aggregator = LLMContextAggregatorPair(
8383
context,
8484
user_params=LLMUserAggregatorParams(
85-
turn_start_strategies=TurnStartStrategies(
86-
bot=[TurnAnalyzerBotTurnStartStrategy(turn_analyzer=LocalSmartTurnAnalyzerV3())]
85+
user_turn_strategies=UserTurnStrategies(
86+
stop=[TurnAnalyzerUserTurnStopStrategy(turn_analyzer=LocalSmartTurnAnalyzerV3())]
8787
),
8888
),
8989
)
@@ -92,11 +92,11 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
9292
[
9393
transport.input(),
9494
stt,
95-
context_aggregator.user(),
95+
user_aggregator,
9696
llm,
9797
tts,
9898
transport.output(),
99-
context_aggregator.assistant(),
99+
assistant_aggregator,
100100
]
101101
)
102102

0 commit comments

Comments
 (0)