mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-19 01:40:15 +01:00
feat: add preset and edit preset.
This commit is contained in:
parent
80ef5008dd
commit
45e17da241
29 changed files with 592 additions and 493 deletions
|
|
@ -44,7 +44,9 @@ const buildDefaultConversation = ({ conversation, endpoint, lastConversationSetu
|
|||
return conversation;
|
||||
};
|
||||
|
||||
const getDefaultConversation = ({ conversation, prevConversation, endpointsFilter, targetEndpoint }) => {
|
||||
const getDefaultConversation = ({ conversation, prevConversation, endpointsFilter, preset }) => {
|
||||
const { endpoint: targetEndpoint } = preset || {};
|
||||
|
||||
if (targetEndpoint) {
|
||||
// try to use current model
|
||||
const endpoint = targetEndpoint;
|
||||
|
|
@ -52,7 +54,7 @@ const getDefaultConversation = ({ conversation, prevConversation, endpointsFilte
|
|||
conversation = buildDefaultConversation({
|
||||
conversation,
|
||||
endpoint,
|
||||
lastConversationSetup: {}
|
||||
lastConversationSetup: preset
|
||||
});
|
||||
return conversation;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue