TASK:LLM;
This commit is contained in:
@@ -4393,8 +4393,8 @@ public class PythonService {
|
|||||||
MediaType mediaType = MediaType.parse("application/json");
|
MediaType mediaType = MediaType.parse("application/json");
|
||||||
Map<String, Object> content = Maps.newHashMap();
|
Map<String, Object> content = Maps.newHashMap();
|
||||||
content.put("prompt", prompt);
|
content.put("prompt", prompt);
|
||||||
content.put("image_list", !CollectionUtils.isEmpty(imageUrlList) ? imageUrlList : null);
|
content.put("image_list", !CollectionUtils.isEmpty(imageUrlList) ? imageUrlList : new ArrayList<>());
|
||||||
content.put("file_list", !StringUtils.isEmpty(fileUrl) ? Collections.singletonList(fileUrl) : null);
|
content.put("file_list", !StringUtils.isEmpty(fileUrl) ? Collections.singletonList(fileUrl) : new ArrayList<>());
|
||||||
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content));
|
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content));
|
||||||
|
|
||||||
log.info("getProjectParam 请求地址: {}", accessPythonIp + ":" + accessPythonPort + "/api/extraction_project_info");
|
log.info("getProjectParam 请求地址: {}", accessPythonIp + ":" + accessPythonPort + "/api/extraction_project_info");
|
||||||
|
|||||||
@@ -87,9 +87,9 @@ public class LLMServiceImpl implements LLMService {
|
|||||||
JSONObject jsonBodyObject = new JSONObject();
|
JSONObject jsonBodyObject = new JSONObject();
|
||||||
jsonBodyObject.put("project_id", projectId.toString());
|
jsonBodyObject.put("project_id", projectId.toString());
|
||||||
jsonBodyObject.put("role", "user");
|
jsonBodyObject.put("role", "user");
|
||||||
jsonBodyObject.put("image", !CollectionUtils.isEmpty(imageUrlList) ? imageUrlList : null); // 可扩展
|
jsonBodyObject.put("image", !CollectionUtils.isEmpty(imageUrlList) ? imageUrlList : new ArrayList<>()); // 可扩展
|
||||||
// jsonBodyObject.put("image", ""); // 可扩展
|
// jsonBodyObject.put("image", ""); // 可扩展
|
||||||
jsonBodyObject.put("file", !StringUtils.isEmpty(fileUrl) ? Collections.singletonList(fileUrl) : null);
|
jsonBodyObject.put("file", !StringUtils.isEmpty(fileUrl) ? Collections.singletonList(fileUrl) : new ArrayList<>());
|
||||||
jsonBodyObject.put("message", prompt);
|
jsonBodyObject.put("message", prompt);
|
||||||
jsonBodyObject.put("enable_thinking", enableThinking);
|
jsonBodyObject.put("enable_thinking", enableThinking);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user