Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

fix: Config env var refacto

Clémence Lesné53f90a3da6df
diff --git a/helpers/config_models/api.py b/helpers/config_models/api.py
index bf7dbe9..b9f0f59 100644
--- a/helpers/config_models/api.py
+++ b/helpers/config_models/api.py
@@ -1,6 +1,6 @@
from pydantic_settings import BaseSettings
-class ApiModel(BaseSettings):
+class ApiModel(BaseSettings, env_prefix="api_"):
events_domain: str
root_path: str = ""
diff --git a/helpers/config_models/root.py b/helpers/config_models/root.py
index cbdcfdf..49c3910 100644
--- a/helpers/config_models/root.py
+++ b/helpers/config_models/root.py
@@ -13,7 +13,7 @@ from pydantic import Field
from pydantic_settings import BaseSettings
-class RootModel(BaseSettings):
+class RootModel(BaseSettings, env_prefix=""):
# Immutable fields
version: str = Field(frozen=True)
# Editable fields