Skip to content

Commit

Permalink
fix: allow customs in model filter
Browse files Browse the repository at this point in the history
  • Loading branch information
danny-avila committed Mar 16, 2023
1 parent a3cd201 commit eec7ca3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions client/src/components/Models/ModelMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ import { swr } from '~/utils/fetchers';
import { setModels, setInitial } from '~/store/modelSlice';
import { setMessages } from '~/store/messageSlice';
import { setText } from '~/store/textSlice';
import GPTIcon from '../svg/GPTIcon';
import BingIcon from '../svg/BingIcon';
import { Button } from '../ui/Button.tsx';
import { getIconOfModel } from '../../utils';

Expand Down Expand Up @@ -102,7 +100,7 @@ export default function ModelMenu() {
localStorage.setItem('model', JSON.stringify(model));
}, [model]);

const filteredModels = models.filter(({model}) => initial[model])
const filteredModels = models.filter(({model, _id }) => initial[model] || _id.length > 1 );

const onChange = (value) => {
if (!value) {
Expand Down

0 comments on commit eec7ca3

Please sign in to comment.