🐛 fix: Preserve Default Model in Message Requests (#1857)

* fix: do not remove default model from message request

* chore: bump data-provider
This commit is contained in:
Danny Avila 2024-02-21 13:29:21 -05:00 committed by GitHub
parent dd8038b375
commit 128446601a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 18 deletions

View file

@ -1,6 +1,6 @@
{
"name": "librechat-data-provider",
"version": "0.4.2",
"version": "0.4.3",
"description": "data services for librechat apps",
"main": "dist/index.js",
"module": "dist/index.es.js",

View file

@ -506,9 +506,6 @@ export const compactOpenAISchema = tConversationSchema
})
.transform((obj: Partial<TConversation>) => {
const newObj: Partial<TConversation> = { ...obj };
if (newObj.model === 'gpt-3.5-turbo') {
delete newObj.model;
}
if (newObj.temperature === 1) {
delete newObj.temperature;
}
@ -545,9 +542,6 @@ export const compactGoogleSchema = tConversationSchema
})
.transform((obj) => {
const newObj: Partial<TConversation> = { ...obj };
if (newObj.model === google.model.default) {
delete newObj.model;
}
if (newObj.temperature === google.temperature.default) {
delete newObj.temperature;
}
@ -577,9 +571,6 @@ export const compactAnthropicSchema = tConversationSchema
})
.transform((obj) => {
const newObj: Partial<TConversation> = { ...obj };
if (newObj.model === 'claude-1') {
delete newObj.model;
}
if (newObj.temperature === 1) {
delete newObj.temperature;
}
@ -603,11 +594,6 @@ export const compactChatGPTSchema = tConversationSchema
})
.transform((obj) => {
const newObj: Partial<TConversation> = { ...obj };
// model: obj.model ?? 'text-davinci-002-render-sha',
if (newObj.model === 'text-davinci-002-render-sha') {
delete newObj.model;
}
return removeNullishValues(newObj);
})
.catch(() => ({}));
@ -626,9 +612,6 @@ export const compactPluginsSchema = tConversationSchema
})
.transform((obj) => {
const newObj: Partial<TConversation> = { ...obj };
if (newObj.model === 'gpt-3.5-turbo') {
delete newObj.model;
}
if (newObj.chatGptLabel === null) {
delete newObj.chatGptLabel;
}