feat(图像生成): 修改提示词模板以支持主题和详情参数

将图像生成的提示词模板从单一prompt参数改为支持topic和detail两个参数
更新中英文语言文件中的提示词模板,改为写实摄影风格要求
This commit is contained in:
liuziting
2026-01-21 23:23:52 +08:00
parent 570af3b6d3
commit 4c6ef870cb
3 changed files with 7 additions and 5 deletions

View File

@@ -655,6 +655,8 @@ export function useThinkFlow({ t, locale }: { t: Translate; locale: Ref<string>
const finalApiKey = apiConfig.mode === 'default' ? useConfig.apiKey || API_KEY : useConfig.apiKey
try {
const topic = node.data.label || prompt
const detail = node.data.description || ''
const response = await fetch(useConfig.baseUrl, {
method: 'POST',
headers: {
@@ -663,7 +665,7 @@ export function useThinkFlow({ t, locale }: { t: Translate; locale: Ref<string>
},
body: JSON.stringify({
model: useConfig.model,
prompt: t('prompts.image', { prompt })
prompt: t('prompts.image', { topic, detail })
})
})