added api
This commit is contained in:
@@ -40,6 +40,54 @@ class Settings(BaseSettings):
|
||||
openfoodfacts_base_url: str = "https://world.openfoodfacts.org"
|
||||
fitness_reminders_enabled: bool = True
|
||||
|
||||
openmeteo_base_url: str = "http://192.168.1.109:8085"
|
||||
weather_lat: float = 59.9343
|
||||
weather_lon: float = 30.3351
|
||||
weather_location_name: str = "Санкт-Петербург"
|
||||
weather_cache_sec: int = 300
|
||||
|
||||
news_rss_urls: str = (
|
||||
"https://habr.com/ru/rss/all/all/,"
|
||||
"https://www.reddit.com/r/programming/.rss"
|
||||
)
|
||||
news_cache_sec: int = 1800
|
||||
news_max_items: int = 7
|
||||
|
||||
morning_digest_enabled: bool = True
|
||||
morning_digest_hour: int = 8
|
||||
morning_digest_minute: int = 0
|
||||
|
||||
comfyui_base_url: str = "http://192.168.1.109:8188"
|
||||
comfyui_enabled: bool = True
|
||||
# Anima split-model (default): set UNET+CLIP+VAE, leave CHECKPOINT empty
|
||||
comfyui_checkpoint: str = ""
|
||||
comfyui_unet: str = "anima-preview3-base.safetensors"
|
||||
comfyui_clip: str = "qwen_3_06b_base.safetensors"
|
||||
comfyui_vae: str = "qwen_image_vae.safetensors"
|
||||
comfyui_style_lora: str = "anima-preview-3-masterpieces-v5.safetensors"
|
||||
comfyui_style_lora_weight: float = 0.7
|
||||
comfyui_steps: int = 30
|
||||
comfyui_cfg: float = 4.0
|
||||
comfyui_sampler: str = "er_sde"
|
||||
comfyui_scheduler: str = "simple"
|
||||
comfyui_width: int = 1024
|
||||
comfyui_height: int = 720
|
||||
comfyui_negative_prompt: str = (
|
||||
"worst quality, low quality, score_1, score_2, score_3, blurry, jpeg artifacts, sepia"
|
||||
)
|
||||
comfyui_poll_interval_sec: float = 2.0
|
||||
comfyui_timeout_sec: float = 180.0
|
||||
comfyui_rofl_enabled: bool = True
|
||||
comfyui_rofl_max_per_day: int = 1
|
||||
comfyui_rofl_probability: float = 0.15
|
||||
comfyui_rofl_min_interval_hours: int = 12
|
||||
generated_media_dir: str = "./data/generated"
|
||||
|
||||
netdata_base_url: str = "http://host.docker.internal:19999"
|
||||
netdata_public_url: str = ""
|
||||
netdata_alerts_enabled: bool = True
|
||||
netdata_poll_interval_sec: int = 120
|
||||
|
||||
@property
|
||||
def cors_origins_list(self) -> list[str]:
|
||||
return [origin.strip() for origin in self.cors_origins.split(",") if origin.strip()]
|
||||
@@ -52,6 +100,10 @@ class Settings(BaseSettings):
|
||||
def gitea_configured(self) -> bool:
|
||||
return bool(self.gitea_token)
|
||||
|
||||
@property
|
||||
def news_rss_urls_list(self) -> list[str]:
|
||||
return [u.strip() for u in self.news_rss_urls.split(",") if u.strip()]
|
||||
|
||||
def load_system_prompt(self) -> str:
|
||||
path = Path(self.system_prompt_path)
|
||||
if path.is_file():
|
||||
|
||||
Reference in New Issue
Block a user