34 lines
582 B
TypeScript
34 lines
582 B
TypeScript
|
|
// Document types
|
||
|
|
export interface Doc {
|
||
|
|
id: number;
|
||
|
|
name: string;
|
||
|
|
chunks: number;
|
||
|
|
size: string;
|
||
|
|
status: 'indexed' | 'parsing' | 'pending';
|
||
|
|
}
|
||
|
|
|
||
|
|
// Search result types
|
||
|
|
export interface SearchResult {
|
||
|
|
id: number;
|
||
|
|
score: number;
|
||
|
|
law: string;
|
||
|
|
preview: string;
|
||
|
|
source: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
// Chat message types
|
||
|
|
export interface ChatMessage {
|
||
|
|
id: number;
|
||
|
|
role: 'user' | 'assistant';
|
||
|
|
content: string;
|
||
|
|
retrievalIds?: number[];
|
||
|
|
}
|
||
|
|
|
||
|
|
// Retrieval data types
|
||
|
|
export interface RetrievalData {
|
||
|
|
id: number;
|
||
|
|
file: string;
|
||
|
|
clause: string;
|
||
|
|
score: number;
|
||
|
|
content: string;
|
||
|
|
}
|