ken
09/12/2024, 7:48 AMbentoml.api like this:
python
@bentoml.api(input_spec=AdsGenerationParams)
def generate(self, **params: t.Any) -> str:
I can send a dictionary in JSON format like this:
json
{
"prompt": "xxxx",
"data": [......]
}
However, is there a way to directly receive an array of JSON objects like this?
json
[
{
"data": "aa1"
},
{
"data": "aa2"
}
]
Is it true that
b`entoml.api`
with batchable=False cannot directly receive array data and can only accept arrays as values inside a dictionary?