UNPKG

@lobehub/chat

Version:

Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.

19 lines (14 loc) 682 B
import isEqual from 'fast-deep-equal'; import { isDeprecatedEdition } from '@/const/version'; import { useAiInfraStore } from '@/store/aiInfra'; import { useUserStore } from '@/store/user'; import { modelProviderSelectors } from '@/store/user/selectors'; import { EnabledProviderWithModels } from '@/types/aiProvider'; export const useEnabledChatModels = (): EnabledProviderWithModels[] => { const enabledList = useUserStore(modelProviderSelectors.modelProviderListForModelSelect, isEqual); const enabledChatModelList = useAiInfraStore((s) => s.enabledChatModelList, isEqual); if (isDeprecatedEdition) { return enabledList; } return enabledChatModelList || []; };