Find answers from the community

Updated 9 months ago

Are there any examples for Flask on how

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:

Plain Text
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
L
1 comment
I'm not sure what you mean?

You should be able to do them sequentially no?
Add a reply
Sign up and join the conversation on Discord