@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) • 1.31 kB
text/typescript
/* eslint-disable typescript-sort-keys/interface */
import { BatchTaskResult } from '@/types/service';
import { ChatTopic, TopicRankItem } from '@/types/topic';
export interface CreateTopicParams {
favorite?: boolean;
groupId?: string | null;
messages?: string[];
sessionId?: string | null;
title: string;
}
export interface QueryTopicParams {
current?: number;
containerId?: string | null; // sessionId or groupId
pageSize?: number;
}
export interface ITopicService {
createTopic(params: CreateTopicParams): Promise<string>;
batchCreateTopics(importTopics: ChatTopic[]): Promise<BatchTaskResult>;
cloneTopic(id: string, newTitle?: string): Promise<string>;
getTopics(params: QueryTopicParams): Promise<ChatTopic[]>;
getAllTopics(): Promise<ChatTopic[]>;
countTopics(params?: {
endDate?: string;
range?: [string, string];
startDate?: string;
}): Promise<number>;
rankTopics(limit?: number): Promise<TopicRankItem[]>;
searchTopics(keyword: string, sessionId?: string, groupId?: string): Promise<ChatTopic[]>;
updateTopic(id: string, data: Partial<ChatTopic>): Promise<any>;
removeTopic(id: string): Promise<any>;
removeTopics(sessionId: string): Promise<any>;
batchRemoveTopics(topics: string[]): Promise<any>;
removeAllTopic(): Promise<any>;
}