mirror of
https://github.com/open-webui/pipelines
synced 2025-06-26 18:15:58 +00:00
refac
This commit is contained in:
parent
1f4a6502bb
commit
6443236915
@ -108,7 +108,7 @@ class Pipeline:
|
||||
print(body)
|
||||
print(user)
|
||||
|
||||
if user["role"] == "user":
|
||||
if user.get("role", "admin") == "user":
|
||||
user_id = user["id"] if user and "id" in user else "default_user"
|
||||
if self.rate_limited(user_id):
|
||||
raise Exception("Rate limit exceeded. Please try again later.")
|
||||
|
Loading…
Reference in New Issue
Block a user