mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 11:12:11 +01:00
feat: implement OpenAI Batch API for cost-efficient AI processing
- Add AIBatchRequest and AIRequestStatus models to Prisma schema - Create comprehensive batch processing system (lib/batchProcessor.ts) - Add intelligent batch scheduler with automated management - Update processing pipeline to use batch requests instead of direct API calls - Integrate batch scheduler into main server startup - Achieve 50% cost reduction on OpenAI API usage - Improve rate limiting and processing reliability
This commit is contained in:
@ -6,6 +6,7 @@ import { getSchedulerConfig, logEnvConfig, validateEnv } from "./lib/env.js";
|
||||
import { startImportProcessingScheduler } from "./lib/importProcessor.js";
|
||||
import { startProcessingScheduler } from "./lib/processingScheduler.js";
|
||||
import { startCsvImportScheduler } from "./lib/scheduler.js";
|
||||
import { startBatchScheduler } from "./lib/batchScheduler.js";
|
||||
|
||||
const dev = process.env.NODE_ENV !== "production";
|
||||
const hostname = "localhost";
|
||||
@ -33,6 +34,7 @@ app.prepare().then(() => {
|
||||
startCsvImportScheduler();
|
||||
startImportProcessingScheduler();
|
||||
startProcessingScheduler();
|
||||
startBatchScheduler();
|
||||
console.log("All schedulers initialized successfully");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user