Skip to content

Commit

Permalink
Merge pull request HamaWhiteGG#58 from kael-aiur/dev
Browse files Browse the repository at this point in the history
fix bug: exception at BaseCombineDocumentsChain when use BaseRetrievalQA, as missing key [question]
  • Loading branch information
HamaWhiteGG authored Jul 25, 2023
2 parents c17b614 + 0b32cfe commit 4fb013f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ public Map<String, String> innerCall(Map<String, Object> inputs) {

List<Document> docs = getDocs(question);
inputs.put("input_documents", docs);
if (!inputs.containsKey("question")) {
inputs.put("question", question);
}
String answer = combineDocumentsChain.run(inputs);

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

0 comments on commit 4fb013f

Please sign in to comment.