mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-18 01:10:14 +01:00
feat(Message): add and handle isEdited property when edited/continued as this can include user input
This commit is contained in:
parent
cc260105ec
commit
327a69dba3
11 changed files with 17 additions and 41 deletions
|
|
@ -61,6 +61,7 @@ router.post(
|
|||
text: partialText,
|
||||
unfinished: true,
|
||||
cancelled: false,
|
||||
isEdited: true,
|
||||
error: false,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ router.post(
|
|||
model: endpointOption.modelOptions.model,
|
||||
unfinished: true,
|
||||
cancelled: false,
|
||||
isEdited: true,
|
||||
error: false,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ router.post(
|
|||
model: endpointOption.modelOptions.model,
|
||||
unfinished: true,
|
||||
cancelled: false,
|
||||
isEdited: true,
|
||||
error: false,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,47 +12,6 @@ const EModelEndpoint = {
|
|||
|
||||
const eModelEndpointSchema = z.nativeEnum(EModelEndpoint);
|
||||
|
||||
/*
|
||||
const tMessageSchema = z.object({
|
||||
messageId: z.string(),
|
||||
clientId: z.string().nullable().optional(),
|
||||
conversationId: z.string().nullable(),
|
||||
parentMessageId: z.string().nullable(),
|
||||
sender: z.string(),
|
||||
text: z.string(),
|
||||
isCreatedByUser: z.boolean(),
|
||||
error: z.boolean(),
|
||||
createdAt: z
|
||||
.string()
|
||||
.optional()
|
||||
.default(() => new Date().toISOString()),
|
||||
updatedAt: z
|
||||
.string()
|
||||
.optional()
|
||||
.default(() => new Date().toISOString()),
|
||||
current: z.boolean().optional(),
|
||||
unfinished: z.boolean().optional(),
|
||||
submitting: z.boolean().optional(),
|
||||
searchResult: z.boolean().optional(),
|
||||
finish_reason: z.string().optional(),
|
||||
});
|
||||
|
||||
const tPresetSchema = tConversationSchema
|
||||
.omit({
|
||||
conversationId: true,
|
||||
createdAt: true,
|
||||
updatedAt: true,
|
||||
title: true,
|
||||
})
|
||||
.merge(
|
||||
z.object({
|
||||
conversationId: z.string().optional(),
|
||||
presetId: z.string().nullable().optional(),
|
||||
title: z.string().nullable().optional(),
|
||||
}),
|
||||
);
|
||||
*/
|
||||
|
||||
const tPluginAuthConfigSchema = z.object({
|
||||
authField: z.string(),
|
||||
label: z.string(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue