feat: enhance asset import functionality and unit tracking
- Added WHISPER_URL environment variable to docker-compose for audio transcription service. - Updated Nginx configuration to increase timeout settings for API requests. - Enhanced asset ingestion process to extract unit numbers from ZIP entry paths, supporting various naming conventions. - Implemented logic to split intensive courses into two regular courses during asset import. - Added new fields to the Asset and QuestionBank models to track unit numbers and source asset links. - Introduced backward-compatible fallbacks for fetching study plans and courses from legacy MySQL database. - Improved error handling and progress tracking during ZIP file uploads in the frontend. - Created a new SQL migration to add unit_number and source_asset_id columns to the assets and question_bank tables, along with necessary indexes for performance.
This commit is contained in:
@@ -347,6 +347,7 @@ pub struct Asset {
|
||||
pub english_level: Option<String>,
|
||||
pub sam_plan_id: Option<i32>,
|
||||
pub sam_course_id: Option<i32>,
|
||||
pub unit_number: Option<i32>,
|
||||
pub filename: String,
|
||||
pub storage_path: String,
|
||||
pub mimetype: String,
|
||||
@@ -1402,6 +1403,8 @@ pub struct QuestionBank {
|
||||
pub updated_at: chrono::DateTime<chrono::Utc>,
|
||||
pub embedding: Option<String>, // PGVector embedding for semantic search
|
||||
pub embedding_updated_at: Option<chrono::DateTime<chrono::Utc>>,
|
||||
pub source_asset_id: Option<Uuid>, // audio/video asset that originated this RAG chunk
|
||||
pub unit_number: Option<i32>, // syllabus unit number from ZIP folder structure
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user