Browse Source

fix: weaviate同步向量计算bug修复

zhongwei
haungxing 2 months ago
parent
commit
c777c8d116
  1. 2
      hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/database/service/WeaviateService.java

2
hzims-service/gglm-big-model/src/main/java/com/hnac/gglm/bigmodel/database/service/WeaviateService.java

@ -167,8 +167,8 @@ public class WeaviateService {
// 将entity转换为Map<String,String> // 将entity转换为Map<String,String>
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(entity, SerializerFeature.WriteMapNullValue)); JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(entity, SerializerFeature.WriteMapNullValue));
Map<String,Object> map = new HashMap<>(); Map<String,Object> map = new HashMap<>();
data.add(this.getVectorData(map,attrsMap));
jsonObject.forEach((k,v) -> map.put(k,jsonObject.get(k))); jsonObject.forEach((k,v) -> map.put(k,jsonObject.get(k)));
data.add(this.getVectorData(map,attrsMap));
}); });
params.put("data",data); params.put("data",data);
String url = gglmUrl + invokeApi.getInsertVectors(); String url = gglmUrl + invokeApi.getInsertVectors();

Loading…
Cancel
Save