Repository navigation
Feature vision ocr - #342
Open
FestusMulosa wants to merge 13 commits into
Open
FestusMulosa wants to merge 13 commits into
FestusMulosa wants to merge 13 commits into
Conversation
… it does not already exist
# Conflicts: # README.md
Initial Setup of rag-api repository See merge request dev6283740/levelbuild/levelai/rag-api!1
- Generate unique request ID for isolation in all endpoints (/embed, /embed-upload, /text) - Sanitize filenames with os.path.basename() to prevent path traversal - Clean up entire request-scoped temporary directory with safety guards - Add path verification to prevent accidental parent directory deletion - Maintain exact same response structures to preserve endpoint contracts
Two failures on real Outlook mail, both silent. extract_msg hands back the UTF-16 string terminator on arbitrary fields, and a single NUL anywhere aborts the pgvector insert with "A string literal cannot contain NUL (0x00) characters", surfacing to the user as a generic embedding failure. Strip it from every extracted field, including attachment filenames, since it is a property of the container format rather than of one field. Only NUL is removed; other control characters are valid in a Postgres text column. Mail composed in the new Outlook is frequently HTML-only, leaving msg.body empty and indexing the document with nothing but headers -- a successful upload that finds nothing on search. Fall back to the HTML part, using the stdlib HTML parser: bs4 and lxml are in the image only as transitive dependencies and are absent from requirements.txt, so importing them would work today and break on a rebuild that resolves differently.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.