mirror of
https://github.com/linyqh/NarratoAI.git
synced 2025-12-11 18:42:49 +00:00
refactor(webui): 重构 API 参数格式
- 移除了 config.example.toml 中的多余注释 - 更新了 script_settings.py 中的 API 参数格式,简化为更通用的结构 - 调整了参数名称,使其更加清晰和一致
This commit is contained in:
parent
2a8df9f294
commit
bfc601e679
@ -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"
|
||||
|
||||
@ -500,14 +500,12 @@ def generate_script(tr, params):
|
||||
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(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user