mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-04 23:00:30 +08:00
Fix: update docs generator (#14070)
### What problem does this PR solve? Refactor: update docs generator ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) 1. Support multiple document generator components and correctly display messages in the message component. The document generator will not overwrite other messages. <img width="700" alt="Screenshot from 2026-04-13 13-56-17" src="https://github.com/user-attachments/assets/3f3e06e8-33ce-4df1-8b05-510c86af70a4" /> 2. Support Chinese content and ensure correct Markdown rendering in PDF and DOCX <img width="700" alt="image" src="https://github.com/user-attachments/assets/69bf1f7b-261d-48e5-a9f3-8e94462b90ed" /> 3. Simplify configuration page and support more output format <img height="700" alt="image" src="https://github.com/user-attachments/assets/8647374c-c055-4daa-ad71-cd9052eb138e" /> 4. Hide download from other components except for message <img width="700" alt="image" src="https://github.com/user-attachments/assets/a723dfcb-b60d-4eb5-b2f6-d41ca5955eb4" /> <img width="700" alt="image" src="https://github.com/user-attachments/assets/a8762ac4-807b-4f0b-9287-65f82f7c9c98" /> 5. Sanitize filename <img width="700" alt="image" src="https://github.com/user-attachments/assets/df49509f-37c0-40f9-b03d-bd6ce7fdefa8" /> 6. And more changes on usability
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import { MessageType } from '@/constants/chat';
|
||||
import { IAttachment } from '@/hooks/use-send-message';
|
||||
|
||||
export interface IDocumentDownloadInfo {
|
||||
doc_id: string;
|
||||
filename: string;
|
||||
mime_type: string;
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export interface PromptConfig {
|
||||
empty_response: string;
|
||||
parameters: Parameter[];
|
||||
@@ -104,6 +111,7 @@ export interface Message {
|
||||
files?: (File | UploadResponseDataType)[];
|
||||
chatBoxId?: string;
|
||||
attachment?: IAttachment;
|
||||
downloads?: IDocumentDownloadInfo[];
|
||||
}
|
||||
|
||||
export interface IReferenceChunk {
|
||||
@@ -134,6 +142,7 @@ export interface IReferenceObject {
|
||||
export interface IAnswer {
|
||||
answer: string;
|
||||
attachment?: IAttachment;
|
||||
downloads?: IDocumentDownloadInfo[];
|
||||
reference?: IReference;
|
||||
conversationId?: string;
|
||||
prompt?: string;
|
||||
|
||||
Reference in New Issue
Block a user