Skip to content

Commit a5595f5

Browse files
authored
Merge pull request #3 from dat-devuap/move-negative-prompt-to-openai-func
Move negative prompt to OpenAI Function parameter
2 parents d8e074f + 1f75546 commit a5595f5

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

implementation.js

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
async function image_generation_via_stable_diffusion_3(params, userSettings) {
2-
const { prompt } = params;
3-
const { stabilityAPIKey } = userSettings;
2+
const { prompt, negative_prompt } = params;
3+
const { stabilityAPIKey, output_format, aspect_ratio, model } = userSettings;
44
validateAPIKey(stabilityAPIKey);
55

66
try {
77
const imageData = await generateImageFromStabilityAPI(
88
stabilityAPIKey,
99
prompt,
10-
userSettings
10+
{
11+
output_format,
12+
aspect_ratio,
13+
model,
14+
negative_prompt
15+
}
1116
);
1217

1318
return imageData;

plugin.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@
4242
"type": "enum",
4343
"values": ["sd3-medium", "sd3-large", "sd3-large-turbo"],
4444
"defaultValue": "sd3-large"
45-
},
46-
{
47-
"name": "negative_prompt",
48-
"label": "Negative prompt",
49-
"description": "Optional, a blurb of text describing what you do not wish to see in the output image",
50-
"defaultValue": ""
5145
}
5246
],
5347
"iconURL": "https://www.typingmind.com/stable-diffusion.png",
@@ -61,6 +55,10 @@
6155
"prompt": {
6256
"type": "string",
6357
"description": "The text description of the desired image."
58+
},
59+
"negative_prompt": {
60+
"type": "string",
61+
"description": "A blurb of text describing what you do not wish to see in the output image. Include only if the user asks for it."
6462
}
6563
}
6664
},

0 commit comments

Comments
 (0)