mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-19 00:36:12 +01:00
feat: new endpoint-style structure in client side
NOT FINISHED. model menu and icon and send message not work.
This commit is contained in:
parent
dd825dc6d4
commit
c53778e7c1
10 changed files with 172 additions and 243 deletions
26
client/src/store/endpoints.js
Normal file
26
client/src/store/endpoints.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { atom, selector } from 'recoil';
|
||||
|
||||
const endpointsFilter = atom({
|
||||
key: 'endpointsFilter',
|
||||
default: {
|
||||
azureOpenAI: false,
|
||||
openAI: false,
|
||||
bingAI: false,
|
||||
chatGPTBrowser: false
|
||||
}
|
||||
});
|
||||
|
||||
const availableEndpoints = selector({
|
||||
key: 'availableEndpoints',
|
||||
get: ({ get }) => {
|
||||
const endpoints = ['azureOpenAI', 'openAI', 'bingAI', 'chatGPTBrowser'];
|
||||
const f = get(endpointsFilter);
|
||||
return endpoints.filter(endpoint => f[endpoint]);
|
||||
}
|
||||
});
|
||||
// const modelAvailable
|
||||
|
||||
export default {
|
||||
endpointsFilter,
|
||||
availableEndpoints
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue