截取提示词
This commit is contained in:
parent
640e098714
commit
9afc3f82d5
@ -89,10 +89,14 @@ export default {
|
|||||||
} = request.body;
|
} = request.body;
|
||||||
const responseFormat = _.defaultTo(response_format, "url");
|
const responseFormat = _.defaultTo(response_format, "url");
|
||||||
logger.info(`\n发起图片生成: model: ${model}, task_id: ${task_id}, width: ${width}, height: ${height}, responseFormat: ${responseFormat}, sample_strength: ${sample_strength}, generate_count: ${generate_count}`);
|
logger.info(`\n发起图片生成: model: ${model}, task_id: ${task_id}, width: ${width}, height: ${height}, responseFormat: ${responseFormat}, sample_strength: ${sample_strength}, generate_count: ${generate_count}`);
|
||||||
|
//截取提示词
|
||||||
|
let newPrompt = prompt;
|
||||||
|
if (newPrompt.indexOf("请根据下面的要求修改上面内容后返回") >= 0) {
|
||||||
|
newPrompt = newPrompt.substring(0, newPrompt.indexOf("请根据下面的要求修改上面内容后返回"));
|
||||||
|
}
|
||||||
if (USE_DATABASE_MODE) {
|
if (USE_DATABASE_MODE) {
|
||||||
// 使用新的数据库方法
|
// 使用新的数据库方法
|
||||||
await DatabaseGenerationService.generateImagesV2(model||'jimeng-3.0', task_id, prompt, {
|
await DatabaseGenerationService.generateImagesV2(model||'jimeng-3.0', task_id, newPrompt, {
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
sampleStrength: sample_strength || 0.5,
|
sampleStrength: sample_strength || 0.5,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user