Closed Vesalon closed 8 months ago
I am also facing the same issue. Please let me know if there's any update on this :).
I am facing the same issue is there any update on this?
Thanks for reporting this @vaibhavl98 @Vesalon @wadoodba! It seems that OpenAI was caching the asyncio event loop, and the LLMRails
instance was creating a new one on every sync call. This is fixed by #336 . Will be included in 0.8.0
.
Env: v0.7.1 python 3.10 Ubuntu 20.04 on WSL2
I have the following guardrail app set up:
structre:
config.yml:
offtopic.co:
guardrail.py:
after I run
python -i guardrails.py
, my first call to the guardrails (e.grails.generate("Should I buy Target stock?")
) works as expected, but when I try to make any subsequent call I see an exception message telling me the event loop is closed. It also doesn't error out it just hangs after that :