Skip to content

Commit

Permalink
Handle ModelTensorOutput type while parsing response
Browse files Browse the repository at this point in the history
Signed-off-by: Arjun kumar Giri <arjung@amazon.com>
  • Loading branch information
arjunkumargiri committed Dec 8, 2023
1 parent fcbfc7e commit 5cc51ef
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ private String parseResponse(Object output) {

} else if (output instanceof ModelTensor) {
return toJson(((ModelTensor) output).getDataAsMap());
} else if (output instanceof ModelTensorOutput) {
return toJson(output.toString());
} else {
if (output instanceof String) {
return (String) output;
Expand Down

0 comments on commit 5cc51ef

Please sign in to comment.