mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-14 17:03:29 +03:00
fix: 🐛 limits
now passing good value
This commit is contained in:
parent
cc39f9e3ba
commit
e575c71201
@ -25,6 +25,7 @@ class NullableUUID(UUID):
|
||||
|
||||
|
||||
def check_user_requests_limit(user: UserIdentity, model: str):
|
||||
# TODO : Pass objects to avoid multiple calls to the database
|
||||
"""Checks the user requests limit.
|
||||
It checks the user requests limit and raises an exception if the user has reached the limit.
|
||||
By default, the user has a limit of 100 requests per month. The limit can be increased by upgrading the plan.
|
||||
|
@ -269,7 +269,7 @@ async def create_stream_question_handler(
|
||||
metadata["max_tokens"] = model_to_use.max_output
|
||||
metadata["max_input"] = model_to_use.max_input
|
||||
|
||||
check_user_requests_limit(current_user, chat_question.model)
|
||||
check_user_requests_limit(current_user, model_to_use.name)
|
||||
gpt_answer_generator = chat_instance.get_answer_generator(
|
||||
chat_id=str(chat_id),
|
||||
model=model_to_use.name,
|
||||
|
Loading…
Reference in New Issue
Block a user