librechat-data-provider 0.7.3 → 0.7.5

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/src/types.ts CHANGED
@@ -7,6 +7,8 @@ import type {
7
7
  TSharedLink,
8
8
  TConversation,
9
9
  EModelEndpoint,
10
+ TConversationTag,
11
+ TBanner,
10
12
  } from './schemas';
11
13
  import type { TSpecsConfig } from './models';
12
14
  export type TOpenAIMessage = OpenAI.Chat.ChatCompletionMessageParam;
@@ -25,6 +27,7 @@ export type TEndpointOption = {
25
27
  endpointType?: EModelEndpoint;
26
28
  modelDisplayLabel?: string;
27
29
  resendFiles?: boolean;
30
+ promptCache?: boolean;
28
31
  maxContextTokens?: number;
29
32
  imageDetail?: ImageDetail;
30
33
  model?: string | null;
@@ -49,6 +52,7 @@ export type TPayload = Partial<TMessage> &
49
52
  };
50
53
 
51
54
  export type TSubmission = {
55
+ artifacts?: string;
52
56
  plugin?: TResPlugin;
53
57
  plugins?: TResPlugin[];
54
58
  userMessage: TMessage;
@@ -57,11 +61,13 @@ export type TSubmission = {
57
61
  messages: TMessage[];
58
62
  isRegenerate?: boolean;
59
63
  conversationId?: string;
60
- initialResponse: TMessage;
64
+ initialResponse?: TMessage;
61
65
  conversation: Partial<TConversation>;
62
66
  endpointOption: TEndpointOption;
63
67
  };
64
68
 
69
+ export type EventSubmission = Omit<TSubmission, 'initialResponse'> & { initialResponse: TMessage };
70
+
65
71
  export type TPluginAction = {
66
72
  pluginKey: string;
67
73
  action: 'install' | 'uninstall';
@@ -73,6 +79,7 @@ export type GroupedConversations = [key: string, TConversation[]][];
73
79
 
74
80
  export type TUpdateUserPlugins = {
75
81
  isAssistantTool?: boolean;
82
+ isAgentTool?: boolean;
76
83
  pluginKey: string;
77
84
  action: string;
78
85
  auth?: unknown;
@@ -86,7 +93,7 @@ export type TCategory = {
86
93
 
87
94
  export type TError = {
88
95
  message: string;
89
- code?: number;
96
+ code?: number | string;
90
97
  response?: {
91
98
  data?: {
92
99
  message?: string;
@@ -122,6 +129,13 @@ export type TUpdateMessageRequest = {
122
129
  text: string;
123
130
  };
124
131
 
132
+ export type TUpdateMessageContent = {
133
+ conversationId: string;
134
+ messageId: string;
135
+ index: number;
136
+ text: string;
137
+ };
138
+
125
139
  export type TUpdateUserKeyRequest = {
126
140
  name: string;
127
141
  value: string;
@@ -170,6 +184,24 @@ export type TSharedLinkResponse = TSharedLink;
170
184
  export type TSharedLinksResponse = TSharedLink[];
171
185
  export type TDeleteSharedLinkResponse = TSharedLink;
172
186
 
187
+ // type for getting conversation tags
188
+ export type TConversationTagsResponse = TConversationTag[];
189
+ // type for creating conversation tag
190
+ export type TConversationTagRequest = Partial<
191
+ Omit<TConversationTag, 'createdAt' | 'updatedAt' | 'count' | 'user'>
192
+ > & {
193
+ conversationId?: string;
194
+ addToConversation?: boolean;
195
+ };
196
+
197
+ export type TConversationTagResponse = TConversationTag;
198
+
199
+ // type for tagging conversation
200
+ export type TTagConversationRequest = {
201
+ tags: string[];
202
+ };
203
+ export type TTagConversationResponse = string[];
204
+
173
205
  export type TForkConvoRequest = {
174
206
  messageId: string;
175
207
  conversationId: string;
@@ -197,6 +229,7 @@ export type TConfig = {
197
229
  type?: EModelEndpoint;
198
230
  azure?: boolean;
199
231
  availableTools?: [];
232
+ availableRegions?: string[];
200
233
  plugins?: Record<string, string>;
201
234
  name?: string;
202
235
  iconURL?: string;
@@ -235,6 +268,7 @@ export type TRegisterUser = {
235
268
  username: string;
236
269
  password: string;
237
270
  confirm_password?: string;
271
+ token?: string;
238
272
  };
239
273
 
240
274
  export type TLoginUser = {
@@ -275,12 +309,18 @@ export type TInterfaceConfig = {
275
309
  termsOfService?: {
276
310
  externalUrl?: string;
277
311
  openNewTab?: boolean;
312
+ modalAcceptance?: boolean;
313
+ modalTitle?: string;
314
+ modalContent?: string;
278
315
  };
279
316
  endpointsMenu: boolean;
280
317
  modelSelect: boolean;
281
318
  parameters: boolean;
282
319
  sidePanel: boolean;
283
320
  presets: boolean;
321
+ multiConvo: boolean;
322
+ bookmarks: boolean;
323
+ prompts: boolean;
284
324
  };
285
325
 
286
326
  export type TStartupConfig = {
@@ -294,7 +334,13 @@ export type TStartupConfig = {
294
334
  openidLoginEnabled: boolean;
295
335
  openidLabel: string;
296
336
  openidImageUrl: string;
297
- ldapLoginEnabled: boolean;
337
+ /** LDAP Auth Configuration */
338
+ ldap?: {
339
+ /** LDAP enabled */
340
+ enabled: boolean;
341
+ /** Whether LDAP uses username vs. email */
342
+ username?: boolean;
343
+ };
298
344
  serverDomain: string;
299
345
  emailLoginEnabled: boolean;
300
346
  registrationEnabled: boolean;
@@ -465,3 +511,13 @@ export type TGetRandomPromptsRequest = {
465
511
  };
466
512
 
467
513
  export type TCustomConfigSpeechResponse = { [key: string]: string };
514
+
515
+ export type TUserTermsResponse = {
516
+ termsAccepted: boolean;
517
+ };
518
+
519
+ export type TAcceptTermsResponse = {
520
+ success: boolean;
521
+ };
522
+
523
+ export type TBannerResponse = TBanner | null;