mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 11:12:11 +01:00
fix: resolve TypeScript compilation errors in batch processing
- Fix type assertion for session access in batchProcessor.ts - Add explicit type annotation for batchRequests array in processingScheduler.ts - Import AIProcessingRequest type from Prisma client - All TypeScript compilation errors resolved
This commit is contained in:
@ -152,7 +152,7 @@ export async function createBatchRequest(
|
||||
},
|
||||
{
|
||||
role: "user",
|
||||
content: formatMessagesForProcessing(request.session?.messages || []),
|
||||
content: formatMessagesForProcessing((request as any).session?.messages || []),
|
||||
},
|
||||
],
|
||||
temperature: 0.1,
|
||||
|
||||
@ -5,6 +5,7 @@ import {
|
||||
type SentimentCategory,
|
||||
type SessionCategory,
|
||||
AIRequestStatus,
|
||||
type AIProcessingRequest,
|
||||
} from "@prisma/client";
|
||||
import cron from "node-cron";
|
||||
import fetch from "node-fetch";
|
||||
@ -877,7 +878,7 @@ async function createBatchRequestsForSessions(batchSize: number | null = null):
|
||||
}
|
||||
|
||||
// Create AI processing requests for batch processing
|
||||
const batchRequests = [];
|
||||
const batchRequests: AIProcessingRequest[] = [];
|
||||
for (const session of sessionsWithMessages) {
|
||||
try {
|
||||
// Get company's AI model
|
||||
|
||||
Reference in New Issue
Block a user