Add files via upload
增加代理设置选项; 优化新版本google-generativeai 不支持 Client 类问题; 优化批量生成章节界面,使用customtkinter统一设计风格;
This commit is contained in:
@@ -88,6 +88,18 @@ class NovelGeneratorGUI:
|
||||
"retrieval_k": 4
|
||||
}
|
||||
|
||||
# PenBo 增加代理功能支持
|
||||
proxy_url = self.loaded_config["proxy_setting"]["proxy_url"]
|
||||
proxy_port = self.loaded_config["proxy_setting"]["proxy_port"]
|
||||
if self.loaded_config["proxy_setting"]["enabled"]:
|
||||
os.environ['HTTP_PROXY'] = f"http://{proxy_url}:{proxy_port}"
|
||||
os.environ['HTTPS_PROXY'] = f"http://{proxy_url}:{proxy_port}"
|
||||
else:
|
||||
os.environ.pop('HTTP_PROXY', None)
|
||||
os.environ.pop('HTTPS_PROXY', None)
|
||||
|
||||
|
||||
|
||||
# -- LLM通用参数 --
|
||||
# self.llm_conf_name = next(iter(self.loaded_config["llm_configs"]))
|
||||
self.api_key_var = ctk.StringVar(value=llm_conf.get("api_key", ""))
|
||||
|
||||
Reference in New Issue
Block a user