Config Module¶
voice_agent.config
¶
Configuration management for voice-agent.
Loads settings from environment variables with validation.
Settings
¶
Bases: BaseSettings
Application settings loaded from environment variables.
Attributes:
| Name | Type | Description |
|---|---|---|
telegram_bot_token |
str
|
Telegram Bot API token from @BotFather. |
whisper_url |
str
|
URL of the whisper-server transcription endpoint. |
allowed_chat_ids |
str
|
Comma-separated list of allowed Telegram chat IDs. |
default_cwd |
str
|
Default working directory for Claude sessions. |
permission_timeout |
int
|
Seconds to wait for permission approval. |
projects |
dict[str, str]
|
Mapping of project names to their working directories. |
Source code in src/voice_agent/config.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
get_allowed_chat_ids()
¶
Parse allowed_chat_ids into a set of integers.
Returns:
| Type | Description |
|---|---|
set[int]
|
Set of allowed Telegram chat IDs. |
Source code in src/voice_agent/config.py
56 57 58 59 60 61 62 63 64 | |
load_settings()
¶
Load and validate settings from environment.
Returns:
| Type | Description |
|---|---|
Settings
|
Validated Settings instance. |
Raises:
| Type | Description |
|---|---|
ValidationError
|
If required settings are missing or invalid. |
Source code in src/voice_agent/config.py
67 68 69 70 71 72 73 74 75 76 | |