Skip to content

Commit

Permalink
support bwc for process function (#1427)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
ylwu-amzn committed Oct 4, 2023
1 parent 7e7afea commit 285f71b
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 285f71b

Please sign in to comment.