Skip to content

Commit

Permalink
fix(reasoner): fix a bug in thinker service
Browse files Browse the repository at this point in the history
  • Loading branch information
fishjoy committed Nov 8, 2024
1 parent 239f2f8 commit e106cca
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
import com.antgroup.openspg.reasoner.runner.local.thinker.LocalThinkerMain;
import com.antgroup.openspg.reasoner.runner.local.thinker.OpenSPGLogicCatalog;
import com.antgroup.openspg.reasoner.runner.local.thinker.ThinkerParams;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import lombok.extern.slf4j.Slf4j;

@Slf4j
Expand All @@ -52,7 +50,10 @@ public List<Result> run() {
Map<String, Object> params = new HashMap<>();
for (Map.Entry<String, Object> entry : task.getParams().entrySet()) {
if (entry.getKey().equals("entities")) {
List<Map<String, String>> entities = JSON.parseObject(String.valueOf(entry.getValue()), new TypeReference<List<Map<String, String>>>() {});
List<Map<String, String>> entities =
JSON.parseObject(
String.valueOf(entry.getValue()),
new TypeReference<List<Map<String, String>>>() {});
for (Map<String, String> map : entities) {
Entity entity = new Entity(map.get("id"), map.get("type"));
params.put(entity.toString(), entity);
Expand Down

0 comments on commit e106cca

Please sign in to comment.