FreeGpt / utils /app /api.ts
Daniton's picture
Duplicate from yxmnjxzx/chatbot-mini
5d4afba
raw
history blame
253 Bytes
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';
};