win系统适配完成
This commit is contained in:
+1
-1
@@ -128,7 +128,6 @@ def save_cfg_to_file(cfg: dict) -> None:
|
||||
- API Keys + 品牌信息 → .streamlit/secrets.toml
|
||||
"""
|
||||
import tomllib
|
||||
import tomli_w # type: ignore
|
||||
|
||||
# ── 1. 非敏感配置 → config.json ──
|
||||
config_path = Path(__file__).with_name("config.json")
|
||||
@@ -203,6 +202,7 @@ def save_cfg_to_file(cfg: dict) -> None:
|
||||
new_app_config["temperature"] = cfg["temperature"]
|
||||
|
||||
# 写出 TOML
|
||||
import tomli_w
|
||||
secrets_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
with secrets_path.open("wb") as f:
|
||||
content = {"api_keys": new_api_keys, "app_config": new_app_config}
|
||||
|
||||
Reference in New Issue
Block a user