-
Notifications
You must be signed in to change notification settings - Fork 22
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
Cannot create over 25 chats #240
Comments
Thanks for the report can reproduce on import httpx
client = httpx.Client(base_url="http://127.0.0.1:31476")
client.get("/").raise_for_status()
## authentication
username = password = "ragna-240"
token = (
client.post(
"/token",
data={
"username": username,
"password": password,
},
)
.raise_for_status()
.json()
)
client.headers["Authorization"] = f"Bearer {token}"
## documents
documents = []
for i in range(5):
name = f"document{i}.txt"
document_upload = (
client.post("/document", json={"name": name}).raise_for_status().json()
)
parameters = document_upload["parameters"]
client.request(
parameters["method"],
parameters["url"],
data=parameters["data"],
files={"file": f"Content of {name}".encode()},
).raise_for_status()
documents.append(document_upload["document"])
## chats
num_chats = 24
for idx in range(num_chats):
chat = (
client.post(
"/chats",
json={
"name": f"Chat #{idx + 1}",
"documents": documents,
"source_storage": "Ragna/DemoSourceStorage",
"assistant": "Ragna/DemoAssistant",
"params": {},
},
)
.raise_for_status()
.json()
)
client.post(f"/chats/{chat['id']}/prepare").raise_for_status()
chats = client.get("/chats").raise_for_status().json()
assert len(chats) == num_chats This is definitely an UI bug. With the script I can flawlessly create 100+ chats. But I get the same behavior when I try to add one more in the UI. As additional hint, after the 25th+ chat is started we get two new ones in the side bar: |
I'm struggling to reproduce this consistently on my local machine. It seems that I require at least 25 chats (often more) and that I also need to interact with the left sidebar scroll before I can reproduce the error. Based on the traceback (and how difficult it is to reproduce for me), it appears to be something of a race condition related to the If anyone has time, could they check whether patching the |
I'll give it a shot since I could reproduce easily. |
@nenb Indeed that seems to be the solution. Would you like to send a PR? |
@pmeier What do you mean exactly by a PR here? This was an issue with |
Thanks for tracking this down. I'll try to prioritize another release (1.3.6) this week before everyone disappears for the holidays. It might be worth already bumping the minimum version to 1.3.5 to avoid some performance regressions related to the |
Since only the default is broken, we could simply set the right value in our code and not rely on the default. Basically including a ragna/ragna/deploy/_ui/left_sidebar.py Lines 188 to 190 in a437e7e
That being said, if we actually get Line 31 in a437e7e
With that, I'll also prepare a |
Panel 1.3.6 RC1 is currently building and should be available in the next 10-15 minutes. If anyone could test that would be appreciated. I'll release 1.3.6 in the next two hours. |
Will test. Give me a ping here when the RC is available. |
Can confirm that |
Panel 1.3.6 now fully release, thanks again for the fix @nenb. |
Bug description
Ragna UI fails to create over 25 chats, + New Chat button becomes non-responsive with error message:
Or similar (pXXXXX)
How to reproduce the bug?
ragna init
and configure a basic model using demo source storage and assistantragna ui
to launch the serverVersions and dependencies used
Anything else?
No response
The text was updated successfully, but these errors were encountered: