mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-07-07 11:02:12 +02:00
feat: client gen default configurations (#499)
This commit is contained in:
parent
a9947cec04
commit
ceb01a16a3
14 changed files with 353 additions and 87 deletions
44
api/schemas/workflow_configurations.py
Normal file
44
api/schemas/workflow_configurations.py
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
from typing import Literal
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
DEFAULT_MAX_CALL_DURATION_SECONDS = 300
|
||||
DEFAULT_MAX_USER_IDLE_TIMEOUT_SECONDS = 10.0
|
||||
DEFAULT_SMART_TURN_STOP_SECS = 2.0
|
||||
DEFAULT_TURN_START_STRATEGY = "default"
|
||||
DEFAULT_TURN_START_MIN_WORDS = 3
|
||||
DEFAULT_PROVISIONAL_VAD_PAUSE_SECS = 1.5
|
||||
DEFAULT_TURN_STOP_STRATEGY = "transcription"
|
||||
DEFAULT_CONTEXT_COMPACTION_ENABLED = False
|
||||
|
||||
|
||||
class AmbientNoiseConfigurationDefaults(BaseModel):
|
||||
model_config = ConfigDict(extra="allow")
|
||||
|
||||
enabled: bool = False
|
||||
volume: float = 0.3
|
||||
|
||||
|
||||
class WorkflowConfigurationDefaults(BaseModel):
|
||||
model_config = ConfigDict(extra="allow")
|
||||
|
||||
ambient_noise_configuration: AmbientNoiseConfigurationDefaults = Field(
|
||||
default_factory=AmbientNoiseConfigurationDefaults
|
||||
)
|
||||
max_call_duration: int = DEFAULT_MAX_CALL_DURATION_SECONDS
|
||||
max_user_idle_timeout: float = DEFAULT_MAX_USER_IDLE_TIMEOUT_SECONDS
|
||||
smart_turn_stop_secs: float = DEFAULT_SMART_TURN_STOP_SECS
|
||||
turn_start_strategy: Literal["default", "min_words", "provisional_vad"] = (
|
||||
DEFAULT_TURN_START_STRATEGY
|
||||
)
|
||||
turn_start_min_words: int = DEFAULT_TURN_START_MIN_WORDS
|
||||
provisional_vad_pause_secs: float = DEFAULT_PROVISIONAL_VAD_PAUSE_SECS
|
||||
turn_stop_strategy: Literal["transcription", "turn_analyzer"] = (
|
||||
DEFAULT_TURN_STOP_STRATEGY
|
||||
)
|
||||
dictionary: str = ""
|
||||
context_compaction_enabled: bool = DEFAULT_CONTEXT_COMPACTION_ENABLED
|
||||
|
||||
|
||||
def get_default_workflow_configurations() -> WorkflowConfigurationDefaults:
|
||||
return WorkflowConfigurationDefaults()
|
||||
Loading…
Add table
Add a link
Reference in a new issue