Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions src/anam/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ class PersonaConfig:
llm_id: LLM model to use (optional). Set to 'CUSTOMER_CLIENT_V1' to disable
Anam's default brain for custom LLM integration.
max_session_length_seconds: Maximum session duration (optional).
enable_audio_passthrough: If True, enables audio passthrough mode where TTS audio
is sent directly through the socket without transcription, LLM, or TTS processing.
For ephemeral personas, this must be set explicitly.
enable_audio_passthrough: If True, bypasses Anam's orchestration layer
and allows to ingest TTS audio directly through the socket.
"""

persona_id: str | None = None
Expand All @@ -74,7 +73,7 @@ class PersonaConfig:
language_code: str | None = None
llm_id: str | None = None
max_session_length_seconds: int | None = None
enable_audio_passthrough: bool | None = True
enable_audio_passthrough: bool | None = False

def to_dict(self) -> dict[str, Any]:
"""Convert to dictionary for API requests."""
Expand Down
3 changes: 1 addition & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ def test_to_dict_minimal(self) -> None:
"""Test to_dict with minimal config."""
config = PersonaConfig(persona_id="test-id")
result = config.to_dict()
# enableAudioPassthrough defaults to True, so it's included
assert result == {"personaId": "test-id", "enableAudioPassthrough": True}
assert result == {"personaId": "test-id", "enableAudioPassthrough": False}

def test_to_dict_full(self) -> None:
"""Test to_dict with all fields."""
Expand Down
Loading