ragflow icon indicating copy to clipboard operation
ragflow copied to clipboard

[Bug]: Fail to retrieve list_chats() for chats created by using the UI or without giving a name to the "name" variable

Open Unaiideko opened this issue 10 months ago • 4 comments

Is there an existing issue for the same bug?

  • [x] I have checked the existing issues.

RAGFlow workspace code commit ID

....

RAGFlow image version

latest

Other environment information

I am using RAGFlow in docker containers on an AWS virtual machine that uses this AMI: Deep Learning OSS Nvidia Driver AMI GPU PyTorch 2.2.0 (Amazon Linux 2) 20240517. This ragflow has been linked by network with Ollama.

Actual behavior

When I try to list the chats by using the API, I have no problem to list the chats made by calls to the API, but when I try to list chats that have been created using the RAGFlow user interface or I try to list all the chats I have, the next error occurs:

rag_object.list_chats() Traceback (most recent call last): File "", line 1, in File "<@beartype(ragflow_sdk.ragflow.RAGFlow.list_chats) at 0x1b75874a020>", line 138, in list_chats File "d:\Gitlab\XXXXXXXX\venv-ragflow\Lib\site-packages\ragflow_sdk\ragflow.py", line 157, in list_chats raise Exception(res["message"]) Exception: Don't exist the kb 18864eb6eea911efbb7b0242ac130008

Expected behavior

With the correct functionality of the API, the last code should retrievea RAGFlow object of the Chat class.

Steps to reproduce

myChats= rag_object.list_chats()
or
myChats= rag_object.list_chats(name= "Name of a chat created using the UI")

Additional information

No response

Unaiideko avatar Feb 20 '25 07:02 Unaiideko

This may be caused by KB that already has been removed.

KevinHuSh avatar Feb 21 '25 04:02 KevinHuSh

What means KB? I am a bit lost...

Unaiideko avatar Feb 21 '25 08:02 Unaiideko

Sorry, knowledge base or dataset.

KevinHuSh avatar Feb 21 '25 11:02 KevinHuSh

Hi! I'm facing same issue. I see that the problem is that some chat I've created is pointing to a KB that does not exist currently. Is this the expected behaviour? I mean, should't it anyway list that chat and then throw the error if I try to create a session for example?

In my case, I am trying to create a simple function that list all chats and removes them, but since I have some chat poiting to a non existent KB I can't list them. Therefore I have to manually search for that chat with deleted KB.

I understand that this is not a major issue, but it would be nice that listing chats is not linked to that chat being functional.

ams-idk avatar Feb 21 '25 12:02 ams-idk