UNPKG

@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.

43 lines (37 loc) 842 B
import { z } from 'zod'; export enum ThreadType { Continuation = 'continuation', Standalone = 'standalone', } export enum ThreadStatus { Active = 'active', Archived = 'archived', Deprecated = 'deprecated', } export interface ThreadItem { createdAt: Date; id: string; lastActiveAt: Date; parentThreadId?: string; sourceMessageId: string; status: ThreadStatus; title: string; topicId: string; type: ThreadType; updatedAt: Date; userId: string; } export interface CreateThreadParams { parentThreadId?: string; sourceMessageId: string; title?: string; topicId: string; type: ThreadType; } export const createThreadSchema = z.object({ parentThreadId: z.string().optional(), sourceMessageId: z.string(), title: z.string().optional(), topicId: z.string(), type: z.nativeEnum(ThreadType), });