Spaces:
Building
Building
Update config_provider.py
Browse files- config_provider.py +2 -3
config_provider.py
CHANGED
@@ -53,6 +53,7 @@ class GlobalConfig(BaseModel):
|
|
53 |
cloud_token: Optional[str] = None
|
54 |
spark_endpoint: HttpUrl
|
55 |
internal_prompt: Optional[str] = None
|
|
|
56 |
|
57 |
# TTS configurations
|
58 |
tts_engine: str = Field("no_tts", pattern=r"^(no_tts|elevenlabs|blaze)$")
|
@@ -77,13 +78,11 @@ class GlobalConfig(BaseModel):
|
|
77 |
|
78 |
parameter_collection_config: ParameterCollectionConfig = Field(default_factory=ParameterCollectionConfig)
|
79 |
|
80 |
-
users: List["UserConfig"] = []
|
81 |
-
|
82 |
def get_plain_token(self) -> Optional[str]:
|
83 |
if self.cloud_token:
|
84 |
# Lazy import to avoid circular dependency
|
85 |
from encryption_utils import decrypt
|
86 |
-
return decrypt(self.cloud_token)
|
87 |
return None
|
88 |
|
89 |
def get_tts_api_key(self) -> Optional[str]:
|
|
|
53 |
cloud_token: Optional[str] = None
|
54 |
spark_endpoint: HttpUrl
|
55 |
internal_prompt: Optional[str] = None
|
56 |
+
users: List["UserConfig"] = []
|
57 |
|
58 |
# TTS configurations
|
59 |
tts_engine: str = Field("no_tts", pattern=r"^(no_tts|elevenlabs|blaze)$")
|
|
|
78 |
|
79 |
parameter_collection_config: ParameterCollectionConfig = Field(default_factory=ParameterCollectionConfig)
|
80 |
|
|
|
|
|
81 |
def get_plain_token(self) -> Optional[str]:
|
82 |
if self.cloud_token:
|
83 |
# Lazy import to avoid circular dependency
|
84 |
from encryption_utils import decrypt
|
85 |
+
return decrypt(self.cloud_token) if self.cloud_token else None
|
86 |
return None
|
87 |
|
88 |
def get_tts_api_key(self) -> Optional[str]:
|