librechat-data-provider 0.4.5 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/react-query/index.es.js +1 -1
- package/dist/react-query/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/config.ts +28 -6
- package/src/file-config.ts +1 -0
- package/src/schemas.ts +7 -0
- package/src/types.ts +1 -0
package/src/file-config.ts
CHANGED
package/src/schemas.ts
CHANGED
|
@@ -391,6 +391,7 @@ export const anthropicSchema = tConversationSchema
|
|
|
391
391
|
maxOutputTokens: true,
|
|
392
392
|
topP: true,
|
|
393
393
|
topK: true,
|
|
394
|
+
resendImages: true,
|
|
394
395
|
})
|
|
395
396
|
.transform((obj) => ({
|
|
396
397
|
...obj,
|
|
@@ -401,6 +402,7 @@ export const anthropicSchema = tConversationSchema
|
|
|
401
402
|
maxOutputTokens: obj.maxOutputTokens ?? 4000,
|
|
402
403
|
topP: obj.topP ?? 0.7,
|
|
403
404
|
topK: obj.topK ?? 5,
|
|
405
|
+
resendImages: obj.resendImages ?? false,
|
|
404
406
|
}))
|
|
405
407
|
.catch(() => ({
|
|
406
408
|
model: 'claude-1',
|
|
@@ -410,6 +412,7 @@ export const anthropicSchema = tConversationSchema
|
|
|
410
412
|
maxOutputTokens: 4000,
|
|
411
413
|
topP: 0.7,
|
|
412
414
|
topK: 5,
|
|
415
|
+
resendImages: false,
|
|
413
416
|
}));
|
|
414
417
|
|
|
415
418
|
export const chatGPTBrowserSchema = tConversationSchema
|
|
@@ -568,6 +571,7 @@ export const compactAnthropicSchema = tConversationSchema
|
|
|
568
571
|
maxOutputTokens: true,
|
|
569
572
|
topP: true,
|
|
570
573
|
topK: true,
|
|
574
|
+
resendImages: true,
|
|
571
575
|
})
|
|
572
576
|
.transform((obj) => {
|
|
573
577
|
const newObj: Partial<TConversation> = { ...obj };
|
|
@@ -583,6 +587,9 @@ export const compactAnthropicSchema = tConversationSchema
|
|
|
583
587
|
if (newObj.topK === 5) {
|
|
584
588
|
delete newObj.topK;
|
|
585
589
|
}
|
|
590
|
+
if (newObj.resendImages !== true) {
|
|
591
|
+
delete newObj.resendImages;
|
|
592
|
+
}
|
|
586
593
|
|
|
587
594
|
return removeNullishValues(newObj);
|
|
588
595
|
})
|