forked from hangshuo652/aurak
feat: implement QuestionBank CRUD with pagination and template query
- 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
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
Reference in New Issue
Block a user