File size: 910 Bytes
f0743f4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | import { SelectDropDown } from '@librechat/client';
import type { TModelSelectProps } from '~/common';
import SelectDropDownPop from '~/components/Input/ModelSelect/SelectDropDownPop';
import { cn, cardStyle } from '~/utils';
export default function ChatGPT({
conversation,
setOption,
models,
showAbove,
popover = false,
}: TModelSelectProps) {
if (!conversation) {
return null;
}
const { conversationId, model } = conversation;
if (conversationId !== 'new') {
return null;
}
const Menu = popover ? SelectDropDownPop : SelectDropDown;
return (
<Menu
value={model ?? ''}
setValue={setOption('model')}
availableValues={models}
showAbove={showAbove}
showLabel={false}
className={cn(
cardStyle,
'z-50 flex h-[40px] w-60 min-w-48 flex-none items-center justify-center px-4 ring-0 hover:cursor-pointer',
)}
/>
);
}
|