-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
(minor) search memoization + context #2732
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
PR Summary
This PR introduces minor enhancements to multi-tenancy support and markdown rendering optimization in the DAnswer project.
- Modified
get_session
inbackend/danswer/db/engine.py
to retrieve tenant ID fromcurrent_tenant_id
context variable before creating a database session - Implemented memoization in
web/src/components/chat_search/MinimalMarkdown.tsx
formarkdownComponents
object, dependent on thecontent
prop - Added
useMemo
hook in MinimalMarkdown component to potentially improve rendering performance - Ensured correct tenant schema is set for each database session in multi-tenant scenarios
- Updated
markdownComponents
to include memoized versions of Link and Paragraph components
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
fc513a6
to
e52314e
Compare
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.
This seems fine
Description
[Provide a brief description of the changes in this PR]
How Has This Been Tested?
[Describe the tests you ran to verify your changes]
Accepted Risk
[Any know risks or failure modes to point out to reviewers]
Related Issue(s)
[If applicable, link to the issue(s) this PR addresses]
Checklist: