Files
Mckay Wrigley e1f286efb8 push (#414)
2023-04-04 09:41:24 -06:00

14 lines
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';
};