feat: Implement compliance document analysis and chat functionality
- Added API functions for document analysis, compliance result retrieval, and chat streaming. - Integrated document upload and analysis in CompliancePage with progress simulation. - Enhanced DocsPage to load documents from the API and handle file uploads with parsing and embedding. - Updated RagChatPage to fetch quick questions from the API and handle chat responses with streaming. - Improved StatusPage to display system statistics and configuration from the API. - Configured Vite to proxy API requests to the backend server.
This commit is contained in:
19
src/api/status.ts
Normal file
19
src/api/status.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import { fetchAPI, type SystemStats, type SystemConfig } from './index';
|
||||
|
||||
// Get system statistics
|
||||
export async function getSystemStats(): Promise<SystemStats> {
|
||||
return fetchAPI<SystemStats>('/status/stats');
|
||||
}
|
||||
|
||||
// Get system configuration
|
||||
export async function getSystemConfig(): Promise<SystemConfig> {
|
||||
return fetchAPI<SystemConfig>('/status/config');
|
||||
}
|
||||
|
||||
// Get Milvus health status
|
||||
export async function getMilvusHealth(): Promise<{ connected: boolean; collections: string[] }> {
|
||||
return fetchAPI('/status/milvus/health');
|
||||
}
|
||||
|
||||
// Export types
|
||||
export type { SystemStats, SystemConfig };
|
||||
Reference in New Issue
Block a user