|
@@ -9,6 +9,7 @@ import com.takai.bigmodel.mapper.*;
|
|
|
import com.takai.bigmodel.service.IBigModelService;
|
|
import com.takai.bigmodel.service.IBigModelService;
|
|
|
import com.takai.common.annotation.DataSource;
|
|
import com.takai.common.annotation.DataSource;
|
|
|
import com.takai.common.config.BigModelConfig;
|
|
import com.takai.common.config.BigModelConfig;
|
|
|
|
|
+import com.takai.common.config.DeepseekConfig;
|
|
|
import com.takai.common.core.redis.RedisCache;
|
|
import com.takai.common.core.redis.RedisCache;
|
|
|
import com.takai.common.enums.BackgroundColor;
|
|
import com.takai.common.enums.BackgroundColor;
|
|
|
import com.takai.common.enums.DataSourceType;
|
|
import com.takai.common.enums.DataSourceType;
|
|
@@ -87,6 +88,9 @@ public class BigModelServiceImpl implements IBigModelService
|
|
|
@Autowired
|
|
@Autowired
|
|
|
public RedisTemplate redisTemplate;
|
|
public RedisTemplate redisTemplate;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DeepseekConfig deepseekConfig;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public List<BmMediaReplacement> selectMediaList(BmMediaReplacement mData) {
|
|
public List<BmMediaReplacement> selectMediaList(BmMediaReplacement mData) {
|
|
@@ -625,6 +629,7 @@ public class BigModelServiceImpl implements IBigModelService
|
|
|
if(detailId == null) {
|
|
if(detailId == null) {
|
|
|
//String detailUuid = IdUtils.fastSimpleUUID();
|
|
//String detailUuid = IdUtils.fastSimpleUUID();
|
|
|
//dto.setId(dto.getId());
|
|
//dto.setId(dto.getId());
|
|
|
|
|
+ if (dto.getNetworkInfo() != null) dto.setWorkInfoJson(JSON.toJSONString(dto.getNetworkInfo()));
|
|
|
dialogMapper.insertDialogDetail(dto);
|
|
dialogMapper.insertDialogDetail(dto);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -685,6 +690,9 @@ public class BigModelServiceImpl implements IBigModelService
|
|
|
dto.setDocument(fileInfoDTO);
|
|
dto.setDocument(fileInfoDTO);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if(com.takai.common.utils.StringUtils.isNotEmpty(dto.getWorkInfoJson())){
|
|
|
|
|
+ dto.setNetworkInfo(JSON.parseObject(dto.getWorkInfoJson(), NetWorkInfoDTO.class));
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return detail;
|
|
return detail;
|
|
@@ -1816,6 +1824,23 @@ public class BigModelServiceImpl implements IBigModelService
|
|
|
return bmKnowledgeMapper.selectKnowledgeList(null);
|
|
return bmKnowledgeMapper.selectKnowledgeList(null);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public JSONObject webSearch(String id) {
|
|
|
|
|
+ String url = deepseekConfig.getBaseurl() + deepseekConfig.getWebSearch() + "/" + id;
|
|
|
|
|
+ Request request = buildGetRequest(url);
|
|
|
|
|
+ OkHttpClient client = buildOkHttpClient();
|
|
|
|
|
+ try {
|
|
|
|
|
+ Response response = client.newCall(request).execute();
|
|
|
|
|
+ if (response.isSuccessful()) {
|
|
|
|
|
+ String body = response.body().string();
|
|
|
|
|
+ return JSON.parseObject(body);
|
|
|
|
|
+ }
|
|
|
|
|
+ }catch (Exception e) {
|
|
|
|
|
+ logger.error("切片得分调用python接口失败", e.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+ return null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private Request buildGetRequest(String url) {
|
|
private Request buildGetRequest(String url) {
|
|
|
return new Request.Builder()
|
|
return new Request.Builder()
|
|
|
.addHeader("accept", "*/*")
|
|
.addHeader("accept", "*/*")
|