Without middleware, the following *.RunAsync<> variants works:
- .RunAsync(...)
- .RunAsync<List>(...)
- .RunAsync<Movie[]>
Above is a Trick done by Microsoft.Extensions.AI (on-the-fly wrapper object) as OpenAI itself does not support it.
But if you apply middleware, these do not work anymore, as MEAI can't be used, and the normal ResponseFormat method needs to be used.
It would be nice if we could do the same Trick as MEAI in AgentFrameworkToolkit, as the Agent Framework Team that the do not wish to "fix this" 🙁