TASK:LLM;

This commit is contained in:
shahaibo
2025-05-20 16:54:20 +08:00
parent a0bd4cfa38
commit 8c597db8a9
4 changed files with 10 additions and 6 deletions

View File

@@ -4383,7 +4383,7 @@ public class PythonService {
throw new BusinessException("poseTransferBatch.interface.exception");
}
public JSONObject getProjectParam(String prompt) {
public JSONObject getProjectParam(String prompt, String fileUrl, List<String> imageUrlList) {
OkHttpClient client = new OkHttpClient().newBuilder()
.connectTimeout(30, TimeUnit.SECONDS)
.pingInterval(5, TimeUnit.SECONDS)//websocket轮训间隔(单位:秒)
@@ -4393,6 +4393,8 @@ public class PythonService {
MediaType mediaType = MediaType.parse("application/json");
Map<String, Object> content = Maps.newHashMap();
content.put("prompt", prompt);
content.put("image_list", !CollectionUtils.isEmpty(imageUrlList) ? imageUrlList : null);
content.put("file_list", !StringUtils.isEmpty(fileUrl) ? Collections.singletonList(fileUrl) : null);
RequestBody body = RequestBody.create(mediaType, JSON.toJSONString(content));
log.info("getProjectParam 请求地址: {}", accessPythonIp + ":" + accessPythonPort + "/api/extraction_project_info");