mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
feat: remove customGpts
This commit is contained in:
parent
5aa6b516ed
commit
8c2d577e60
16 changed files with 58 additions and 281 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import conversation from './conversation';
|
||||
import conversations from './conversations';
|
||||
import models from './models';
|
||||
import endpoints from './endpoints';
|
||||
import user from './user';
|
||||
import text from './text';
|
||||
|
|
@ -11,10 +10,9 @@ import preset from './preset';
|
|||
export default {
|
||||
...conversation,
|
||||
...conversations,
|
||||
...models,
|
||||
...endpoints,
|
||||
...user,
|
||||
text,
|
||||
...text,
|
||||
...submission,
|
||||
...search,
|
||||
...preset
|
||||
|
|
|
|||
|
|
@ -1,80 +0,0 @@
|
|||
import React from "react";
|
||||
import {
|
||||
RecoilRoot,
|
||||
atom,
|
||||
selector,
|
||||
useRecoilState,
|
||||
useRecoilValue,
|
||||
} from "recoil";
|
||||
|
||||
const customGPTModels = atom({
|
||||
key: "customGPTModels",
|
||||
default: [],
|
||||
});
|
||||
|
||||
const models = selector({
|
||||
key: "models",
|
||||
get: ({ get }) => {
|
||||
return [
|
||||
{
|
||||
_id: "0",
|
||||
name: "ChatGPT",
|
||||
value: "chatgpt",
|
||||
model: "chatgpt",
|
||||
},
|
||||
{
|
||||
_id: "1",
|
||||
name: "CustomGPT",
|
||||
value: "chatgptCustom",
|
||||
model: "chatgptCustom",
|
||||
},
|
||||
{
|
||||
_id: "2",
|
||||
name: "BingAI",
|
||||
value: "bingai",
|
||||
model: "bingai",
|
||||
},
|
||||
{
|
||||
_id: "3",
|
||||
name: "Sydney",
|
||||
value: "sydney",
|
||||
model: "sydney",
|
||||
},
|
||||
{
|
||||
_id: "4",
|
||||
name: "ChatGPT",
|
||||
value: "chatgptBrowser",
|
||||
model: "chatgptBrowser",
|
||||
},
|
||||
...get(customGPTModels),
|
||||
];
|
||||
},
|
||||
});
|
||||
|
||||
const modelsFilter = atom({
|
||||
key: "modelsFilter",
|
||||
default: {
|
||||
chatgpt: false,
|
||||
chatgptCustom: false,
|
||||
bingai: false,
|
||||
sydney: false,
|
||||
chatgptBrowser: false,
|
||||
},
|
||||
});
|
||||
|
||||
const availableModels = selector({
|
||||
key: "availableModels",
|
||||
get: ({ get }) => {
|
||||
const m = get(models);
|
||||
const f = get(modelsFilter);
|
||||
return m.filter(({ model }) => f[model]);
|
||||
},
|
||||
});
|
||||
// const modelAvailable
|
||||
|
||||
export default {
|
||||
customGPTModels,
|
||||
models,
|
||||
modelsFilter,
|
||||
availableModels,
|
||||
};
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
import endpoints from './endpoints';
|
||||
import { atom, selector, useSetRecoilState, useResetRecoilState, useRecoilCallback } from 'recoil';
|
||||
import { atom } from 'recoil';
|
||||
|
||||
// preset structure is as same defination as conversation
|
||||
// sample structure
|
||||
|
|
@ -20,11 +19,9 @@ import { atom, selector, useSetRecoilState, useResetRecoilState, useRecoilCallba
|
|||
// frequency_penalty: 0,
|
||||
// // for bingAI only
|
||||
// jailbreak: false,
|
||||
// jailbreakConversationId: null,
|
||||
// conversationSignature: null,
|
||||
// clientId: null,
|
||||
// invocationId: 1,
|
||||
// toneStyle: null,
|
||||
// context: null,
|
||||
// systemMessage: null,
|
||||
// };
|
||||
|
||||
// an array of saved presets.
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@ const text = atom({
|
|||
default: ''
|
||||
});
|
||||
|
||||
export default text;
|
||||
export default { text };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue