Skip to content

Commit

Permalink
Determine whether the question field exists
Browse files Browse the repository at this point in the history
  • Loading branch information
lingjue@ubuntu committed Jul 25, 2023
1 parent 2bfb096 commit 0b32cfe
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public Map<String, String> innerCall(Map<String, Object> inputs) {

List<Document> docs = getDocs(question);
inputs.put("input_documents", docs);
inputs.put("question", question);
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 0b32cfe

Please sign in to comment.