Merge remote-tracking branch 'origin/dev/dev' into dev/dev
This commit is contained in:
@@ -2948,12 +2948,17 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
collectionElement.setCreateDate(date);
|
||||
libraryService.processSketchBoards(url, collectionElement.getLevel2Type());
|
||||
}else if (receiveCollectionElement.getLevel1Type().equals(CollectionLevel1TypeEnum.COLOR_BOARD.getRealName())) {
|
||||
String color = receiveCollectionElement.getHsv();
|
||||
/*String color = receiveCollectionElement.getHsv();
|
||||
String[] parts = color.split("\\s+");
|
||||
int h = Math.round(Float.parseFloat(parts[0]));
|
||||
int s = Math.round(Float.parseFloat(parts[1])); // 关键修改
|
||||
int v = Math.round(Float.parseFloat(parts[2]));
|
||||
int[] hsv = {h, s, v};
|
||||
int[] hsv = {h, s, v};*/
|
||||
String rgbStr = receiveCollectionElement.getRgb();
|
||||
int[] rgb = Arrays.stream(rgbStr.split("\\s+"))
|
||||
.mapToInt(Integer::parseInt)
|
||||
.toArray();
|
||||
int[] hsv = PantoneUtils.rgbToHsv(rgb);
|
||||
// int[] hsv = Arrays.stream(color.split("\\s+")).mapToInt(Integer::parseInt).toArray();
|
||||
int value = (hsv[0] * 101 * 101) + (hsv[1] * 101) + hsv[2];
|
||||
ColorLookupTable colorLookupTable = colorLoopUpTableService.getByColorValue(value);
|
||||
@@ -2970,7 +2975,7 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
collectionElement.setProjectId(project.getId());
|
||||
collectionElement.setName(panTone.getPantoneIndex() + "_" + panTone.getName() + "_" + panTone.getTcx());
|
||||
collectionElement.setHasPin((byte) 0);
|
||||
collectionElement.setColorRgb(receiveCollectionElement.getRgb());
|
||||
collectionElement.setColorRgb(rgbStr);
|
||||
collectionElement.setCreateDate(date);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -232,7 +232,7 @@ public class LLMServiceImpl implements LLMService {
|
||||
@Override
|
||||
public SseEmitter streamNew(String prompt, Long projectParamId, String fileUrl, List<String> imageUrlList, String token, Boolean enableThinking, String process) {
|
||||
SseEmitter emitter = new SseEmitter(0L); // 永不超时
|
||||
List<String> designTools = Arrays.asList("moodboard", "printboard", "generate_color_code", "sketchboard");
|
||||
List<String> designTools = Arrays.asList("moodboard", "printboard", /*"generate_color_code", */"sketchboard", "colorboard");
|
||||
|
||||
executor.submit(() -> {
|
||||
try {
|
||||
@@ -241,8 +241,8 @@ public class LLMServiceImpl implements LLMService {
|
||||
if (validate) {
|
||||
AuthPrincipalVo principal = jwtTokenHelper.parserToUser(token);
|
||||
Long accountId = principal.getId();
|
||||
// String url = "http://18.167.251.121:10002/chat-stream";
|
||||
String url = "http://18.167.251.121:10002/api/chat_stream";
|
||||
// String url = "http://18.167.251.121:10002/api/chat_stream";
|
||||
String url = "http://18.167.251.121:2011/api/chat_stream";
|
||||
// String url = "http://10.1.1.240:1013/chat-stream";
|
||||
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
|
||||
conn.setRequestMethod("POST");
|
||||
@@ -251,6 +251,7 @@ public class LLMServiceImpl implements LLMService {
|
||||
Long projectId = null;
|
||||
if (null == projectParamId) {
|
||||
Project project = new Project();
|
||||
project.setAccountId(accountId);
|
||||
project.setCreateTime(LocalDateTime.now());
|
||||
projectMapper.insert(project);
|
||||
projectId = project.getId();
|
||||
|
||||
Reference in New Issue
Block a user