one lazy ai
All checks were successful
Deploy to Web Server flyer-crawler.projectium.com / deploy (push) Successful in 4m2s

This commit is contained in:
2025-12-02 20:21:20 -08:00
parent 79bf264762
commit 0555ae29f5

View File

@@ -62,26 +62,6 @@ export const extractAddressFromImage = async (imageFile: File, tokenOverride?: s
}, tokenOverride);
};
export const extractCoreDataFromImage = async (imageFiles: File[], masterItems: MasterGroceryItem[]): Promise<Response> => {
const formData = new FormData();
imageFiles.forEach(file => {
formData.append('flyerImages', file);
});
formData.append('masterItems', JSON.stringify(masterItems));
// --- DEBUG LOGGING for flyer processing ---
logger.debug('[aiApiClient] Calling /api/ai/process-flyer with FormData.');
logger.debug(`[aiApiClient] Number of image files: ${imageFiles.length}`);
logger.debug(`[aiApiClient] Master items count: ${masterItems.length}`);
// --- END DEBUG LOGGING ---
// This now calls the real backend endpoint.
return apiFetchWithAuth('/ai/process-flyer', {
method: 'POST',
body: formData,
});
};
export const extractLogoFromImage = async (imageFiles: File[], tokenOverride?: string): Promise<Response> => {
const formData = new FormData();
imageFiles.forEach(file => {