Skip to content

Bugfix/pythonupdate - #343

Open
FestusMulosa wants to merge 14 commits into
LibreChat-AI:mainfrom
levelbuild-AG:Bugfix/Pythonupdate
Open

FestusMulosa wants to merge 14 commits into
LibreChat-AI:mainfrom
levelbuild-AG:Bugfix/Pythonupdate

Conversation

@FestusMulosa

Copy link
Copy Markdown

No description provided.

FLOROID and others added 14 commits February 16, 2026 11:49
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

No deployments
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