mirror of
https://github.com/open-webui/pipelines
synced 2025-05-14 17:35:45 +00:00
fix: rate limit
This commit is contained in:
parent
f48f3ae276
commit
1f4a6502bb
@ -108,6 +108,7 @@ class Pipeline:
|
|||||||
print(body)
|
print(body)
|
||||||
print(user)
|
print(user)
|
||||||
|
|
||||||
|
if user["role"] == "user":
|
||||||
user_id = user["id"] if user and "id" in user else "default_user"
|
user_id = user["id"] if user and "id" in user else "default_user"
|
||||||
if self.rate_limited(user_id):
|
if self.rate_limited(user_id):
|
||||||
raise Exception("Rate limit exceeded. Please try again later.")
|
raise Exception("Rate limit exceeded. Please try again later.")
|
||||||
|
@ -13,8 +13,11 @@ requests==2.32.2
|
|||||||
aiohttp==3.9.5
|
aiohttp==3.9.5
|
||||||
httpx
|
httpx
|
||||||
|
|
||||||
|
|
||||||
|
# AI libraries
|
||||||
openai
|
openai
|
||||||
anthropic
|
anthropic
|
||||||
|
google-generativeai
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
pymongo
|
pymongo
|
||||||
@ -60,6 +63,7 @@ playwright
|
|||||||
beautifulsoup4
|
beautifulsoup4
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
|
APScheduler
|
||||||
youtube_dl
|
youtube_dl
|
||||||
twilio
|
twilio
|
||||||
streamlit
|
streamlit
|
Loading…
Reference in New Issue
Block a user