diff --git a/backend/routes/chat_routes.py b/backend/routes/chat_routes.py index 7430422ec7d6..4f2970a5a960 100644 --- a/backend/routes/chat_routes.py +++ b/backend/routes/chat_routes.py @@ -209,7 +209,7 @@ async def create_question_handler( openai_api_key=current_user.openai_api_key, ) userSettings = userDailyUsage.get_user_settings() - is_model_ok = (brain_details or chat_question).model in userSettings.models # type: ignore + is_model_ok = (brain_details or chat_question).model in userSettings.get("models", ["gpt-3.5-turbo"]) # type: ignore if not current_user.openai_api_key and brain_id: brain_details = get_brain_details(brain_id) diff --git a/scripts/tables.sql b/scripts/tables.sql index 33225442510e..210a4972dcb6 100644 --- a/scripts/tables.sql +++ b/scripts/tables.sql @@ -264,7 +264,7 @@ CREATE TABLE IF NOT EXISTS onboardings ( onboarding_b2 BOOLEAN NOT NULL DEFAULT true, onboarding_b3 BOOLEAN NOT NULL DEFAULT true, PRIMARY KEY (user_id) -) +); insert into storage.buckets (id, name)