Skip to content

Support byte string return values from predict() #913

Closed
@deliahu

Description

@deliahu

Description

  1. If the user returns an instance of starlette.response, send that through unmodified
  2. If the user returns a string or bytes, send that through to the user, and do not set the media_type header
  3. Otherwise attempt to encode as JSON using the default json package, and set the "application/json" media type header

The error message if encoding fails should list the user's three options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions