Add OpenAI fallback for Aadhaar extraction
All checks were successful
build-and-deploy / build-deploy (push) Successful in 32s

This commit is contained in:
androidlover5842
2026-01-31 05:03:28 +05:30
parent d90b0bb260
commit bd2bca9f33
4 changed files with 100 additions and 22 deletions

View File

@@ -211,7 +211,9 @@ class GuestDocuments(
val imageUrl =
"${aiBaseUrl}/properties/$propertyId/guests/$guestId/documents/${document.id}/file?token=$token"
val extraction = extractionService.extractAndApply(imageUrl, document, propertyId)
val publicImageUrl =
"${publicBaseUrl.trimEnd('/')}/properties/$propertyId/guests/$guestId/documents/${document.id}/file?token=$token"
val extraction = extractionService.extractAndApply(imageUrl, publicImageUrl, document, propertyId)
val results = extraction.results
document.extractedData = objectMapper.writeValueAsString(results)