/// export declare enum Status { loading = "loading", success = "success", error = "error", end = "end" } export declare enum ContentType { text = "text", img = "img", component = "component", slot = "slot" } export declare enum Role { system = "system", assistant = "assistant", user = "user", tool = "tool", knowledge = "knowledge" } export interface IContentMessage { id: string; title: string; createAt: number; updateAt: number; participants: IParticipant[]; messages: IMessage[]; } export interface IParticipant { id: string; name: string; role: Role; avatar: string; } interface ImageURL { url: string; detail?: 'auto' | 'low' | 'high'; } export interface ImageURLContentBlock { image_url: ImageURL; type: 'image_url'; } export interface TextContentBlock { text: string; type: 'text'; } export type MessageContent = ImageURLContentBlock | TextContentBlock; export interface Message { role: string; content: MessageContent[]; } export interface IMessage { id: string; parentId?: string; uid: string; content: string; contentType: ContentType; componentId?: string; role: Role; ext?: IExtraInfo[]; status?: Status; createAt: number; updateAt: number; timeCost: string; } export interface IExtraInfo { /** Source text for display purposes */ source?: string; /** Plugin name */ pluginName?: string; /** Knowledge base name */ knowledgeName?: string; /** Workflow name */ workflowName?: string; /** Database name */ databaseName?: string; /** Individual execution status */ status?: Status; /** Time taken for individual execution */ timeCost?: string; /** Content for display */ children?: React.ReactNode; /** Data used */ data?: any; } export {};