-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
feat: add user level open ai key management #805
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
LOGAF Level 3 - /home/runner/work/quivr/quivr/backend/core/main.py The code is generally well-written, but there are a few areas that could be improved for better readability and maintainability:
LOGAF Level 3 - /home/runner/work/quivr/quivr/frontend/app/config/components/ApiKeyConfig/hooks/useApiKeyConfig.ts The
LOGAF Level 3 - /home/runner/work/quivr/quivr/backend/core/routes/upload_routes.py The 🌍🔧🚀 Powered by Code Review GPT |
backend/core/main.py
Outdated
from fastapi.responses import JSONResponse | ||
from h11 import Request |
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.
change improt
884a230
to
0531774
Compare
f6875a0
to
396bb51
Compare
backend/core/main.py
Outdated
): | ||
exc_str = f"{exc}".replace("\n", " ").replace(" ", " ") | ||
logger.error(request, exc_str) | ||
content = {"status_code": 10422, "message": exc_str, "data": None} |
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.
What is status code 10422 ?
if openai_api_key is None: | ||
openai_api_key = brain.get_brain_details()["openai_api_key"] | ||
|
||
if openai_api_key is None: |
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.
These two 'if' check the same condition
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.
Add migration script and update the tables.sql last lines with the latest migration
396bb51
to
2d3b77b
Compare
* feat: add user user identity table * feat: add user openai api key input * feat: add encryption missing message * chore: log more details about 422 errors * docs(API): update api creation path * feat: use user openai key if defined
Description
Screen.Recording.2023-07-31.at.13.34.46.mov
Related issue: #749