UNPKG

@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.

18 lines (14 loc) 690 B
import { getServerFeatureFlagsValue } from '@/config/featureFlags'; import { publicProcedure, router } from '@/libs/trpc/edge'; import { getServerDefaultAgentConfig, getServerGlobalConfig } from '@/server/globalConfig'; import { GlobalRuntimeConfig } from '@/types/serverConfig'; export const configRouter = router({ getDefaultAgentConfig: publicProcedure.query(async () => { return getServerDefaultAgentConfig(); }), getGlobalConfig: publicProcedure.query(async (): Promise<GlobalRuntimeConfig> => { const serverConfig = await getServerGlobalConfig(); const serverFeatureFlags = getServerFeatureFlagsValue(); return { serverConfig, serverFeatureFlags }; }), });