Closed
Description
Hi,
When I send an array of string in a parameter of the input
of a new prediction I'm getting a code 422 (Unprocessable Entity) from the API. The error is input.style_images: Invalid type. Expected: array, given: string
.
So I tried to find out why and found this by adding a console.log directly to the request in the replicate lib:
My original input sent to replicate.predictions.create
:
{
"input": {
"style_images": ["string1", "string2"]
},
...
}
The API request body sent from the lib is transformed like this:
{
"body": {
"source": '{"input":{"style_images":"string2"},...}',
...
}
}
I also tried to make the same request with curl or replicate-python and it works.
Thank you
Metadata
Metadata
Assignees
Labels
No labels