Dev#2401
Merged
Merged
Conversation
Replace the byte[]-based attachment extraction pipeline with a streaming one to avoid full in-memory buffering of CHEFS attachments when generating AI summaries. - ISubmissionAppService gains GetChefsFileAttachmentStream returning a ChefsFileAttachmentStream (Stream + content-type) backed by a temp file with FileOptions.DeleteOnClose. Implementation uses HttpCompletionOption.ResponseHeadersRead so the HTTP layer streams the response body directly to disk instead of buffering it. Temp file is cleaned up on copy/open failure. - IResilientHttpRequest.HttpAsync gains an optional HttpCompletionOption parameter (default ResponseContentRead preserves all existing callers). - ITextExtractionService.ExtractTextAsync now takes a Stream. The byte[] overload, the byte[] extractor dictionary, and the per-format byte[] private methods are removed. PDF/Word/Excel/PowerPoint extractors consume the stream directly; the text-file extractor reads incrementally via StreamReader. - AttachmentSummaryRequest drops byte[] FileContent and gains string? ExtractedText. AttachmentSummaryService streams the file, extracts text once, and passes ExtractedText to the AI runtime. - OpenAIRuntimeService.GenerateAttachmentSummaryAsync uses request.ExtractedText directly; the byte[] extraction fallback, sizeBytes payload field, and ITextExtractionService dependency are removed. Build clean. Application.Tests 337/337 and Web.Tests 16/16 pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ts-lower-memory-ai-processing Feature/ab#32302 stream attachments lower memory ai processing
|
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.