调整后台文字模型请求发送图片或者视频的方式base64,而不是现在的链接形式,增加后台配置
This commit is contained in:
@@ -293,6 +293,20 @@ async def _seed_data():
|
||||
)
|
||||
)
|
||||
|
||||
# 文字模型媒体使用 base64 开关
|
||||
existing_media_format = await db.execute(
|
||||
select(SystemConfig).where(SystemConfig.key == "llm_media_as_base64").limit(1)
|
||||
)
|
||||
if not existing_media_format.scalar_one_or_none():
|
||||
db.add(
|
||||
SystemConfig(
|
||||
id=generate_id(),
|
||||
key="llm_media_as_base64",
|
||||
value="true",
|
||||
description="文字模型请求时图片/视频使用 base64 编码(而非 URL 链接)",
|
||||
)
|
||||
)
|
||||
|
||||
# Seed credit ratios - model_config_id is kept as a compatible field name,
|
||||
# but now stores the actual engine id:
|
||||
# - gen_type=video -> video_engines.id
|
||||
|
||||
Reference in New Issue
Block a user