|
|
|
@ -62,20 +62,14 @@ public class AppAiModelServiceImpl extends CrudServiceImpl<AppAiModelDao, AppAiM
|
|
|
|
|
retList.add(mapx);
|
|
|
|
|
HashMap<String, Object> meta = new HashMap<>();
|
|
|
|
|
mapx.put("meta", meta);
|
|
|
|
|
meta.put("displayName", mapx.get("displayName"));
|
|
|
|
|
meta.put("displayname", mapx.get("displayname"));
|
|
|
|
|
meta.put("description", mapx.get("description"));
|
|
|
|
|
meta.put("title", mapx.get("title"));
|
|
|
|
|
meta.put("enabled", mapx.get("enabled"));
|
|
|
|
|
meta.put("category", mapx.get("category"));
|
|
|
|
|
meta.put("metaId", mapx.get("metaId"));
|
|
|
|
|
meta.put("metaTokens", mapx.get("metaTokens"));
|
|
|
|
|
String tags = (String) mapx.get("tags");
|
|
|
|
|
if (tags!=null && tags.length() > 0) {
|
|
|
|
|
meta.put("tags", Arrays.asList(tags.split("\\,")));
|
|
|
|
|
} else {
|
|
|
|
|
meta.put("tags", new ArrayList<>());
|
|
|
|
|
}
|
|
|
|
|
mapx.remove("displayName");
|
|
|
|
|
meta.put("id", mapx.get("metaId"));
|
|
|
|
|
meta.put("tokens", mapx.get("metaTokens"));
|
|
|
|
|
mapx.remove("displayname");
|
|
|
|
|
mapx.remove("description");
|
|
|
|
|
mapx.remove("title");
|
|
|
|
|
mapx.remove("enabled");
|
|
|
|
@ -84,23 +78,23 @@ public class AppAiModelServiceImpl extends CrudServiceImpl<AppAiModelDao, AppAiM
|
|
|
|
|
mapx.remove("metaTokens");
|
|
|
|
|
String providers = (String) mapx.get("providers");
|
|
|
|
|
if (providers!=null && providers.length() > 0) {
|
|
|
|
|
meta.put("providers", Arrays.asList(providers.split("\\,")));
|
|
|
|
|
mapx.put("providers", Arrays.asList(providers.split("\\,")));
|
|
|
|
|
} else {
|
|
|
|
|
meta.put("providers", new ArrayList<>());
|
|
|
|
|
mapx.put("providers", new ArrayList<>());
|
|
|
|
|
}
|
|
|
|
|
HashMap<String, Object> socialData = new HashMap<>();
|
|
|
|
|
mapx.put("socialData", socialData);
|
|
|
|
|
meta.put("conversations", mapx.get("conversations"));
|
|
|
|
|
meta.put("likes", mapx.get("likes"));
|
|
|
|
|
meta.put("tokens", mapx.get("tokens"));
|
|
|
|
|
socialData.put("conversations", mapx.get("conversations"));
|
|
|
|
|
socialData.put("likes", mapx.get("likes"));
|
|
|
|
|
socialData.put("tokens", mapx.get("tokens"));
|
|
|
|
|
mapx.remove("conversations");
|
|
|
|
|
mapx.remove("likes");
|
|
|
|
|
mapx.remove("tokens");
|
|
|
|
|
String suggestions = (String) mapx.get("suggestions");
|
|
|
|
|
if (suggestions!=null && suggestions.length() > 0) {
|
|
|
|
|
meta.put("suggestions", Arrays.asList(suggestions.split("\\,")));
|
|
|
|
|
mapx.put("suggestions", Arrays.asList(suggestions.split("\\,")));
|
|
|
|
|
} else {
|
|
|
|
|
meta.put("suggestions", new ArrayList<>());
|
|
|
|
|
mapx.put("suggestions", new ArrayList<>());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|