mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-09 19:14:23 +01:00
feat: implement Anthropic native PDF support with document preservation
- Add comprehensive debug logging throughout PDF processing pipeline - Refactor attachment processing to separate image and document handling - Create distinct addImageURLs(), addDocuments(), and processAttachments() methods - Fix critical bugs in stream handling and parameter passing - Add streamToBuffer utility for proper stream-to-buffer conversion - Remove api/agents submodule from repository 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
007570b5c6
commit
6605b6c800
53 changed files with 630 additions and 145 deletions
|
|
@ -391,7 +391,17 @@ const processFileUpload = async ({ req, res, metadata }) => {
|
|||
const isAssistantUpload = isAssistantsEndpoint(metadata.endpoint);
|
||||
const assistantSource =
|
||||
metadata.endpoint === EModelEndpoint.azureAssistants ? FileSources.azure : FileSources.openai;
|
||||
const source = isAssistantUpload ? assistantSource : FileSources.vectordb;
|
||||
|
||||
// Use local storage for Anthropic native PDF support, vectordb for others
|
||||
const isAnthropicUpload = metadata.endpoint === EModelEndpoint.anthropic;
|
||||
let source;
|
||||
if (isAssistantUpload) {
|
||||
source = assistantSource;
|
||||
} else if (isAnthropicUpload) {
|
||||
source = FileSources.local;
|
||||
} else {
|
||||
source = FileSources.vectordb;
|
||||
}
|
||||
const { handleFileUpload } = getStrategyFunctions(source);
|
||||
const { file_id, temp_file_id } = metadata;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue