import { EModelEndpoint } from 'librechat-data-provider'; import UnknownIcon from '~/components/Chat/Menus/Endpoints/UnknownIcon'; import { AzureMinimalIcon, OpenAIMinimalIcon, LightningIcon, MinimalPlugin, BingAIMinimalIcon, GoogleMinimalIcon, CustomMinimalIcon, AnthropicIcon, Sparkles, } from '~/components/svg'; import { cn } from '~/utils'; import { IconProps } from '~/common'; const MinimalIcon: React.FC = (props) => { const { size = 30, error } = props; let endpoint = 'default'; // Default value for endpoint if (typeof props.endpoint === 'string') { endpoint = props.endpoint; } const endpointIcons = { [EModelEndpoint.azureOpenAI]: { icon: , name: props.chatGptLabel || 'ChatGPT', }, [EModelEndpoint.openAI]: { icon: , name: props.chatGptLabel || 'ChatGPT' }, [EModelEndpoint.gptPlugins]: { icon: , name: 'Plugins' }, [EModelEndpoint.google]: { icon: , name: props.modelLabel || 'Google' }, [EModelEndpoint.anthropic]: { icon: , name: props.modelLabel || 'Claude', }, [EModelEndpoint.custom]: { icon: , name: 'Custom', }, [EModelEndpoint.bingAI]: { icon: , name: 'BingAI' }, [EModelEndpoint.chatGPTBrowser]: { icon: , name: 'ChatGPT' }, [EModelEndpoint.assistants]: { icon: , name: 'Assistant' }, default: { icon: ( ), name: endpoint, }, }; const { icon, name } = endpointIcons[endpoint] ?? endpointIcons.default; return (
{icon} {error && ( ! )}
); }; export default MinimalIcon;