@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.
37 lines (32 loc) • 809 B
text/typescript
import { useTranslation } from 'react-i18next';
export interface GroupTemplate {
description: string;
id: string;
members: Array<{
avatar: string;
backgroundColor?: string;
plugins?: string[];
systemRole: string;
title: string;
}>;
title: string;
}
export const useGroupTemplates = (): GroupTemplate[] => {
const { t } = useTranslation('welcome');
const templateKeys = [
'brainstorm',
'analysis',
'writing',
'planning',
'product',
'game',
] as const;
return templateKeys.map((key) => ({
description: t(`guide.groupTemplates.${key}.description`),
id: key,
members: t(`guide.groupTemplates.${key}.members`, {
returnObjects: true,
}) as GroupTemplate['members'],
title: t(`guide.groupTemplates.${key}.title`),
}));
};