cog
cog copied to clipboard
experiment: support List[str] as an input type
Nothing to see here yet. This is an experiment Inspired by https://github.com/replicate/cog/issues/527
Using List[str] as an input type annotation appears to produce a correct-looking OpenAPI schema:
{
"Input": {
"title": "Input",
"required": [
"fruits"
],
"type": "object",
"properties": {
"fruits": {
"title": "Fruits",
"type": "array",
"items": {
"type": "string"
},
"description": "array of fruit strings",
"x-order": 0
}
}
}
}
but cog build fails with this error:
ⅹ Failed to get type signature: invalid character 'I' looking for beginning of value