Skip to content

Commit 474f1b2

Browse files
Clarify turn detection language validation errors
1 parent 42d452a commit 474f1b2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/agora_agent/agentkit/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ def _is_turn_detection_language(value: typing.Any) -> bool:
306306

307307
def _validate_turn_detection_language(value: typing.Any) -> TurnDetectionLanguage:
308308
if not _is_turn_detection_language(value):
309-
raise ValueError(f"Invalid interaction language: {value}")
309+
raise ValueError(f"Invalid turn_detection.language: {value}")
310310
return value # type: ignore[return-value]
311311

312312

tests/custom/test_stt_language.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_turn_detection_language_can_differ_from_provider_language() -> None:
7373

7474

7575
def test_invalid_turn_detection_language_is_rejected() -> None:
76-
with pytest.raises(ValueError, match="Invalid interaction language: xx"):
76+
with pytest.raises(ValueError, match="Invalid turn_detection.language: xx"):
7777
properties(Agent(turn_detection=TurnDetectionConfig(language="xx"))) # type: ignore[arg-type]
7878

7979

0 commit comments

Comments
 (0)