@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.
23 lines (15 loc) • 690 B
text/typescript
import { globalHelpers } from '@/store/global/helpers';
import { DiscoverPlugintem } from '@/types/discover';
import { convertOpenAIManifestToLobeManifest, getToolManifest } from '@/utils/toolManifest';
import { API_ENDPOINTS } from './_url';
class ToolService {
getToolList = async (): Promise<DiscoverPlugintem[]> => {
const locale = globalHelpers.getCurrentLanguage();
const res = await fetch(`${API_ENDPOINTS.pluginStore}?locale=${locale}`);
const json = await res.json();
return json.plugins;
};
getToolManifest = getToolManifest;
convertOpenAIManifestToLobeManifest = convertOpenAIManifestToLobeManifest;
}
export const toolService = new ToolService();