Hoist general AI questions map
All checks were successful
build-and-deploy / build-deploy (push) Successful in 32s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 32s
This commit is contained in:
@@ -214,10 +214,33 @@ class GuestDocuments(
|
|||||||
val results = linkedMapOf<String, String>()
|
val results = linkedMapOf<String, String>()
|
||||||
results["hasAadhar"] = llamaClient.ask(imageUrl, "CONTAINS AADHAAR? Answer YES or NO only.")
|
results["hasAadhar"] = llamaClient.ask(imageUrl, "CONTAINS AADHAAR? Answer YES or NO only.")
|
||||||
results["hasUidai"] = llamaClient.ask(imageUrl, "CONTAINS UIDAI? Answer YES or NO only.")
|
results["hasUidai"] = llamaClient.ask(imageUrl, "CONTAINS UIDAI? Answer YES or NO only.")
|
||||||
|
val generalQuestions = linkedMapOf(
|
||||||
|
"hasTransportDept" to "CONTAINS TRANSPORT DEPARTMENT? Answer YES or NO only.",
|
||||||
|
"hasIncomeTaxDept" to "CONTAINS INCOME TAX DEPARTMENT? Answer YES or NO only.",
|
||||||
|
"hasElectionCommission" to "CONTAINS ELECTION COMMISSION OF INDIA? Answer YES or NO only.",
|
||||||
|
"hasDrivingLicence" to "CONTAINS DRIVING LICENCE? Answer YES or NO only.",
|
||||||
|
"hasPassport" to "CONTAINS PASSPORT? Answer YES or NO only.",
|
||||||
|
"hasPolice" to "CONTAINS POLICE? Answer YES or NO only.",
|
||||||
|
"hasCourt" to "CONTAINS COURT? Answer YES or NO only.",
|
||||||
|
"hasHighCourt" to "CONTAINS HIGH COURT? Answer YES or NO only.",
|
||||||
|
"hasSupremeCourt" to "CONTAINS SUPREME COURT? Answer YES or NO only.",
|
||||||
|
"hasJudiciary" to "CONTAINS JUDICIARY? Answer YES or NO only.",
|
||||||
|
"hasNationality" to "NATIONALITY PRESENT? Answer YES or NO only.",
|
||||||
|
"name" to "NAME? Reply only the name or NONE.",
|
||||||
|
"dob" to "DOB? Reply only date or NONE.",
|
||||||
|
"idNumber" to "ID NUMBER? Reply only number or NONE.",
|
||||||
|
"address" to "POSTAL ADDRESS ONLY (street/area/city/state). Ignore IDs, UUIDs, and codes. Reply only address or NONE.",
|
||||||
|
"vehicleNumber" to "VEHICLE NUMBER? Reply only number or NONE.",
|
||||||
|
"isVehiclePhoto" to "IS THIS A VEHICLE PHOTO? Answer YES or NO only.",
|
||||||
|
"pinCode" to "PIN CODE? Reply only pin or NONE.",
|
||||||
|
"city" to "CITY? Reply only city or NONE.",
|
||||||
|
"gender" to "GENDER? Reply only MALE/FEMALE/OTHER or NONE.",
|
||||||
|
"nationality" to "NATIONALITY? Reply only nationality or NONE."
|
||||||
|
)
|
||||||
val hasAadhar = isYes(results["hasAadhar"]) || isYes(results["hasUidai"])
|
val hasAadhar = isYes(results["hasAadhar"]) || isYes(results["hasUidai"])
|
||||||
if (hasAadhar) {
|
if (hasAadhar) {
|
||||||
val aadharQuestions = linkedMapOf(
|
val aadharQuestions = linkedMapOf(
|
||||||
"hasAddress" to "ADDRESS PRESENT? Answer YES or NO only.",
|
"hasAddress" to "POSTAL ADDRESS PRESENT? Answer YES or NO only.",
|
||||||
"hasDob" to "DOB? Reply YES or NO.",
|
"hasDob" to "DOB? Reply YES or NO.",
|
||||||
"hasGenderMentioned" to "GENDER MENTIONED? Reply YES or NO."
|
"hasGenderMentioned" to "GENDER MENTIONED? Reply YES or NO."
|
||||||
)
|
)
|
||||||
@@ -249,29 +272,6 @@ class GuestDocuments(
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
val generalQuestions = linkedMapOf(
|
|
||||||
"hasTransportDept" to "CONTAINS TRANSPORT DEPARTMENT? Answer YES or NO only.",
|
|
||||||
"hasIncomeTaxDept" to "CONTAINS INCOME TAX DEPARTMENT? Answer YES or NO only.",
|
|
||||||
"hasElectionCommission" to "CONTAINS ELECTION COMMISSION OF INDIA? Answer YES or NO only.",
|
|
||||||
"hasDrivingLicence" to "CONTAINS DRIVING LICENCE? Answer YES or NO only.",
|
|
||||||
"hasPassport" to "CONTAINS PASSPORT? Answer YES or NO only.",
|
|
||||||
"hasPolice" to "CONTAINS POLICE? Answer YES or NO only.",
|
|
||||||
"hasCourt" to "CONTAINS COURT? Answer YES or NO only.",
|
|
||||||
"hasHighCourt" to "CONTAINS HIGH COURT? Answer YES or NO only.",
|
|
||||||
"hasSupremeCourt" to "CONTAINS SUPREME COURT? Answer YES or NO only.",
|
|
||||||
"hasJudiciary" to "CONTAINS JUDICIARY? Answer YES or NO only.",
|
|
||||||
"hasNationality" to "NATIONALITY PRESENT? Answer YES or NO only.",
|
|
||||||
"name" to "NAME? Reply only the name or NONE.",
|
|
||||||
"dob" to "DOB? Reply only date or NONE.",
|
|
||||||
"idNumber" to "ID NUMBER? Reply only number or NONE.",
|
|
||||||
"address" to "ADDRESS? Reply only address or NONE.",
|
|
||||||
"vehicleNumber" to "VEHICLE NUMBER? Reply only number or NONE.",
|
|
||||||
"isVehiclePhoto" to "IS THIS A VEHICLE PHOTO? Answer YES or NO only.",
|
|
||||||
"pinCode" to "PIN CODE? Reply only pin or NONE.",
|
|
||||||
"city" to "CITY? Reply only city or NONE.",
|
|
||||||
"gender" to "GENDER? Reply only MALE/FEMALE/OTHER or NONE.",
|
|
||||||
"nationality" to "NATIONALITY? Reply only nationality or NONE."
|
|
||||||
)
|
|
||||||
for ((key, question) in generalQuestions) {
|
for ((key, question) in generalQuestions) {
|
||||||
results[key] = llamaClient.ask(imageUrl, question)
|
results[key] = llamaClient.ask(imageUrl, question)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user