@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.
41 lines (34 loc) • 994 B
text/typescript
import { z } from 'zod';
import { AgentSchema } from '@/database/_deprecated/schemas/session';
import { LobeMetaDataSchema } from '@/types/meta';
const generalSechma = z.object({
fontSize: z.number().default(14),
language: z.string(),
neutralColor: z.string().optional(),
password: z.string(),
themeMode: z.string(),
});
const settingsSchema = z.object({
defaultAgent: z.object({
config: AgentSchema,
meta: LobeMetaDataSchema,
}),
general: generalSechma.partial().optional(),
keyVaults: z.any().optional(),
languageModel: z.any().optional(),
tts: z.object({
openAI: z.object({
sttModel: z.string(),
ttsModel: z.string(),
}),
sttAutoStop: z.boolean(),
sttServer: z.string(),
}),
});
export const DB_UserSchema = z.object({
avatar: z.string().optional(),
settings: settingsSchema.partial(),
uuid: z.string(),
});
export type DB_User = z.infer<typeof DB_UserSchema>;
export type DB_Settings = z.infer<typeof settingsSchema>;