Skip to content

Commit

Permalink
fix(question): fixed with user_settings (#1349)
Browse files Browse the repository at this point in the history
# Description

Please include a summary of the changes and the related issue. Please
also include relevant motivation and context.

## Checklist before requesting a review

Please delete options that are not relevant.

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented hard-to-understand areas
- [ ] I have ideally added tests that prove my fix is effective or that
my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged

## Screenshots (if appropriate):
  • Loading branch information
StanGirard authored Oct 6, 2023
1 parent 16cea2c commit b5c01ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/routes/chat_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b5c01ef

Please sign in to comment.