mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-06 02:28:51 +01:00
feat: feat: new endpoint-style endpoint select
fix: a wrong use of bingai params
This commit is contained in:
parent
adcc021c9e
commit
e8e3903b78
18 changed files with 7891 additions and 233 deletions
|
|
@ -32,13 +32,15 @@ const askBing = async ({
|
|||
jailbreakConversationId: jailbreakConversationId || jailbreak,
|
||||
parentMessageId,
|
||||
conversationId,
|
||||
conversationSignature,
|
||||
clientId,
|
||||
invocationId,
|
||||
toneStyle,
|
||||
onProgress
|
||||
};
|
||||
|
||||
if (conversationSignature) options.conversationSignature = conversationSignature;
|
||||
if (conversationSignature) options.clientId = clientId;
|
||||
if (conversationSignature) options.invocationId = invocationId;
|
||||
if (conversationSignature) options.toneStyle = toneStyle;
|
||||
|
||||
if (options?.jailbreakConversationId == 'false') {
|
||||
options.jailbreakConversationId = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,9 @@ const migrateToSupportBetterCustomization = async () => {
|
|||
convo.endpoint = 'chatGPTBrowser';
|
||||
convo.model = 'text-davinci-002-render-sha';
|
||||
convo.jailbreak = true;
|
||||
} else {
|
||||
convo.endpoint = 'openAI';
|
||||
convo.model = 'gpt-3.5-turbo';
|
||||
}
|
||||
|
||||
promises.push(convo.save());
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ const convoSchema = mongoose.Schema(
|
|||
default: null
|
||||
},
|
||||
invocationId: {
|
||||
type: String,
|
||||
default: null
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
toneStyle: {
|
||||
type: String,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,12 @@ router.post('/', async (req, res) => {
|
|||
|
||||
if (!overrideParentMessageId) {
|
||||
await saveBingMessage(userMessage);
|
||||
await saveConvo(req?.session?.user?.username, { ...userMessage, ...endpointOption, conversationId });
|
||||
await saveConvo(req?.session?.user?.username, {
|
||||
...userMessage,
|
||||
...endpointOption,
|
||||
conversationId,
|
||||
endpoint
|
||||
});
|
||||
}
|
||||
|
||||
return await ask({
|
||||
|
|
|
|||
|
|
@ -42,7 +42,12 @@ router.post('/', async (req, res) => {
|
|||
|
||||
if (!overrideParentMessageId) {
|
||||
await saveMessage(userMessage);
|
||||
await saveConvo(req?.session?.user?.username, { ...userMessage, ...endpointOption, conversationId });
|
||||
await saveConvo(req?.session?.user?.username, {
|
||||
...userMessage,
|
||||
...endpointOption,
|
||||
conversationId,
|
||||
endpoint
|
||||
});
|
||||
}
|
||||
|
||||
return await ask({
|
||||
|
|
|
|||
|
|
@ -47,7 +47,12 @@ router.post('/', async (req, res) => {
|
|||
|
||||
if (!overrideParentMessageId) {
|
||||
await saveMessage(userMessage);
|
||||
await saveConvo(req?.session?.user?.username, { ...userMessage, ...endpointOption, conversationId });
|
||||
await saveConvo(req?.session?.user?.username, {
|
||||
...userMessage,
|
||||
...endpointOption,
|
||||
conversationId,
|
||||
endpoint
|
||||
});
|
||||
}
|
||||
|
||||
return await ask({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue