@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.
54 lines (45 loc) • 1.03 kB
text/typescript
import { BaseDataModel } from '@/types/meta';
// 类型定义
export type TimeGroupId =
| 'today'
| 'yesterday'
| 'week'
| 'month'
| `${number}-${string}`
| `${number}`;
/* eslint-disable typescript-sort-keys/string-enum */
export enum TopicDisplayMode {
ByTime = 'byTime',
Flat = 'flat',
// AscMessages = 'ascMessages',
// DescMessages = 'descMessages',
}
/* eslint-enable */
export interface GroupedTopic {
children: ChatTopic[];
id: string;
title?: string;
}
export interface ChatTopicMetadata {
model?: string;
provider?: string;
}
export interface ChatTopicSummary {
content: string;
model: string;
provider: string;
}
export interface ChatTopic extends Omit<BaseDataModel, 'meta'> {
favorite?: boolean;
historySummary?: string;
metadata?: ChatTopicMetadata;
sessionId?: string;
title: string;
}
export type ChatTopicMap = Record<string, ChatTopic>;
export interface TopicRankItem {
count: number;
id: string;
sessionId: string | null;
title: string | null;
}