Merge pull request #4015 from prettyprettyprettygood/feat/nova-sonic-session-continuation
feat(nova-sonic): add proactive session continuation for conversation…
This commit is contained in:
@@ -30,6 +30,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
|
||||
from pipecat.services.aws.nova_sonic.session_continuation import SessionContinuationParams
|
||||
from pipecat.services.llm_service import FunctionCallParams
|
||||
from pipecat.transports.base_transport import BaseTransport, TransportParams
|
||||
from pipecat.transports.daily.transport import DailyParams
|
||||
@@ -132,6 +133,16 @@ async def run_bot(transport: BaseTransport, runner_args: RunnerArguments):
|
||||
voice="tiffany",
|
||||
system_instruction=system_instruction,
|
||||
),
|
||||
# Session continuation is enabled by default, allowing seamless
|
||||
# conversations longer than the AWS ~8-minute session limit.
|
||||
# The service rotates sessions in the background with no
|
||||
# user-perceptible interruption. You can tune the threshold or
|
||||
# disable it with: session_continuation=SessionContinuationParams(enabled=False)
|
||||
session_continuation=SessionContinuationParams(
|
||||
# When to start preparing the next session (default: 360 = 6 min).
|
||||
# Lower this (e.g. 20) to see a handoff happen quickly during testing.
|
||||
transition_threshold_seconds=360,
|
||||
),
|
||||
# you could choose to pass tools here rather than via context
|
||||
# tools=tools
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user