mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
fix: add model to customGpts
fix: filter models by model only
This commit is contained in:
parent
a213868b17
commit
a90db1f1a4
1 changed files with 3 additions and 2 deletions
|
|
@ -38,7 +38,8 @@ export default function ModelMenu() {
|
|||
const { data, isLoading, mutate } = swr(`/api/customGpts`, (res) => {
|
||||
const fetchedModels = res.map((modelItem) => ({
|
||||
...modelItem,
|
||||
name: modelItem.chatGptLabel
|
||||
name: modelItem.chatGptLabel,
|
||||
model: 'chatgptCustom'
|
||||
}));
|
||||
|
||||
dispatch(setModels(fetchedModels));
|
||||
|
|
@ -100,7 +101,7 @@ export default function ModelMenu() {
|
|||
localStorage.setItem('model', JSON.stringify(model));
|
||||
}, [model]);
|
||||
|
||||
const filteredModels = models.filter(({model, _id }) => initial[model] || _id.length > 1 );
|
||||
const filteredModels = models.filter(({model, _id }) => initial[model] );
|
||||
|
||||
const onChange = (value) => {
|
||||
if (!value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue