fix: transmettre aiSettings (provider Manus) lors de l'import email
This commit is contained in:
@@ -86,15 +86,22 @@ async function processEmailAttachment(
|
||||
} : undefined;
|
||||
|
||||
const model = settings?.llmModel || "mistral-large-latest";
|
||||
const aiSettings = settings ? {
|
||||
aiProvider: settings.aiProvider,
|
||||
mistralApiKey: settings.mistralApiKey,
|
||||
manusForgeApiKey: settings.manusForgeApiKey,
|
||||
manusForgeApiUrl: settings.manusForgeApiUrl,
|
||||
} : undefined;
|
||||
|
||||
// Extract invoices
|
||||
console.log(`[EmailImport] Starting invoice extraction...`);
|
||||
console.log(`[EmailImport] Starting invoice extraction (provider: ${aiSettings?.aiProvider || 'mistral'})...`);
|
||||
const result = await extractInvoicesWithMistral(
|
||||
fileBuffer,
|
||||
userId,
|
||||
sourceFile.id,
|
||||
model,
|
||||
customKeywords
|
||||
customKeywords,
|
||||
aiSettings
|
||||
);
|
||||
|
||||
console.log(`[EmailImport] Extraction complete: ${result.invoiceCount} invoice(s) detected`);
|
||||
|
||||
Reference in New Issue
Block a user