fix: 🐛 limits

now passing good value
This commit is contained in:
Stan Girard 2024-01-27 02:03:00 -08:00
parent cc39f9e3ba
commit e575c71201
2 changed files with 2 additions and 1 deletions

View File

@ -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.

View File

@ -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,