import { EModelEndpoint } from 'librechat-data-provider'; import { AzureMinimalIcon, OpenAIMinimalIcon, LightningIcon, PluginMinimalIcon, BingAIMinimalIcon, GoogleMinimalIcon, AnthropicIcon, } 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.bingAI]: { icon: , name: 'BingAI' }, [EModelEndpoint.chatGPTBrowser]: { icon: , name: 'ChatGPT' }, default: { icon: , name: 'UNKNOWN' }, }; const { icon, name } = endpointIcons[endpoint] ?? endpointIcons.default; return (
{icon} {error && ( ! )}
); }; export default MinimalIcon;