Skip to content

Support string content_type in the output response #23

@lizzzcai

Description

@lizzzcai

Follow up of this issue to track the support of str content_type in output response.

expected example:

curl -i -X POST -H "Content-Type: application/json" "http://localhost:8008/v2/models/${MODEL_NAME}/infer" -d '{"inputs": [{ "name": "text", "shape": [2], "datatype": "BYTES", "data": ["I loved this food, it was very good", "I don't loved this food, it was not good"] }] }'

{"model_name":"custom-predictor__ksp-89efd40320","model_version":"v0.1.0","outputs":[{"name":"predictions","datatype":"BYTES","shape":[2],"parameters":{"content_type":{"ParameterChoice":{"StringParam":"str"}}},"data":["compliment","complaint"]}]}%  # currently it is ["Y29tcGxpbWVudA==","Y29tcGxhaW50"] and `content_type` is base64

Motivations:

  1. align with V2 Inference Protocol
  2. make life easier for users

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions