Are there any examples for Flask on how to run two or more LLM calls within a single request? For example, a query() or chat(), and then an evaluate() ?
I'm finding that the second call gets the error message
raise RuntimeError('Event loop is closed')
, then if you enable nested event loops like so:
import nest_asyncio
nest_asyncio.apply()
You then run into race conditions, in which the second call is executed before the first one has completed