@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.
25 lines (20 loc) • 860 B
text/typescript
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;
export const systemAgentSelectors = {
agentMeta,
historyCompress,
queryRewrite,
thread,
topic,
translation,
};