mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 14:12:10 +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",
|
role: "user",
|
||||||
content: formatMessagesForProcessing(request.session?.messages || []),
|
content: formatMessagesForProcessing((request as any).session?.messages || []),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
temperature: 0.1,
|
temperature: 0.1,
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import {
|
|||||||
type SentimentCategory,
|
type SentimentCategory,
|
||||||
type SessionCategory,
|
type SessionCategory,
|
||||||
AIRequestStatus,
|
AIRequestStatus,
|
||||||
|
type AIProcessingRequest,
|
||||||
} from "@prisma/client";
|
} from "@prisma/client";
|
||||||
import cron from "node-cron";
|
import cron from "node-cron";
|
||||||
import fetch from "node-fetch";
|
import fetch from "node-fetch";
|
||||||
@ -877,7 +878,7 @@ async function createBatchRequestsForSessions(batchSize: number | null = null):
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create AI processing requests for batch processing
|
// Create AI processing requests for batch processing
|
||||||
const batchRequests = [];
|
const batchRequests: AIProcessingRequest[] = [];
|
||||||
for (const session of sessionsWithMessages) {
|
for (const session of sessionsWithMessages) {
|
||||||
try {
|
try {
|
||||||
// Get company's AI model
|
// Get company's AI model
|
||||||
|
|||||||
Reference in New Issue
Block a user