Error invoking DialoGPT-large via serverless inference endpoint - can only concatenate str (not "dict") to str"

Update: I managed to get something by stringifying the body, however:

curl https://api-inference.huggingface.co/models/microsoft/DialoGPT-large \
        -X POST \
        -d '{\"inputs\": {\"past_user_inputs\": [\"Which movie is the best ?\"], \"generated_responses\": [\"It is Die Hard for sure.\"], \"text\":\"Can you explain why ?\"}}' \
        -H "Authorization: Bearer <API Key>"

The response is:

[{"generated_text":"{\\\"inputs\\\": {\\\"past_user_inputs\\\": [\\\"Which movie is the best ?\\\"], \\\"generated_responses\\\": [\\\"It is Die Hard for sure.\\\"], \\\"text\\\":\\\"Can you explain why ?\\\"}}ourse"}]%

Looks entirely buggy to me ?

1 Like