librechat-data-provider 0.1.2 → 0.1.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.
@@ -0,0 +1,625 @@
1
+ import { z } from 'zod';
2
+ export declare enum EModelEndpoint {
3
+ azureOpenAI = "azureOpenAI",
4
+ openAI = "openAI",
5
+ bingAI = "bingAI",
6
+ chatGPT = "chatGPT",
7
+ chatGPTBrowser = "chatGPTBrowser",
8
+ google = "google",
9
+ gptPlugins = "gptPlugins",
10
+ anthropic = "anthropic"
11
+ }
12
+ export declare const eModelEndpointSchema: z.ZodNativeEnum<typeof EModelEndpoint>;
13
+ export declare const tMessageSchema: z.ZodObject<{
14
+ messageId: z.ZodString;
15
+ conversationId: z.ZodString;
16
+ clientId: z.ZodString;
17
+ parentMessageId: z.ZodString;
18
+ sender: z.ZodString;
19
+ text: z.ZodString;
20
+ isCreatedByUser: z.ZodBoolean;
21
+ error: z.ZodBoolean;
22
+ createdAt: z.ZodString;
23
+ updatedAt: z.ZodString;
24
+ }, "strip", z.ZodTypeAny, {
25
+ messageId: string;
26
+ conversationId: string;
27
+ clientId: string;
28
+ parentMessageId: string;
29
+ sender: string;
30
+ text: string;
31
+ isCreatedByUser: boolean;
32
+ error: boolean;
33
+ createdAt: string;
34
+ updatedAt: string;
35
+ }, {
36
+ messageId: string;
37
+ conversationId: string;
38
+ clientId: string;
39
+ parentMessageId: string;
40
+ sender: string;
41
+ text: string;
42
+ isCreatedByUser: boolean;
43
+ error: boolean;
44
+ createdAt: string;
45
+ updatedAt: string;
46
+ }>;
47
+ export type TMessage = z.infer<typeof tMessageSchema>;
48
+ export declare const tPluginAuthConfigSchema: z.ZodObject<{
49
+ authField: z.ZodString;
50
+ label: z.ZodString;
51
+ description: z.ZodString;
52
+ }, "strip", z.ZodTypeAny, {
53
+ authField: string;
54
+ label: string;
55
+ description: string;
56
+ }, {
57
+ authField: string;
58
+ label: string;
59
+ description: string;
60
+ }>;
61
+ export type TPluginAuthConfig = z.infer<typeof tPluginAuthConfigSchema>;
62
+ export declare const tPluginSchema: z.ZodObject<{
63
+ name: z.ZodString;
64
+ pluginKey: z.ZodString;
65
+ description: z.ZodString;
66
+ icon: z.ZodString;
67
+ authConfig: z.ZodArray<z.ZodObject<{
68
+ authField: z.ZodString;
69
+ label: z.ZodString;
70
+ description: z.ZodString;
71
+ }, "strip", z.ZodTypeAny, {
72
+ authField: string;
73
+ label: string;
74
+ description: string;
75
+ }, {
76
+ authField: string;
77
+ label: string;
78
+ description: string;
79
+ }>, "many">;
80
+ authenticated: z.ZodOptional<z.ZodBoolean>;
81
+ isButton: z.ZodOptional<z.ZodBoolean>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ description: string;
84
+ name: string;
85
+ pluginKey: string;
86
+ icon: string;
87
+ authConfig: {
88
+ authField: string;
89
+ label: string;
90
+ description: string;
91
+ }[];
92
+ authenticated?: boolean | undefined;
93
+ isButton?: boolean | undefined;
94
+ }, {
95
+ description: string;
96
+ name: string;
97
+ pluginKey: string;
98
+ icon: string;
99
+ authConfig: {
100
+ authField: string;
101
+ label: string;
102
+ description: string;
103
+ }[];
104
+ authenticated?: boolean | undefined;
105
+ isButton?: boolean | undefined;
106
+ }>;
107
+ export type TPlugin = z.infer<typeof tPluginSchema>;
108
+ export declare const tExampleSchema: z.ZodObject<{
109
+ input: z.ZodObject<{
110
+ content: z.ZodString;
111
+ }, "strip", z.ZodTypeAny, {
112
+ content: string;
113
+ }, {
114
+ content: string;
115
+ }>;
116
+ output: z.ZodObject<{
117
+ content: z.ZodString;
118
+ }, "strip", z.ZodTypeAny, {
119
+ content: string;
120
+ }, {
121
+ content: string;
122
+ }>;
123
+ }, "strip", z.ZodTypeAny, {
124
+ input: {
125
+ content: string;
126
+ };
127
+ output: {
128
+ content: string;
129
+ };
130
+ }, {
131
+ input: {
132
+ content: string;
133
+ };
134
+ output: {
135
+ content: string;
136
+ };
137
+ }>;
138
+ export type TExample = z.infer<typeof tExampleSchema>;
139
+ export declare const tAgentOptionsSchema: z.ZodObject<{
140
+ agent: z.ZodString;
141
+ skipCompletion: z.ZodBoolean;
142
+ model: z.ZodString;
143
+ temperature: z.ZodNumber;
144
+ }, "strip", z.ZodTypeAny, {
145
+ agent: string;
146
+ skipCompletion: boolean;
147
+ model: string;
148
+ temperature: number;
149
+ }, {
150
+ agent: string;
151
+ skipCompletion: boolean;
152
+ model: string;
153
+ temperature: number;
154
+ }>;
155
+ export declare const tConversationSchema: z.ZodObject<{
156
+ conversationId: z.ZodNullable<z.ZodString>;
157
+ title: z.ZodString;
158
+ user: z.ZodOptional<z.ZodString>;
159
+ endpoint: z.ZodNullable<z.ZodNativeEnum<typeof EModelEndpoint>>;
160
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
161
+ messages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
163
+ name: z.ZodString;
164
+ pluginKey: z.ZodString;
165
+ description: z.ZodString;
166
+ icon: z.ZodString;
167
+ authConfig: z.ZodArray<z.ZodObject<{
168
+ authField: z.ZodString;
169
+ label: z.ZodString;
170
+ description: z.ZodString;
171
+ }, "strip", z.ZodTypeAny, {
172
+ authField: string;
173
+ label: string;
174
+ description: string;
175
+ }, {
176
+ authField: string;
177
+ label: string;
178
+ description: string;
179
+ }>, "many">;
180
+ authenticated: z.ZodOptional<z.ZodBoolean>;
181
+ isButton: z.ZodOptional<z.ZodBoolean>;
182
+ }, "strip", z.ZodTypeAny, {
183
+ description: string;
184
+ name: string;
185
+ pluginKey: string;
186
+ icon: string;
187
+ authConfig: {
188
+ authField: string;
189
+ label: string;
190
+ description: string;
191
+ }[];
192
+ authenticated?: boolean | undefined;
193
+ isButton?: boolean | undefined;
194
+ }, {
195
+ description: string;
196
+ name: string;
197
+ pluginKey: string;
198
+ icon: string;
199
+ authConfig: {
200
+ authField: string;
201
+ label: string;
202
+ description: string;
203
+ }[];
204
+ authenticated?: boolean | undefined;
205
+ isButton?: boolean | undefined;
206
+ }>, "many">>;
207
+ createdAt: z.ZodString;
208
+ updatedAt: z.ZodString;
209
+ systemMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ modelLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
211
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
212
+ input: z.ZodObject<{
213
+ content: z.ZodString;
214
+ }, "strip", z.ZodTypeAny, {
215
+ content: string;
216
+ }, {
217
+ content: string;
218
+ }>;
219
+ output: z.ZodObject<{
220
+ content: z.ZodString;
221
+ }, "strip", z.ZodTypeAny, {
222
+ content: string;
223
+ }, {
224
+ content: string;
225
+ }>;
226
+ }, "strip", z.ZodTypeAny, {
227
+ input: {
228
+ content: string;
229
+ };
230
+ output: {
231
+ content: string;
232
+ };
233
+ }, {
234
+ input: {
235
+ content: string;
236
+ };
237
+ output: {
238
+ content: string;
239
+ };
240
+ }>, "many">>;
241
+ chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
+ userLabel: z.ZodOptional<z.ZodString>;
243
+ model: z.ZodOptional<z.ZodString>;
244
+ promptPrefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
245
+ temperature: z.ZodOptional<z.ZodNumber>;
246
+ topP: z.ZodOptional<z.ZodNumber>;
247
+ topK: z.ZodOptional<z.ZodNumber>;
248
+ context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
249
+ top_p: z.ZodOptional<z.ZodNumber>;
250
+ frequency_penalty: z.ZodOptional<z.ZodNumber>;
251
+ presence_penalty: z.ZodOptional<z.ZodNumber>;
252
+ jailbreak: z.ZodOptional<z.ZodBoolean>;
253
+ jailbreakConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
254
+ conversationSignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
255
+ parentMessageId: z.ZodOptional<z.ZodString>;
256
+ clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
257
+ invocationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
258
+ toneStyle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
259
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
260
+ agentOptions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
261
+ agent: z.ZodString;
262
+ skipCompletion: z.ZodBoolean;
263
+ model: z.ZodString;
264
+ temperature: z.ZodNumber;
265
+ }, "strip", z.ZodTypeAny, {
266
+ agent: string;
267
+ skipCompletion: boolean;
268
+ model: string;
269
+ temperature: number;
270
+ }, {
271
+ agent: string;
272
+ skipCompletion: boolean;
273
+ model: string;
274
+ temperature: number;
275
+ }>>>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ conversationId: string | null;
278
+ createdAt: string;
279
+ updatedAt: string;
280
+ title: string;
281
+ endpoint: EModelEndpoint | null;
282
+ user?: string | undefined;
283
+ suggestions?: string[] | undefined;
284
+ messages?: string[] | undefined;
285
+ tools?: {
286
+ description: string;
287
+ name: string;
288
+ pluginKey: string;
289
+ icon: string;
290
+ authConfig: {
291
+ authField: string;
292
+ label: string;
293
+ description: string;
294
+ }[];
295
+ authenticated?: boolean | undefined;
296
+ isButton?: boolean | undefined;
297
+ }[] | undefined;
298
+ systemMessage?: string | null | undefined;
299
+ modelLabel?: string | null | undefined;
300
+ examples?: {
301
+ input: {
302
+ content: string;
303
+ };
304
+ output: {
305
+ content: string;
306
+ };
307
+ }[] | undefined;
308
+ chatGptLabel?: string | null | undefined;
309
+ userLabel?: string | undefined;
310
+ model?: string | undefined;
311
+ promptPrefix?: string | null | undefined;
312
+ temperature?: number | undefined;
313
+ topP?: number | undefined;
314
+ topK?: number | undefined;
315
+ context?: string | null | undefined;
316
+ top_p?: number | undefined;
317
+ frequency_penalty?: number | undefined;
318
+ presence_penalty?: number | undefined;
319
+ jailbreak?: boolean | undefined;
320
+ jailbreakConversationId?: string | null | undefined;
321
+ conversationSignature?: string | null | undefined;
322
+ parentMessageId?: string | undefined;
323
+ clientId?: string | null | undefined;
324
+ invocationId?: number | null | undefined;
325
+ toneStyle?: string | null | undefined;
326
+ maxOutputTokens?: number | undefined;
327
+ agentOptions?: {
328
+ agent: string;
329
+ skipCompletion: boolean;
330
+ model: string;
331
+ temperature: number;
332
+ } | null | undefined;
333
+ }, {
334
+ conversationId: string | null;
335
+ createdAt: string;
336
+ updatedAt: string;
337
+ title: string;
338
+ endpoint: EModelEndpoint | null;
339
+ user?: string | undefined;
340
+ suggestions?: string[] | undefined;
341
+ messages?: string[] | undefined;
342
+ tools?: {
343
+ description: string;
344
+ name: string;
345
+ pluginKey: string;
346
+ icon: string;
347
+ authConfig: {
348
+ authField: string;
349
+ label: string;
350
+ description: string;
351
+ }[];
352
+ authenticated?: boolean | undefined;
353
+ isButton?: boolean | undefined;
354
+ }[] | undefined;
355
+ systemMessage?: string | null | undefined;
356
+ modelLabel?: string | null | undefined;
357
+ examples?: {
358
+ input: {
359
+ content: string;
360
+ };
361
+ output: {
362
+ content: string;
363
+ };
364
+ }[] | undefined;
365
+ chatGptLabel?: string | null | undefined;
366
+ userLabel?: string | undefined;
367
+ model?: string | undefined;
368
+ promptPrefix?: string | null | undefined;
369
+ temperature?: number | undefined;
370
+ topP?: number | undefined;
371
+ topK?: number | undefined;
372
+ context?: string | null | undefined;
373
+ top_p?: number | undefined;
374
+ frequency_penalty?: number | undefined;
375
+ presence_penalty?: number | undefined;
376
+ jailbreak?: boolean | undefined;
377
+ jailbreakConversationId?: string | null | undefined;
378
+ conversationSignature?: string | null | undefined;
379
+ parentMessageId?: string | undefined;
380
+ clientId?: string | null | undefined;
381
+ invocationId?: number | null | undefined;
382
+ toneStyle?: string | null | undefined;
383
+ maxOutputTokens?: number | undefined;
384
+ agentOptions?: {
385
+ agent: string;
386
+ skipCompletion: boolean;
387
+ model: string;
388
+ temperature: number;
389
+ } | null | undefined;
390
+ }>;
391
+ export type TConversation = z.infer<typeof tConversationSchema>;
392
+ export declare const tPresetSchema: z.ZodObject<{
393
+ clientId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
394
+ parentMessageId: z.ZodOptional<z.ZodString>;
395
+ model: z.ZodOptional<z.ZodString>;
396
+ temperature: z.ZodOptional<z.ZodNumber>;
397
+ user: z.ZodOptional<z.ZodString>;
398
+ endpoint: z.ZodNullable<z.ZodNativeEnum<typeof EModelEndpoint>>;
399
+ suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
400
+ messages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
401
+ tools: z.ZodOptional<z.ZodArray<z.ZodObject<{
402
+ name: z.ZodString;
403
+ pluginKey: z.ZodString;
404
+ description: z.ZodString;
405
+ icon: z.ZodString;
406
+ authConfig: z.ZodArray<z.ZodObject<{
407
+ authField: z.ZodString;
408
+ label: z.ZodString;
409
+ description: z.ZodString;
410
+ }, "strip", z.ZodTypeAny, {
411
+ authField: string;
412
+ label: string;
413
+ description: string;
414
+ }, {
415
+ authField: string;
416
+ label: string;
417
+ description: string;
418
+ }>, "many">;
419
+ authenticated: z.ZodOptional<z.ZodBoolean>;
420
+ isButton: z.ZodOptional<z.ZodBoolean>;
421
+ }, "strip", z.ZodTypeAny, {
422
+ description: string;
423
+ name: string;
424
+ pluginKey: string;
425
+ icon: string;
426
+ authConfig: {
427
+ authField: string;
428
+ label: string;
429
+ description: string;
430
+ }[];
431
+ authenticated?: boolean | undefined;
432
+ isButton?: boolean | undefined;
433
+ }, {
434
+ description: string;
435
+ name: string;
436
+ pluginKey: string;
437
+ icon: string;
438
+ authConfig: {
439
+ authField: string;
440
+ label: string;
441
+ description: string;
442
+ }[];
443
+ authenticated?: boolean | undefined;
444
+ isButton?: boolean | undefined;
445
+ }>, "many">>;
446
+ systemMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
447
+ modelLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
448
+ examples: z.ZodOptional<z.ZodArray<z.ZodObject<{
449
+ input: z.ZodObject<{
450
+ content: z.ZodString;
451
+ }, "strip", z.ZodTypeAny, {
452
+ content: string;
453
+ }, {
454
+ content: string;
455
+ }>;
456
+ output: z.ZodObject<{
457
+ content: z.ZodString;
458
+ }, "strip", z.ZodTypeAny, {
459
+ content: string;
460
+ }, {
461
+ content: string;
462
+ }>;
463
+ }, "strip", z.ZodTypeAny, {
464
+ input: {
465
+ content: string;
466
+ };
467
+ output: {
468
+ content: string;
469
+ };
470
+ }, {
471
+ input: {
472
+ content: string;
473
+ };
474
+ output: {
475
+ content: string;
476
+ };
477
+ }>, "many">>;
478
+ chatGptLabel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
479
+ userLabel: z.ZodOptional<z.ZodString>;
480
+ promptPrefix: z.ZodOptional<z.ZodNullable<z.ZodString>>;
481
+ topP: z.ZodOptional<z.ZodNumber>;
482
+ topK: z.ZodOptional<z.ZodNumber>;
483
+ context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
484
+ top_p: z.ZodOptional<z.ZodNumber>;
485
+ frequency_penalty: z.ZodOptional<z.ZodNumber>;
486
+ presence_penalty: z.ZodOptional<z.ZodNumber>;
487
+ jailbreak: z.ZodOptional<z.ZodBoolean>;
488
+ jailbreakConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
489
+ conversationSignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
490
+ invocationId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
491
+ toneStyle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
492
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
493
+ agentOptions: z.ZodOptional<z.ZodNullable<z.ZodObject<{
494
+ agent: z.ZodString;
495
+ skipCompletion: z.ZodBoolean;
496
+ model: z.ZodString;
497
+ temperature: z.ZodNumber;
498
+ }, "strip", z.ZodTypeAny, {
499
+ agent: string;
500
+ skipCompletion: boolean;
501
+ model: string;
502
+ temperature: number;
503
+ }, {
504
+ agent: string;
505
+ skipCompletion: boolean;
506
+ model: string;
507
+ temperature: number;
508
+ }>>>;
509
+ conversationId: z.ZodOptional<z.ZodString>;
510
+ presetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
511
+ title: z.ZodOptional<z.ZodNullable<z.ZodString>>;
512
+ }, "strip", z.ZodTypeAny, {
513
+ endpoint: EModelEndpoint | null;
514
+ clientId?: string | null | undefined;
515
+ parentMessageId?: string | undefined;
516
+ model?: string | undefined;
517
+ temperature?: number | undefined;
518
+ user?: string | undefined;
519
+ suggestions?: string[] | undefined;
520
+ messages?: string[] | undefined;
521
+ tools?: {
522
+ description: string;
523
+ name: string;
524
+ pluginKey: string;
525
+ icon: string;
526
+ authConfig: {
527
+ authField: string;
528
+ label: string;
529
+ description: string;
530
+ }[];
531
+ authenticated?: boolean | undefined;
532
+ isButton?: boolean | undefined;
533
+ }[] | undefined;
534
+ systemMessage?: string | null | undefined;
535
+ modelLabel?: string | null | undefined;
536
+ examples?: {
537
+ input: {
538
+ content: string;
539
+ };
540
+ output: {
541
+ content: string;
542
+ };
543
+ }[] | undefined;
544
+ chatGptLabel?: string | null | undefined;
545
+ userLabel?: string | undefined;
546
+ promptPrefix?: string | null | undefined;
547
+ topP?: number | undefined;
548
+ topK?: number | undefined;
549
+ context?: string | null | undefined;
550
+ top_p?: number | undefined;
551
+ frequency_penalty?: number | undefined;
552
+ presence_penalty?: number | undefined;
553
+ jailbreak?: boolean | undefined;
554
+ jailbreakConversationId?: string | null | undefined;
555
+ conversationSignature?: string | null | undefined;
556
+ invocationId?: number | null | undefined;
557
+ toneStyle?: string | null | undefined;
558
+ maxOutputTokens?: number | undefined;
559
+ agentOptions?: {
560
+ agent: string;
561
+ skipCompletion: boolean;
562
+ model: string;
563
+ temperature: number;
564
+ } | null | undefined;
565
+ conversationId?: string | undefined;
566
+ presetId?: string | null | undefined;
567
+ title?: string | null | undefined;
568
+ }, {
569
+ endpoint: EModelEndpoint | null;
570
+ clientId?: string | null | undefined;
571
+ parentMessageId?: string | undefined;
572
+ model?: string | undefined;
573
+ temperature?: number | undefined;
574
+ user?: string | undefined;
575
+ suggestions?: string[] | undefined;
576
+ messages?: string[] | undefined;
577
+ tools?: {
578
+ description: string;
579
+ name: string;
580
+ pluginKey: string;
581
+ icon: string;
582
+ authConfig: {
583
+ authField: string;
584
+ label: string;
585
+ description: string;
586
+ }[];
587
+ authenticated?: boolean | undefined;
588
+ isButton?: boolean | undefined;
589
+ }[] | undefined;
590
+ systemMessage?: string | null | undefined;
591
+ modelLabel?: string | null | undefined;
592
+ examples?: {
593
+ input: {
594
+ content: string;
595
+ };
596
+ output: {
597
+ content: string;
598
+ };
599
+ }[] | undefined;
600
+ chatGptLabel?: string | null | undefined;
601
+ userLabel?: string | undefined;
602
+ promptPrefix?: string | null | undefined;
603
+ topP?: number | undefined;
604
+ topK?: number | undefined;
605
+ context?: string | null | undefined;
606
+ top_p?: number | undefined;
607
+ frequency_penalty?: number | undefined;
608
+ presence_penalty?: number | undefined;
609
+ jailbreak?: boolean | undefined;
610
+ jailbreakConversationId?: string | null | undefined;
611
+ conversationSignature?: string | null | undefined;
612
+ invocationId?: number | null | undefined;
613
+ toneStyle?: string | null | undefined;
614
+ maxOutputTokens?: number | undefined;
615
+ agentOptions?: {
616
+ agent: string;
617
+ skipCompletion: boolean;
618
+ model: string;
619
+ temperature: number;
620
+ } | null | undefined;
621
+ conversationId?: string | undefined;
622
+ presetId?: string | null | undefined;
623
+ title?: string | null | undefined;
624
+ }>;
625
+ export type TPreset = z.infer<typeof tPresetSchema>;