Commit 56f85b14 authored by alex yao's avatar alex yao

fix:【【POE】-【个人空间】删除应用之后,原来的应用链接应不可使用】

    --bug==1009110
parent b8c57487
......@@ -372,19 +372,20 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
PrintWriter writer = httpServletResponse.getWriter();
StringBuilder output = new StringBuilder();
while ((res = bufferedReader.readLine()) != null) {
if (StringUtils.isNotBlank(res)) {
LargeModelDemandResult result = JsonUtils.deSerialize(res.replaceFirst(EVENT_STREAM_PREFIX, StringUtils.EMPTY), LargeModelDemandResult.class);
if (!"0".equals(result.getCode())) {
logger.error("LLM Error,code:{}", result.getCode());
BusinessException ex = new BusinessException("调用失败");
writer.write(EVENT_STREAM_PREFIX + JsonUtils.serialize(ex) + "\n\n");
writer.flush();
throw ex;
}
output.append(result.getMessage());
writer.write(res + "\n\n");
if (StringUtils.isBlank(res)) {
continue;
}
LargeModelDemandResult result = JsonUtils.deSerialize(res.replaceFirst(EVENT_STREAM_PREFIX, StringUtils.EMPTY), LargeModelDemandResult.class);
if (!"0".equals(result.getCode())) {
logger.error("LLM Error,code:{}", result.getCode());
BusinessException ex = new BusinessException("调用失败");
writer.write(EVENT_STREAM_PREFIX + JsonUtils.serialize(ex) + "\n\n");
writer.flush();
throw ex;
}
output.append(result.getMessage());
writer.write(res + "\n\n");
writer.flush();
}
writer.write(EVENT_STREAM_PREFIX + "[DONE]\n\n");
// 关闭资源
......
......@@ -12,6 +12,7 @@ import cn.com.poc.agent_application.query.AgentApplicationInfoQueryCondition;
import cn.com.poc.agent_application.rest.AgentApplicationInfoRest;
import cn.com.poc.agent_application.service.BizAgentApplicationInfoService;
import cn.com.poc.agent_application.service.BizAgentApplicationLargeModelListService;
import cn.com.poc.agent_application.service.BizAgentApplicationPublishService;
import cn.com.poc.common.utils.BlContext;
import cn.com.poc.support.security.oauth.entity.UserBaseEntity;
import cn.com.yict.framemax.core.exception.BusinessException;
......@@ -39,6 +40,9 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
@Resource
private AgentApplicationInfoService agentApplicationInfoService;
@Resource
private BizAgentApplicationPublishService bizAgentApplicationPublishService;
@Resource
private BizAgentApplicationLargeModelListService bizAgentApplicationLargeModelListService;
......@@ -99,6 +103,7 @@ public class AgentApplicationInfoRestImpl implements AgentApplicationInfoRest {
public void delete(String agentId) throws Exception {
Assert.notNull(agentId);
bizAgentApplicationInfoService.deletedByAgentId(agentId);
bizAgentApplicationPublishService.deleteByAgentId(agentId);
}
@Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment