-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question]: Using RedisChatStore in a workflow #16615
Comments
Hello, @hristogg! I'm here to assist you with any bugs, questions, or contributions you need help with. Let's tackle this issue together! The error you're encountering, "RuntimeError: Event loop is closed," typically occurs when an asynchronous operation is attempted after the event loop has been closed. This can happen if the asynchronous resources are not properly managed or closed before the event loop ends. In your workflow, it seems like the Here are a few suggestions to resolve this issue:
If these steps do not resolve the issue, you might want to review the specific implementation details of the |
This seems fine actually? If I had to guess, your workflow is running fine, and you are able to get a result. This is getting printed when the program shuts down (probably due to the class not closing the connection properly?) |
Oh thanks, not to worry about it then, saw the documentation on redis for closing the connection but thought it might have other impacts and then ran down the rabbit hole of seeing what is happenning. |
Question Validation
Question
Hi,
I have a workflow in which i initialize a CondensePlusContextChatEngine.from_defualts() passing a ChatMemoryBuffer.from_defaults which gets passed a RedisChatStore
Every run of the workflow I get
Exception ignored in: <function AbstractConnection.__del__ at 0x000001CD05D63EC0> Traceback (most recent call last): File "c:\Users\hgospodinov\venv\v3_gradio\Lib\site-packages\redis\asyncio\connection.py", line 217, in __del__ File "c:\Users\hgospodinov\venv\v3_gradio\Lib\site-packages\redis\asyncio\connection.py", line 224, in _close File "C:\Users\hgospodinov\venv\python3119\Lib\asyncio\streams.py", line 358, in close File "C:\Users\hgospodinov\venv\python3119\Lib\asyncio\proactor_events.py", line 109, in close File "C:\Users\hgospodinov\venv\python3119\Lib\asyncio\base_events.py", line 762, in call_soon File "C:\Users\hgospodinov\venv\python3119\Lib\asyncio\base_events.py", line 520, in _check_closed RuntimeError: Event loop is closed
I am not sure whether I am doing something wrong myself or it is part of how the chatstore is actually called.
If I understand correctly the flow CondensePlusContextChatEngine's achat calls _arun_c3 which calls _memory.get(input=message) going to the ChatMemoryBuffer which calls get_messages of the RedisChatStore, my assumption was that if I am doing achat it should finally reach the aget_messages in the clienet and not the get_messages.
The versions I have:
llama-index-storage-chat-store-redis==0.3.2
llama-index==0.11.18
llama-index-core==0.11.18
I am guessing I am doing something wrong but hope you guys can point me in the right direction, let me know if I should post the full code.
The text was updated successfully, but these errors were encountered: