-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: chat_routes #1512
refactor: chat_routes #1512
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Risk Level 2 - /home/runner/work/quivr/quivr/backend/routes/chat/utils.py The Risk Level 2 - /home/runner/work/quivr/quivr/backend/routes/chat/brainless_chat.py The Risk Level 3 - /home/runner/work/quivr/quivr/backend/routes/chat/chat_routes.py The 🔐🔧📏 Powered by Code Review GPT |
Thanks Zineb 😍! |
from routes.chat.interface import ChatInterface | ||
|
||
|
||
class BrainfulChat(ChatInterface): | ||
def validate_authorization(self, user_id, brain_id): | ||
pass | ||
if brain_id: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
le if ici n'est plus nécessaire car tu fais déjà le if dans la factory
def get_chat_strategy(brain_id: UUID | None = None): | ||
if brain_id: | ||
return BrainfulChat() | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Le else n'est pas nécessaire ici
🤖 I have created a release *beep* *boop* --- ## 0.0.100 (2023-10-30) ## What's Changed * refactor: fix bad smells by @gozineb in #1399 * refactor: chat_routes by @gozineb in #1512 * feat: improve ux by @mamadoudicko in #1522 * feat(docs): reworked the website by @StanGirard in #1523 * Feat/docs rework by @StanGirard in #1525 **Full Changelog**: v0.0.99...v0.0.100 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## 0.0.100 (2023-10-30) ## What's Changed * refactor: fix bad smells by @gozineb in QuivrHQ/quivr#1399 * refactor: chat_routes by @gozineb in QuivrHQ/quivr#1512 * feat: improve ux by @mamadoudicko in QuivrHQ/quivr#1522 * feat(docs): reworked the website by @StanGirard in QuivrHQ/quivr#1523 * Feat/docs rework by @StanGirard in QuivrHQ/quivr#1525 **Full Changelog**: QuivrHQ/quivr@v0.0.99...v0.0.100 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Screenshots (if appropriate):