Skip to content
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

Add document link downloader to Document Library #236

Merged
merged 9 commits into from
Feb 4, 2025

Conversation

bedanley
Copy link
Contributor

Add document link downloader to Document Library. Create a new presigned url for downloading a single RAG document from S3.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Comment on lines 91 to 92
const [isDownloading, setIsDownloading] = useState<boolean>(false);
const [getDownloadUrl] = useLazyDownloadRagDocumentQuery();
Copy link
Contributor

@dustins dustins Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think instead of worrying about isDownloading you can use isFetching from the hook. I think it would look something like this…

    const [isDownloading, setIsDownloading] = useState<boolean>(false);
    const [getDownloadUrl, {isFetching: isDownloading}] = useLazyDownloadRagDocumentQuery();

Edit: I guess technically it would only say it is downloading while it is fetching the URL so maybe that isn't what you'd want. Not blocking on this, just throwing it out as an option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Updated.

dustins
dustins previously approved these changes Feb 3, 2025
@bedanley bedanley merged commit 95f1b94 into develop Feb 4, 2025
4 checks passed
@bedanley bedanley deleted the feature/rag-doc-link branch February 4, 2025 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants