generate print翻译输入修改
This commit is contained in:
@@ -314,7 +314,14 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
|||||||
|
|
||||||
private String modifyPrompt(String userInput, Generate generate, String level1Type) {
|
private String modifyPrompt(String userInput, Generate generate, String level1Type) {
|
||||||
String text = "";
|
String text = "";
|
||||||
String translated = pythonService.promptTranslate(userInput);
|
String prefix = "";
|
||||||
|
if (userInput.startsWith("Painting Style")
|
||||||
|
|| userInput.startsWith("Illustration Style")
|
||||||
|
|| userInput.startsWith("Real Style") ){
|
||||||
|
prefix = userInput.substring(0, userInput.indexOf(",")) + ", ";
|
||||||
|
userInput = userInput.substring(userInput.indexOf(",") + 1);
|
||||||
|
}
|
||||||
|
String translated = prefix + pythonService.promptTranslate(userInput);
|
||||||
switch (level1Type) {
|
switch (level1Type) {
|
||||||
case "Moodboard":
|
case "Moodboard":
|
||||||
text = translated + ",high quality";
|
text = translated + ",high quality";
|
||||||
|
|||||||
Reference in New Issue
Block a user