Skip to content

Commit

Permalink
refactor(webui): 重构 API 参数格式
Browse files Browse the repository at this point in the history
- 移除了 config.example.toml 中的多余注释
- 更新了 script_settings.py 中的 API 参数格式,简化为更通用的结构
- 调整了参数名称,使其更加清晰和一致
  • Loading branch information
linyqh committed Nov 20, 2024
1 parent 2a8df9f commit bfc601e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
vision_gemini_model_name = "gemini-1.5-flash"

########### Vision NarratoAPI Key
# NarratoAPI 是为了便捷访问不了 Gemini API 的用户, 提供的代理服务
narrato_api_key = ""
narrato_api_url = "https://narratoapi.scsmtech.cn/api/v1"
narrato_vision_model = "gemini-1.5-flash"
Expand Down
12 changes: 5 additions & 7 deletions webui/components/script_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,14 +500,12 @@ def update_progress(progress: float, message: str = ""):
update_progress(90, "正在生成文案...")
# 校验配置
api_params = {
'batch_size': st.session_state.get('narrato_batch_size', 10),
'use_ai': False,
'start_offset': 0,
'vision_model': vision_model,
'vision_model_name': vision_model,
'vision_api_key': vision_api_key,
'llm_model': text_model,
'llm_api_key': text_api_key,
'custom_prompt': st.session_state.get('custom_prompt', '')
'vision_base_url': vision_base_url,
'text_model_name': text_model,
'text_api_key': text_api_key,
'text_base_url': text_base_url
}
session = requests.Session()
retry_strategy = Retry(
Expand Down

0 comments on commit bfc601e

Please sign in to comment.