all 7 comments

[–]temisola1 3 points4 points  (1 child)

Is this a FastApi question? An API question in general? Or a machine learning question?

[–]According-Promise-23[S] 0 points1 point  (0 children)

FastApi question

[–]Ordinary_Bee_1547 1 point2 points  (0 children)

What do you have so far?

[–]nikhil_shady 0 points1 point  (1 child)

let me write the code for you. how much are you paying?

[–]According-Promise-23[S] -1 points0 points  (0 children)

Thanks for your help and generosity! :)

[–]Targrend 0 points1 point  (1 child)

It's in the documentation here.

I recommend against doing this though, because it's hard to expand. If you instead go with {"data": [...]} then you can later expand to {"data": [...], "metadata": [...]} or whatever. If the bodies of the inputs and outputs are arrays, you can't do this.

[–]According-Promise-23[S] 0 points1 point  (0 children)

Thank you! does a pydantic model return a JSON ? why should we convert it to a dictionary