Find answers from the community

Home
Members
fariazz
f
fariazz
Offline, last seen 4 months ago
Joined September 25, 2024
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
1 comment
L