Skip to content

Commit

Permalink
support bwc for process function (opensearch-project#1427) (opensearc…
Browse files Browse the repository at this point in the history
…h-project#1439)

* support bwc for process function

Signed-off-by: Yaliang Wu <[email protected]>

* add comment

Signed-off-by: Yaliang Wu <[email protected]>

---------

Signed-off-by: Yaliang Wu <[email protected]>
(cherry picked from commit efe5566)

Co-authored-by: Yaliang Wu <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and ylwu-amzn authored Oct 6, 2023
1 parent ed6b080 commit 0397c98
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ private static RemoteInferenceInputDataSet processTextDocsInput(TextDocsInputDat
List<String> docs = new ArrayList<>();
for (String doc : inputDataSet.getDocs()) {
if (doc != null) {
docs.add(gson.toJson(doc));
String gsonString = gson.toJson(doc);
// in 2.9, user will add " before and after string
// gson.toString(string) will add extra " before after string, so need to remove
docs.add(gsonString.substring(1, gsonString.length() - 1));
} else {
docs.add(null);
}
Expand Down

0 comments on commit 0397c98

Please sign in to comment.