feat: route invoice analysis through referentiel ia
This commit is contained in:
@@ -103,6 +103,7 @@ import pathSync from "path";
|
||||
import { extractInvoicesWithMistral, generateMetadataJSON } from "./invoiceExtractor";
|
||||
import { calculateFileSha256 } from "./fileFingerprint";
|
||||
import { localStoragePut, generateStorageKey } from "./localStorage";
|
||||
import { testReferentialIaConnection } from "./referentialIa";
|
||||
import { testSftpConnection, exportInvoiceToSftp, getUserSftpConfig } from "./sftpExport";
|
||||
import { drawBapCartouche } from "./bapCartouche";
|
||||
import { resolveBapExportDestination } from "./exportDestinationResolver";
|
||||
@@ -1237,7 +1238,7 @@ export const appRouter = router({
|
||||
sftpAutoExport: z.number().optional(),
|
||||
llmLogsRetentionMonths: z.number().optional(),
|
||||
learningConfidenceThreshold: z.number().min(1).optional(),
|
||||
aiProvider: z.enum(["mistral", "manus", "gemini"]).optional(),
|
||||
aiProvider: z.enum(["mistral", "manus", "gemini", "referentiel"]).optional(),
|
||||
mistralApiKey: z.string().optional(),
|
||||
manusForgeApiKey: z.string().optional(),
|
||||
manusForgeApiUrl: z.string().optional(),
|
||||
@@ -1250,6 +1251,12 @@ export const appRouter = router({
|
||||
});
|
||||
return { success: true };
|
||||
}),
|
||||
|
||||
/** Vérifie le choix centralisé sans transmettre de facture ni de clé au navigateur. */
|
||||
testReferentielIa: protectedProcedure.mutation(async () => {
|
||||
const result = await testReferentialIaConnection();
|
||||
return { success: true, ...result };
|
||||
}),
|
||||
}),
|
||||
|
||||
// ============= ADMIN ROUTES =============
|
||||
|
||||
Reference in New Issue
Block a user