@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.
14 lines (11 loc) • 601 B
text/typescript
import { isDeprecatedEdition } from '@/const/version';
import { aiModelSelectors, getAiInfraStoreState } from '@/store/aiInfra';
import { getUserStoreState } from '@/store/user';
import { modelProviderSelectors } from '@/store/user/selectors';
export const isCanUseFC = (model: string, provider: string): boolean => {
// TODO: remove isDeprecatedEdition condition in V2.0
if (isDeprecatedEdition) {
return modelProviderSelectors.isModelEnabledFunctionCall(model)(getUserStoreState());
}
return aiModelSelectors.isModelSupportToolUse(model, provider)(getAiInfraStoreState()) || false;
};