TASK: prompt提取接口地址切换
This commit is contained in:
@@ -1948,10 +1948,10 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> i
|
|||||||
requestBody.set("stream", false);*/
|
requestBody.set("stream", false);*/
|
||||||
|
|
||||||
// log.info("request body:{}", requestBody);
|
// log.info("request body:{}", requestBody);
|
||||||
// String resp = sendRequestUtil.sendPost("http://18.167.251.121:9994/api/img2prompt", imagePath);
|
|
||||||
JSONObject requestBody = new JSONObject();
|
JSONObject requestBody = new JSONObject();
|
||||||
requestBody.set("img", imagePath);
|
requestBody.set("img", imagePath);
|
||||||
String description = sendRequestUtil.sendPost("http://localhost:8000/api/img2prompt", requestBody.toString());
|
// String description = sendRequestUtil.sendPost("http://localhost:8000/api/img2prompt", requestBody.toString());
|
||||||
|
String description = sendRequestUtil.sendPost("http://18.167.251.121:9994/api/img2prompt", imagePath);
|
||||||
if (StringUtil.isNullOrEmpty(description)){
|
if (StringUtil.isNullOrEmpty(description)){
|
||||||
throw new BusinessException("从ollama获取图片描述失败");
|
throw new BusinessException("从ollama获取图片描述失败");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user