Refactor code structure for improved readability and maintainability
Test Suite / test (24.x) (push) Has been cancelled
Test Suite / test (24.x) (push) Has been cancelled
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Generated
+4713
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
|||||||
Logger,
|
Logger,
|
||||||
ServiceUnavailableException,
|
ServiceUnavailableException,
|
||||||
} from '@nestjs/common';
|
} 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 MISTRAL_API_URL = 'https://api.mistral.ai/v1/chat/completions';
|
||||||
const RECEIPT_VISION_MODEL = 'mistral-small-2603'; // vision — används för bild-input
|
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 (/^totalt\b/.test(normalized)) return true;
|
||||||
if (/^kort\b/.test(normalized)) return true;
|
if (/^kort\b/.test(normalized)) return true;
|
||||||
if (/^kontant\b/.test(normalized)) return true;
|
if (/^kontant\b/.test(normalized)) return true;
|
||||||
|
if (/^willys\s+plus\s*[:\-]?\b/.test(normalized)) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user