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

Max File Size #3422

Merged
merged 3 commits into from
Dec 11, 2024
Merged

Max File Size #3422

merged 3 commits into from
Dec 11, 2024

Conversation

yuhongsun96
Copy link
Contributor

Description

Explicit handling for Google Drive
General catchall for all documents after they are processed into an Onyx Document. This must be done after the translation into text already because there is no other central place before this (and after pulling the file).

This addresses the container running out of memory. This is likely downstream of the catchall, possibly in the text processing (tokenizing) step.

How Has This Been Tested?

Unit test added
Tested Google Drive files manually with new configured limit

Accepted Risk (provide if relevant)

N/A

Related Issue(s) (provide if relevant)

N/A

Mental Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

Backporting (check the box to trigger backport action)

Note: You have to check that the action passes, otherwise resolve the conflicts manually and tag the patches.

  • This PR should be backported (make sure to check that the backport attempt succeeds)

Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
internal-search ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 11:38pm


# Maximum file size in a document to be indexed
MAX_DOCUMENT_CHARS = int(os.environ.get("MAX_DOCUMENT_CHARS") or 5000000)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: prefer 5_000_000 for readability!

# Maximum file size in a document to be indexed
MAX_DOCUMENT_CHARS = int(os.environ.get("MAX_DOCUMENT_CHARS") or 5000000)
MAX_FILE_SIZE_BYTES = int(
os.environ.get("MAX_FILE_SIZE_BYTES") or 5 * 1024 * 1024
Copy link
Contributor

Choose a reason for hiding this comment

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

bump to 2GB

@yuhongsun96 yuhongsun96 added this pull request to the merge queue Dec 11, 2024
Merged via the queue into main with commit ca988f5 Dec 11, 2024
13 checks passed
@yuhongsun96 yuhongsun96 deleted the max-file-size branch December 11, 2024 00:43
aronszanto pushed a commit to aronszanto/onyx that referenced this pull request Dec 23, 2024
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