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.

51 lines (43 loc) 1.11 kB
export enum AsyncTaskType { Chunking = 'chunk', Embedding = 'embedding', } export enum AsyncTaskStatus { Error = 'error', Pending = 'pending', Processing = 'processing', Success = 'success', } export enum AsyncTaskErrorType { EmbeddingError = 'EmbeddingError', /** * the chunk parse result it empty */ NoChunkError = 'NoChunkError', ServerError = 'ServerError', /** * this happens when the task is not trigger successfully */ TaskTriggerError = 'TaskTriggerError', Timeout = 'TaskTimeout', } export interface IAsyncTaskError { body: string | { detail: string }; name: string; } export class AsyncTaskError implements IAsyncTaskError { constructor(name: string, message: string) { this.name = name; this.body = { detail: message }; } name: string; body: { detail: string }; } export interface FileParsingTask { chunkCount?: number | null; chunkingError?: IAsyncTaskError | null; chunkingStatus?: AsyncTaskStatus | null; embeddingError?: IAsyncTaskError | null; embeddingStatus?: AsyncTaskStatus | null; finishEmbedding?: boolean; }