-
-
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
feat: merge chat history with chat notifications #1127
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Risk Level 2 - /home/runner/work/quivr/quivr/backend/repository/chat/get_chat_history_with_notifications.py The code changes involve the addition of methods to merge chat history and notifications. The methods are well-written and follow good practices. However, there is a potential risk in the if not chat_history or not notifications:
raise ValueError(\"Chat history or notifications is empty\") Risk Level 2 - /home/runner/work/quivr/quivr/frontend/lib/api/chat/chat.ts
Example code snippet for the second point: export const crawlWebsiteUrl = async (
props: CrawlInputProps,
axiosInstance: AxiosInstance
): Promise<CrawlResponse> =>
axiosInstance.post(
`/crawl?brain_id=${props.brainId}&chat_id=${props.chat_id ?? \"default_chat_id\"}`,
props.config
); Risk Level 3 - /home/runner/work/quivr/quivr/backend/routes/upload_routes.py
Example code snippet for the first point: openai_api_key = request.headers.get(\"Openai-Api-Key\", None)
if openai_api_key is not None:
# Validate the API key
if not validate_api_key(openai_api_key):
raise ValueError(\"Invalid API key\") 🔒🔧💬 Powered by Code Review GPT |
513315a
to
95f938e
Compare
95f938e
to
b6b40b0
Compare
* feat: add chat_id to upload and crawl payload * feat(chat): return chat_history_with_notifications * feat: explicit notification status on create * feat: handle notifications in frontend * feat: delete chat notifications on chat delete request
Screen.Recording.2023-09-07.at.14.58.06.mov