[Bugfix][MiniCPM-o] Prevent native duplex Stage-1 prompt overflow

Signed-off-by: Sy03 <1370724210@qq.com>
This commit is contained in:
Sy03 committed 2026-08-24 05:13:31 +08:00
1 parent 1c917b2751
commit 5edee1393a
32 files changed
+1591 -99

No files matched your search

+7 -2
View File
@@ -417,6 +417,7 @@ class RealtimeDuplexClient:
auto_response: bool = True,
temperature: float | None = None,
extra_body: dict[str, object] | None = None,
turn_detection: dict[str, object] | None = None,
session_id: str | None = None,
timeout_s: float = 20.0,
) -> None:
@@ -436,8 +437,12 @@ class RealtimeDuplexClient:
"modalities": ["audio", "text"],
"input_audio_format": "pcm16",
"output_audio_format": output_audio_format,
"turn_detection": None,
"overlap_policy": "listen_only",
"turn_detection": dict(turn_detection) if turn_detection is not None else None,
"overlap_policy": (
"barge_in_on_speech"
if turn_detection is not None and turn_detection.get("interrupt_response", True) is True
else "listen_only"
),
"playback_commit_policy": "ack_only",
"extra_body": session_extra_body,
}