Spaces:
Sleeping
Sleeping
Download utils/app/api.ts from dolceschokolade/chatbot-mini: direct link, hf CLI and curl.
- Browser
- Download file 253 Bytes
-
https://huggingface.co/spaces/dolceschokolade/chatbot-mini/resolve/main/utils/app/api.ts
- Command line
-
hf download hf://spaces/dolceschokolade/chatbot-mini/utils/app/api.ts
-
curl -L -o api.ts https://huggingface.co/spaces/dolceschokolade/chatbot-mini/resolve/main/utils/app/api.ts
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'; | |
| }; | |