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.

27 lines (22 loc) 960 B
import { DEFAULT_SYSTEM_AGENT_CONFIG } from '@/const/settings'; import type { UserStore } from '@/store/user'; import { merge } from '@/utils/merge'; import { currentSettings } from './settings'; const currentSystemAgent = (s: UserStore) => merge(DEFAULT_SYSTEM_AGENT_CONFIG, currentSettings(s).systemAgent); const translation = (s: UserStore) => currentSystemAgent(s).translation; const topic = (s: UserStore) => currentSystemAgent(s).topic; const thread = (s: UserStore) => currentSystemAgent(s).thread; const agentMeta = (s: UserStore) => currentSystemAgent(s).agentMeta; const queryRewrite = (s: UserStore) => currentSystemAgent(s).queryRewrite; const historyCompress = (s: UserStore) => currentSystemAgent(s).historyCompress; const generationTopic = (s: UserStore) => currentSystemAgent(s).generationTopic; export const systemAgentSelectors = { agentMeta, generationTopic, historyCompress, queryRewrite, thread, topic, translation, };