mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-15 15:08:52 +01:00
fix: add condition to skip processing files with a fileIdentifier metadata
This commit is contained in:
parent
96e3236820
commit
a54e2beeac
4 changed files with 12 additions and 1 deletions
|
|
@ -418,6 +418,9 @@ class AnthropicClient extends BaseClient {
|
|||
this.contextHandlers?.processFile(file);
|
||||
continue;
|
||||
}
|
||||
if (file.metadata?.fileIdentifier) {
|
||||
continue;
|
||||
}
|
||||
|
||||
orderedMessages[i].tokenCount += this.calculateImageTokenCost({
|
||||
width: file.width,
|
||||
|
|
|
|||
|
|
@ -318,6 +318,9 @@ class GoogleClient extends BaseClient {
|
|||
this.contextHandlers?.processFile(file);
|
||||
continue;
|
||||
}
|
||||
if (file.metadata?.fileIdentifier) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
this.augmentedPrompt = await this.contextHandlers.createContext();
|
||||
|
|
|
|||
|
|
@ -455,6 +455,9 @@ class OpenAIClient extends BaseClient {
|
|||
this.contextHandlers?.processFile(file);
|
||||
continue;
|
||||
}
|
||||
if (file.metadata?.fileIdentifier) {
|
||||
continue;
|
||||
}
|
||||
|
||||
orderedMessages[i].tokenCount += this.calculateImageTokenCost({
|
||||
width: file.width,
|
||||
|
|
|
|||
|
|
@ -364,7 +364,9 @@ class AgentClient extends BaseClient {
|
|||
this.contextHandlers?.processFile(file);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (file.metadata?.fileIdentifier) {
|
||||
continue;
|
||||
}
|
||||
// orderedMessages[i].tokenCount += this.calculateImageTokenCost({
|
||||
// width: file.width,
|
||||
// height: file.height,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue