librechat-data-provider 0.5.3 → 0.5.4
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 +26 -2
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -186,9 +186,17 @@ export const rateLimitSchema = z.object({
|
|
|
186
186
|
.optional(),
|
|
187
187
|
});
|
|
188
188
|
|
|
189
|
+
export enum EImageOutputType {
|
|
190
|
+
PNG = 'png',
|
|
191
|
+
WEBP = 'webp',
|
|
192
|
+
JPEG = 'jpeg',
|
|
193
|
+
}
|
|
194
|
+
|
|
189
195
|
export const configSchema = z.object({
|
|
190
196
|
version: z.string(),
|
|
191
197
|
cache: z.boolean().optional().default(true),
|
|
198
|
+
secureImageLinks: z.boolean().optional(),
|
|
199
|
+
imageOutputType: z.nativeEnum(EImageOutputType).optional().default(EImageOutputType.PNG),
|
|
192
200
|
interface: z
|
|
193
201
|
.object({
|
|
194
202
|
privacyPolicy: z
|
|
@@ -381,7 +389,17 @@ export const supportsBalanceCheck = {
|
|
|
381
389
|
[EModelEndpoint.azureOpenAI]: true,
|
|
382
390
|
};
|
|
383
391
|
|
|
384
|
-
export const visionModels = [
|
|
392
|
+
export const visionModels = [
|
|
393
|
+
'gpt-4-vision',
|
|
394
|
+
'llava-13b',
|
|
395
|
+
'gemini-pro-vision',
|
|
396
|
+
'claude-3',
|
|
397
|
+
'gemini-1.5',
|
|
398
|
+
'gpt-4-turbo',
|
|
399
|
+
];
|
|
400
|
+
export enum VisionModes {
|
|
401
|
+
generative = 'generative',
|
|
402
|
+
}
|
|
385
403
|
|
|
386
404
|
export function validateVisionModel({
|
|
387
405
|
model,
|
|
@@ -396,6 +414,10 @@ export function validateVisionModel({
|
|
|
396
414
|
return false;
|
|
397
415
|
}
|
|
398
416
|
|
|
417
|
+
if (model === 'gpt-4-turbo-preview') {
|
|
418
|
+
return false;
|
|
419
|
+
}
|
|
420
|
+
|
|
399
421
|
if (availableModels && !availableModels.includes(model)) {
|
|
400
422
|
return false;
|
|
401
423
|
}
|
|
@@ -484,6 +506,8 @@ export enum AuthKeys {
|
|
|
484
506
|
GOOGLE_SERVICE_KEY = 'GOOGLE_SERVICE_KEY',
|
|
485
507
|
/**
|
|
486
508
|
* API key to use Google Generative AI.
|
|
509
|
+
*
|
|
510
|
+
* Note: this is not for Environment Variables, but to access encrypted object values.
|
|
487
511
|
*/
|
|
488
512
|
GOOGLE_API_KEY = 'GOOGLE_API_KEY',
|
|
489
513
|
}
|
|
@@ -545,7 +569,7 @@ export enum Constants {
|
|
|
545
569
|
/**
|
|
546
570
|
* Key for the Custom Config's version (librechat.yaml).
|
|
547
571
|
*/
|
|
548
|
-
CONFIG_VERSION = '1.0.
|
|
572
|
+
CONFIG_VERSION = '1.0.6',
|
|
549
573
|
/**
|
|
550
574
|
* Standard value for the first message's `parentMessageId` value, to indicate no parent exists.
|
|
551
575
|
*/
|