mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🏷️ fix: Ensure modelLabel Field Usage for ModelSpecs/GPTPlugins (#4224)
This commit is contained in:
parent
321260e3c7
commit
6f498eee0f
4 changed files with 20 additions and 10 deletions
|
|
@ -1018,6 +1018,7 @@ export const compactChatGPTSchema = tConversationSchema
|
|||
export const compactPluginsSchema = tConversationSchema
|
||||
.pick({
|
||||
model: true,
|
||||
modelLabel: true,
|
||||
chatGptLabel: true,
|
||||
promptPrefix: true,
|
||||
temperature: true,
|
||||
|
|
@ -1033,6 +1034,9 @@ export const compactPluginsSchema = tConversationSchema
|
|||
})
|
||||
.transform((obj) => {
|
||||
const newObj: Partial<TConversation> = { ...obj };
|
||||
if (newObj.modelLabel === null) {
|
||||
delete newObj.modelLabel;
|
||||
}
|
||||
if (newObj.chatGptLabel === null) {
|
||||
delete newObj.chatGptLabel;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue