项目文件夹

文件
2023-08-15 20:53:37 +07:00

14 行
253 B
TypeScript

import { Plugin, PluginID } from '@/types/plugin';
export const getEndpoint = (plugin: Plugin | null) => {
if (!plugin) {
return 'api/chat';
}
if (plugin.id === PluginID.GOOGLE_SEARCH) {
return 'api/google';
}
return 'api/chat';
};