forked from hangshuo652/aurak
0a9588abb7
- Add pagination support to findAll (page, limit query params) - Add findByTemplateId method to service - Add GET /by-template/:templateId endpoint to controller - Service already includes CRUD for QuestionBank and QuestionBankItem
38 lines
864 B
TypeScript
38 lines
864 B
TypeScript
/**
|
|
* Vision Service Interface Definitions
|
|
*/
|
|
|
|
export interface VisionAnalysisResult {
|
|
text: string; // Extracted text content
|
|
images: ImageDescription[]; // Image description
|
|
layout: string; // Layout type
|
|
confidence: number; // Confidence (0-1)
|
|
pageIndex?: number; // Page number
|
|
}
|
|
|
|
export interface ImageDescription {
|
|
type: string; // Image type (chart/diagram/flowchart etc.)
|
|
description: string; // Detailed description
|
|
position?: number; // Position in page
|
|
}
|
|
|
|
export interface VisionModelConfig {
|
|
baseUrl: string;
|
|
apiKey: string;
|
|
modelId: string;
|
|
}
|
|
|
|
export interface BatchAnalysisResult {
|
|
results: VisionAnalysisResult[];
|
|
totalPages: number;
|
|
successCount: number;
|
|
failedCount: number;
|
|
estimatedCost: number; // Estimated cost(USD)
|
|
}
|
|
|
|
export interface PageQuality {
|
|
isGood: boolean;
|
|
reason?: string;
|
|
score?: number;
|
|
}
|