mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-22 18:34:08 +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
40
client/src/store/preset.js
Normal file
40
client/src/store/preset.js
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
import endpoints from './endpoints';
|
||||
import { atom, selector, useSetRecoilState, useResetRecoilState, useRecoilCallback } from 'recoil';
|
||||
|
||||
// preset structure is as same defination as conversation
|
||||
// sample structure
|
||||
// {
|
||||
// presetId: 'new',
|
||||
// title: 'New Chat',
|
||||
// user: null,
|
||||
// // endpoint: [azureOpenAI, openAI, bingAI, chatGPTBrowser]
|
||||
// endpoint: 'azureOpenAI',
|
||||
// // for azureOpenAI, openAI, chatGPTBrowser only
|
||||
// model: 'gpt-3.5-turbo',
|
||||
// // for azureOpenAI, openAI only
|
||||
// chatGptLabel: null,
|
||||
// promptPrefix: null,
|
||||
// temperature: 1,
|
||||
// top_p: 1,
|
||||
// presence_penalty: 0,
|
||||
// frequency_penalty: 0,
|
||||
// // for bingAI only
|
||||
// jailbreak: false,
|
||||
// jailbreakConversationId: null,
|
||||
// conversationSignature: null,
|
||||
// clientId: null,
|
||||
// invocationId: 1,
|
||||
// toneStyle: null,
|
||||
// };
|
||||
|
||||
// an array of saved presets.
|
||||
// sample structure
|
||||
// [preset1, preset2, preset3]
|
||||
const presets = atom({
|
||||
key: 'presets',
|
||||
default: []
|
||||
});
|
||||
|
||||
export default {
|
||||
presets
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue