Skip to content

Commit

Permalink
Merge pull request HamaWhiteGG#50 from zhangxiaojiawow/qa-retriver-bu…
Browse files Browse the repository at this point in the history
…gfix

pass the input key to inner chain in RetrivalQAChain
  • Loading branch information
HamaWhiteGG authored Jul 21, 2023
2 parents 16d17ea + cdf51fc commit 624713a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ public Map<String, String> innerCall(Map<String, Object> inputs) {
var question = inputs.get(inputKey).toString();

List<Document> docs = getDocs(question);
String answer = combineDocumentsChain.run(Map.of("input_documents", docs, "question", question));
inputs.put("input_documents", docs);
String answer = combineDocumentsChain.run(inputs);

Map<String, String> result = Maps.newHashMap();
result.put(outputKey, answer);
Expand Down

0 comments on commit 624713a

Please sign in to comment.