Checkpoint: Ajout de la section "Moteur IA" dans les paramètres : sélecteur Mistral/Manus, champs clé API avec affichage masqué, persistance en DB, migration VPS appliquée
This commit is contained in:
@@ -200,6 +200,12 @@ export const appRouter = router({
|
||||
} : undefined;
|
||||
|
||||
const model = settings?.llmModel || "mistral-large-latest";
|
||||
const aiSettings = settings ? {
|
||||
aiProvider: (settings as any).aiProvider || "mistral",
|
||||
mistralApiKey: (settings as any).mistralApiKey || null,
|
||||
manusForgeApiKey: (settings as any).manusForgeApiKey || null,
|
||||
manusForgeApiUrl: (settings as any).manusForgeApiUrl || null,
|
||||
} : undefined;
|
||||
|
||||
// Extract invoices
|
||||
const result = await extractInvoicesWithMistral(
|
||||
@@ -207,7 +213,8 @@ export const appRouter = router({
|
||||
userId,
|
||||
sourceFile.id,
|
||||
model,
|
||||
customKeywords
|
||||
customKeywords,
|
||||
aiSettings
|
||||
);
|
||||
|
||||
// Update source file with total count
|
||||
@@ -932,6 +939,10 @@ export const appRouter = router({
|
||||
sftpAutoExport: z.number().optional(),
|
||||
llmLogsRetentionMonths: z.number().optional(),
|
||||
learningConfidenceThreshold: z.number().min(1).optional(),
|
||||
aiProvider: z.enum(["mistral", "manus"]).optional(),
|
||||
mistralApiKey: z.string().optional(),
|
||||
manusForgeApiKey: z.string().optional(),
|
||||
manusForgeApiUrl: z.string().optional(),
|
||||
}))
|
||||
.mutation(async ({ input, ctx }) => {
|
||||
await upsertUserSettings({
|
||||
|
||||
Reference in New Issue
Block a user