Refactor code structure for improved readability and maintainability
Test Suite / test (24.x) (push) Has been cancelled

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Nils-Johan Gynther
2026-05-03 19:55:37 +02:00
parent 7bc785e8e0
commit 8f9e1bac1e
3 changed files with 4716 additions and 1 deletions
@@ -4,7 +4,7 @@
Logger,
ServiceUnavailableException,
} from '@nestjs/common';
import * as pdfParse from 'pdf-parse';
import pdfParse from 'pdf-parse';
const MISTRAL_API_URL = 'https://api.mistral.ai/v1/chat/completions';
const RECEIPT_VISION_MODEL = 'mistral-small-2603'; // vision — används för bild-input
@@ -186,6 +186,7 @@ function isIgnoredReceiptLine(value: string): boolean {
if (/^totalt\b/.test(normalized)) return true;
if (/^kort\b/.test(normalized)) return true;
if (/^kontant\b/.test(normalized)) return true;
if (/^willys\s+plus\s*[:\-]?\b/.test(normalized)) return true;
return false;
}