mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 08:52:10 +01:00
feat: Implement session processing and refresh schedulers
- Added processingScheduler.js and processingScheduler.ts to handle session transcript processing using OpenAI API. - Implemented a new scheduler (scheduler.js and schedulers.ts) for refreshing sessions every 15 minutes. - Updated Prisma migrations to add new fields for processed sessions, including questions, sentimentCategory, and summary. - Created scripts (process_sessions.mjs and process_sessions.ts) for manual processing of unprocessed sessions. - Enhanced server.js and server.mjs to initialize schedulers on server start.
This commit is contained in:
@ -43,7 +43,8 @@ model Session {
|
||||
country String?
|
||||
language String?
|
||||
messagesSent Int?
|
||||
sentiment Float?
|
||||
sentiment Float? // Original sentiment score (float)
|
||||
sentimentCategory String? // "positive", "neutral", "negative" from OpenAPI
|
||||
escalated Boolean?
|
||||
forwardedHr Boolean?
|
||||
fullTranscriptUrl String?
|
||||
@ -53,5 +54,8 @@ model Session {
|
||||
tokensEur Float?
|
||||
category String?
|
||||
initialMsg String?
|
||||
processed Boolean? // Flag for post-processing status
|
||||
questions String? // JSON array of questions asked by user
|
||||
summary String? // Brief summary of the conversation
|
||||
createdAt DateTime @default(now())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user