Add turn configuration support for assistants
- Introduce a new `turnConfig` field in `AssistantConfig` and `Assistant` models to manage user interaction settings. - Implement `TurnConfig`, `BargeInConfig`, `VadConfig`, and `TurnDetectionConfig` schemas to define turn management strategies. - Update the backend to handle turn configuration in the database and during assistant operations. - Enhance frontend components with a `TurnConfigEditor` for configuring turn settings, including VAD and barge-in strategies. - Modify existing pages to integrate turn configuration, improving user experience and interaction capabilities.
This commit is contained in:
25
backend/migrations/versions/20260712_0004_add_turn_config.py
Normal file
25
backend/migrations/versions/20260712_0004_add_turn_config.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""add assistant turn configuration
|
||||
|
||||
Revision ID: 20260712_0004
|
||||
Revises: 20260710_0003
|
||||
"""
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = "20260712_0004"
|
||||
down_revision = "20260710_0003"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.add_column(
|
||||
"assistants",
|
||||
sa.Column("turn_config", sa.JSON(), server_default=sa.text("'{}'"), nullable=False),
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.drop_column("assistants", "turn_config")
|
||||
Reference in New Issue
Block a user