mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 01:40:15 +01:00
feat: use default preset to create new conversation.
This commit is contained in:
parent
579b53de29
commit
ee10e0e43e
4 changed files with 51 additions and 51 deletions
|
|
@ -50,7 +50,7 @@ const getDefaultConversation = ({ conversation, prevConversation, endpointsFilte
|
|||
const { endpoint: targetEndpoint } = preset || {};
|
||||
|
||||
if (targetEndpoint) {
|
||||
// try to use current model
|
||||
// try to use preset
|
||||
const endpoint = targetEndpoint;
|
||||
if (endpointsFilter?.[endpoint]) {
|
||||
conversation = buildDefaultConversation({
|
||||
|
|
@ -65,18 +65,18 @@ const getDefaultConversation = ({ conversation, prevConversation, endpointsFilte
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
// try to use current model
|
||||
const { endpoint = null } = prevConversation || {};
|
||||
if (endpointsFilter?.[endpoint]) {
|
||||
conversation = buildDefaultConversation({
|
||||
conversation,
|
||||
endpoint,
|
||||
lastConversationSetup: prevConversation
|
||||
});
|
||||
return conversation;
|
||||
}
|
||||
} catch (error) {}
|
||||
// try {
|
||||
// // try to use current model
|
||||
// const { endpoint = null } = prevConversation || {};
|
||||
// if (endpointsFilter?.[endpoint]) {
|
||||
// conversation = buildDefaultConversation({
|
||||
// conversation,
|
||||
// endpoint,
|
||||
// lastConversationSetup: prevConversation
|
||||
// });
|
||||
// return conversation;
|
||||
// }
|
||||
// } catch (error) {}
|
||||
|
||||
try {
|
||||
// try to read latest selected model from local storage
|
||||
|
|
@ -84,7 +84,7 @@ const getDefaultConversation = ({ conversation, prevConversation, endpointsFilte
|
|||
const { endpoint = null } = lastConversationSetup;
|
||||
|
||||
if (endpointsFilter?.[endpoint]) {
|
||||
conversation = buildDefaultConversation({ conversation, endpoint, lastConversationSetup });
|
||||
conversation = buildDefaultConversation({ conversation, endpoint });
|
||||
return conversation;
|
||||
}
|
||||
} catch (error) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue