Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
HamaWhiteGG committed Jul 20, 2023
2 parents 9165667 + 09a0886 commit 0668fec
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.google.common.collect.Maps;
import com.hw.langchain.chains.base.Chain;
import com.hw.langchain.chains.combine.documents.base.BaseCombineDocumentsChain;
import com.hw.langchain.chains.query.constructor.JsonUtils;
import com.hw.langchain.schema.Document;

import java.util.List;
Expand Down Expand Up @@ -82,7 +83,7 @@ public Map<String, String> innerCall(Map<String, Object> inputs) {
Map<String, String> result = Maps.newHashMap();
result.put(outputKey, answer);
if (this.returnSourceDocuments) {
result.put("source_documents", docs.toString());
result.put("source_documents", JsonUtils.toJsonStringWithIndent(docs, 4));
}
return result;
}
Expand Down

0 comments on commit 0668fec

Please sign in to comment.