data-science-document-ai 1.60.3__tar.gz → 1.61.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/PKG-INFO +1 -1
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/pyproject.toml +1 -1
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/constants.py +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/postprocessing/common.py +17 -10
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/evergreen/placeholders.json +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/hapag-lloyd/placeholders.json +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/maersk/placeholders.json +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/maersk/prompt.txt +1 -1
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/msc/placeholders.json +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/msc/prompt.txt +1 -1
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/oocl/placeholders.json +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/oocl/prompt.txt +1 -1
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/other/placeholders.json +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/yangming/placeholders.json +2 -2
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/yangming/prompt.txt +1 -1
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/customsInvoice/other/placeholders.json +12 -4
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/customsInvoice/other/prompt.txt +11 -4
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/partnerInvoice/other/placeholders.json +12 -4
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/partnerInvoice/other/prompt.txt +11 -4
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/constants_sandbox.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/docai.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/docai_processor_config.yaml +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/excel_processing.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/io.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/llm.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/log_setup.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/pdf_processing.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/postprocessing/postprocess_booking_confirmation.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/postprocessing/postprocess_commercial_invoice.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/postprocessing/postprocess_partner_invoice.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/arrivalNotice/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/arrivalNotice/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/evergreen/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/hapag-lloyd/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bookingConfirmation/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bundeskasse/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/bundeskasse/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/commercialInvoice/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/commercialInvoice/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/customsAssessment/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/customsAssessment/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/deliveryOrder/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/deliveryOrder/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/draftMbl/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/draftMbl/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/finalMbL/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/finalMbL/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/packingList/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/packingList/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/postprocessing/port_code/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/postprocessing/port_code/prompt_port_code.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/preprocessing/carrier/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/preprocessing/carrier/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/shippingInstruction/other/placeholders.json +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/library/shippingInstruction/other/prompt.txt +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/prompt_library.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/setup.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/tms.py +0 -0
- {data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "data-science-document-ai"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.61.1"
|
|
4
4
|
description = "\"Document AI repo for data science\""
|
|
5
5
|
authors = ["Naomi Nguyen <naomi.nguyen@forto.com>", "Kumar Rajendrababu <kumar.rajendrababu@forto.com>", "Igor Tonko <igor.tonko@forto.com>", "Osman Demirel <osman.demirel@forto.com>"]
|
|
6
6
|
packages = [
|
|
@@ -93,8 +93,8 @@ formatting_rules = {
|
|
|
93
93
|
"bookingConfirmation": {
|
|
94
94
|
"pickUpDepotCode": "depot",
|
|
95
95
|
"dropOffDepotCode": "depot",
|
|
96
|
-
"
|
|
97
|
-
"
|
|
96
|
+
"gateInTerminal": "terminal",
|
|
97
|
+
"pickUpTerminal": "terminal",
|
|
98
98
|
},
|
|
99
99
|
"deliveryOrder": {"pickUpTerminal": "terminal", "EmptyContainerDepot": "depot"},
|
|
100
100
|
}
|
{data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/postprocessing/common.py
RENAMED
|
@@ -723,16 +723,23 @@ async def format_all_entities(result, document_type_code, params, mime_type):
|
|
|
723
723
|
if document_type_code in ["partnerInvoice", "bundeskasse"]:
|
|
724
724
|
await process_partner_invoice(params, aggregated_data, document_type_code)
|
|
725
725
|
|
|
726
|
-
#
|
|
727
|
-
|
|
728
|
-
if "
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
726
|
+
# Post process terminals with code and name
|
|
727
|
+
for key in list(aggregated_data):
|
|
728
|
+
if "terminal" not in key.lower():
|
|
729
|
+
continue
|
|
730
|
+
|
|
731
|
+
entity = aggregated_data.pop(key)
|
|
732
|
+
formatted = entity.get("formattedValue", {})
|
|
733
|
+
|
|
734
|
+
if formatted is None:
|
|
735
|
+
aggregated_data[key] = {**entity}
|
|
736
|
+
continue
|
|
737
|
+
|
|
738
|
+
aggregated_data[key] = {**entity, "formattedValue": formatted.get("id")}
|
|
739
|
+
aggregated_data[f"{key}Code"] = {
|
|
740
|
+
**entity,
|
|
741
|
+
"formattedValue": formatted.get("code"),
|
|
742
|
+
}
|
|
736
743
|
|
|
737
744
|
logger.info("Data Extraction completed successfully")
|
|
738
745
|
return aggregated_data
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., FULL RETURN TO or Export terminal name."
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be mentioned as Contract No., Contract Reference, or Quotation No. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., Export terminal delivery address, Export terminal location, or Export terminal name."
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., Export terminal delivery address, Export terminal location, or Return Equip Delivery Terminal."
|
|
@@ -16,7 +16,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
16
16
|
<INSTRUCTIONS>
|
|
17
17
|
- bookingNumber: A unique identifier for the booking.
|
|
18
18
|
|
|
19
|
-
-
|
|
19
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It can be called Return Equip Delivery Terminal and Location interception. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
20
20
|
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
21
21
|
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
22
22
|
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be found as Service Contract/Rate Reff. No. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It can be found as GATE IN AT TERMINAL/DEPOT"
|
|
@@ -14,7 +14,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
14
14
|
<CONTEXT>
|
|
15
15
|
|
|
16
16
|
<INSTRUCTIONS>
|
|
17
|
-
-
|
|
17
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It can be called Return Equip Delivery Terminal and Location interception. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
18
18
|
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
19
19
|
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
20
20
|
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. It can be referred as Rate Agreement Number or Contract No.. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. E.g., FULL RETURN LOCATION"
|
|
@@ -19,7 +19,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
19
19
|
|
|
20
20
|
- bookingNumber: Extract the booking number. This information can be found at the top section of the document".
|
|
21
21
|
|
|
22
|
-
-
|
|
22
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It can be called as FULL RETURN LOCATION. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
23
23
|
- gateInReference: A reference code for cargo entering the terminal. If not mentioned explicitly and gateInTerminal is extracted, then use bookingNumber as gateInReference.
|
|
24
24
|
- pickUpTerminal: The specific terminal for cargo pickup. It can be found as Import pick up address(es), PORT OF DISCHARGE (after the slash '/').
|
|
25
25
|
- pickUpReference: A reference code for cargo pickup. If not mentioned explicitly and pickUpTerminal is extracted, then use bookingNumber as pickUpReference.
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It can be found as Gate In At Terminal, Gate in Terminal, Full Return To Terminal, Full Return Location, Cargo Delivery At, Delivery Terminal, Full Return CY, eyc.."
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"nullable": true,
|
|
12
12
|
"description": "It's a contract number between the carrier and Forto Logistics SE & Co KG. Shipment Id 'S' followed by 6, 7, or 8 digits e.g. S9486358 is not a contract number."
|
|
13
13
|
},
|
|
14
|
-
"
|
|
14
|
+
"pickUpTerminal": {
|
|
15
15
|
"type": "STRING",
|
|
16
16
|
"nullable": true,
|
|
17
17
|
"description": "The specific terminal for cargo pickup during the import shipment."
|
|
18
18
|
},
|
|
19
|
-
"
|
|
19
|
+
"gateInTerminal": {
|
|
20
20
|
"type": "STRING",
|
|
21
21
|
"nullable": true,
|
|
22
22
|
"description": "The specific terminal where cargo is gated in especially Export terminal delivery address. It is mentioned as Delivery Terminal."
|
|
@@ -17,7 +17,7 @@ For Import Shipment: The loaded container / cargo arrives at a port of discharge
|
|
|
17
17
|
- Populate fields as defined in the response schema.
|
|
18
18
|
- Use the data field description to understand the context of the data.
|
|
19
19
|
|
|
20
|
-
-
|
|
20
|
+
- gateInTerminal: The specific terminal where cargo is gated in. It is mentioned as Delivery Terminal. This sometimes can be the same as portOfLoading of the First transportLeg.
|
|
21
21
|
- cyCutOff: The deadline for cargo to be delivered to the Container Yard. It can be found at Cargo Cut Off or FCL delivery cut-off.
|
|
22
22
|
|
|
23
23
|
- transportLegs: Multiple Transport Legs entries may exist, capture all instances under "transportLegs". Make sure the order of the legs are important.
|
|
@@ -75,18 +75,26 @@
|
|
|
75
75
|
},
|
|
76
76
|
"lineItemDescription": {"type": "STRING", "nullable": true,
|
|
77
77
|
"description": "A description of the line item (COGS or Customs line items), which can include details about the service provided."},
|
|
78
|
+
"totalAmountCurrency": {"type": "STRING", "nullable": true,
|
|
79
|
+
"description": "The currency code for the line item's total amount, such as EUR, USD, etc."},
|
|
78
80
|
"totalAmount": {"type": "STRING", "nullable": true,
|
|
79
81
|
"description": "The total amount for the line item, which may include the cost of services, and applicable taxes."},
|
|
80
|
-
"
|
|
81
|
-
"
|
|
82
|
+
"totalAmountInOriginalCurrency": {
|
|
83
|
+
"type": "STRING",
|
|
84
|
+
"description": "The total amount for the line item in original currency"
|
|
85
|
+
},
|
|
86
|
+
"totalAmountInInvoiceCurrency": {
|
|
87
|
+
"type": "STRING",
|
|
88
|
+
"description": "The total amount for the line item in the currency code the whole invoice's total uses"
|
|
89
|
+
},
|
|
82
90
|
"totalAmountEuro": {"type": "STRING", "nullable": true,
|
|
83
91
|
"description": "The total amount converted to Euro, if applicable. You can find it by looking for the term 'Total EUR' or 'Amount in Euro' in the line item."},
|
|
84
92
|
"quantity": {"type": "STRING", "nullable": true,
|
|
85
93
|
"description": "The quantity of the item or service provided in the line item."},
|
|
86
|
-
"unitPrice": {"type": "STRING", "nullable": true,
|
|
87
|
-
"description": "The price per unit of the item or service in the line item. Check the naming in a different languages, such as 'Einzelpreis', 'Unit Price', 'Prezzo unitario', 'Preis pro Einheit', etc.. Refer to 'Prezzo unitario' field in the italian invoice example"},
|
|
88
94
|
"unitPriceCurrency": {"type": "STRING", "nullable": true,
|
|
89
95
|
"description": "The currency code for the unit price, such as EUR, USD, etc."},
|
|
96
|
+
"unitPrice": {"type": "STRING", "nullable": true,
|
|
97
|
+
"description": "The price per unit of the item or service in the line item. Check the naming in a different languages, such as 'Einzelpreis', 'Unit Price', 'Prezzo unitario', 'Preis pro Einheit', etc.. Refer to 'Prezzo unitario' field in the italian invoice example"},
|
|
90
98
|
"vatAmount": {"type": "STRING", "nullable": true,
|
|
91
99
|
"description": "The VAT amount applied to the line item. This is the tax charged on the totalAmount of the line item."},
|
|
92
100
|
"vatPercentage": {"type": "STRING", "nullable": true,
|
|
@@ -55,11 +55,18 @@ Your role is to accurately extract specific entities from these invoices to supp
|
|
|
55
55
|
- lineItem: Details of each COGS and Customs line item on the invoice from each page. Make sure to extract each amount and currency separately.
|
|
56
56
|
- uniqueId: A unique id which associated with the lineItem as each line item can belong to a different shipment. Extract only if its available in the line item. Either a shipmentId starting with an S and followed by 6 or 8 numeric values or a mblNumber. If shipmentId or mblNumber does not exist, set it to containerNumber.
|
|
57
57
|
- lineItemDescription: The name or description of the item. Usually, it will be a one line sentence.
|
|
58
|
-
-
|
|
59
|
-
- totalAmount: The total amount for the item. It can be in different currencies, so ensure to capture the
|
|
58
|
+
- totalAmountCurrency: the original/native currency code for the line item's total amount. In 3 letters such as USD, EUR
|
|
59
|
+
- totalAmount: The total amount for the item. It can be in different currencies, so ensure to capture the amount according to the totalAmountCurrency.
|
|
60
|
+
- totalAmountInOriginalCurrency: line item amount in its original/native currency
|
|
61
|
+
- totalAmountInInvoiceCurrency: line item amount converted to the invoice's main currency (the currency used for grandTotal)
|
|
60
62
|
- totalAmountEuro: Few line items contains a total amount in Euro. You can find it by looking for the term "Total EUR" or "Amount in Euro" in the line item but it's always in the EURO / € currency. Sometimes, it can be same as totalAmount if the line item is already in Euro.
|
|
61
|
-
- quantity: The quantity of the item or service provided in the line item. Pay attention to 2 x 40HC or 2x40HC. It means, quantity is 2 and 40HC is containerSize
|
|
62
|
-
-
|
|
63
|
+
- quantity: The quantity of the item or service provided in the line item. Pay attention to 2 x 40HC or 2x40HC. It means, quantity is 2 and 40HC is containerSize
|
|
64
|
+
- unitPriceCurrency: The original/native currency code for the unit price. 3 letters
|
|
65
|
+
- unitPrice: Even if the quantity is not mentioned, you can still extract the unit price. Check the naming of the columns in a different languages, it can be "Unit Price", "Prezzo unitario", "Prix Unitaire", "Unitario", etc. Refer to "Prezzo unitario" field in the italian invoice example.
|
|
66
|
+
- vatAmount: The VAT amount applied to the line item. This is the tax charged on the totalAmount of the line item
|
|
67
|
+
- vatPercentage: The percentage rate of VAT applied to the totalAmount of the line item. This is used to calculate the vatAmount
|
|
68
|
+
- containerNumber: Container Number always starts with 4 letters and is followed by 7 digits (e.g., ABCD1234567, XALU 8593678).
|
|
69
|
+
- containerSize: The size of the container associated with the containerNumber, such as 20ft, 40ft, 40HC, 20DC etc.
|
|
63
70
|
|
|
64
71
|
- hblNumber and mblNumber:
|
|
65
72
|
- The Master Bill of Lading number. Commonly known as "Bill of Lading Number", "BILL OF LADING NO.", "BL Number", "BL No.", "B/L No.", "BL-Nr.", "B/L", or "HBL No.".
|
|
@@ -73,18 +73,26 @@
|
|
|
73
73
|
},
|
|
74
74
|
"lineItemDescription": {"type": "STRING", "nullable": true,
|
|
75
75
|
"description": "A description of the line item (COGS or Customs line items), which can include details about the service provided."},
|
|
76
|
+
"totalAmountCurrency": {"type": "STRING", "nullable": true,
|
|
77
|
+
"description": "The currency code for the line item's total amount, such as EUR, USD, etc."},
|
|
76
78
|
"totalAmount": {"type": "STRING", "nullable": true,
|
|
77
79
|
"description": "The total amount for the line item, which may include the cost of services, and applicable taxes."},
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
+
"totalAmountInOriginalCurrency": {
|
|
81
|
+
"type": "STRING",
|
|
82
|
+
"description": "The total amount for the line item in original currency"
|
|
83
|
+
},
|
|
84
|
+
"totalAmountInInvoiceCurrency": {
|
|
85
|
+
"type": "STRING",
|
|
86
|
+
"description": "The total amount for the line item in the currency code the whole invoice's total uses"
|
|
87
|
+
},
|
|
80
88
|
"totalAmountEuro": {"type": "STRING", "nullable": true,
|
|
81
89
|
"description": "The total amount converted to Euro, if applicable. You can find it by looking for the term 'Total EUR' or 'Amount in Euro' in the line item."},
|
|
82
90
|
"quantity": {"type": "STRING", "nullable": true,
|
|
83
91
|
"description": "The quantity of the item or service provided in the line item."},
|
|
84
|
-
"unitPrice": {"type": "STRING", "nullable": true,
|
|
85
|
-
"description": "The price per unit of the item or service in the line item. Check the naming in a different languages, such as 'Einzelpreis', 'Unit Price', 'Prezzo unitario', 'Preis pro Einheit', etc.. Refer to 'Prezzo unitario' field in the italian invoice example"},
|
|
86
92
|
"unitPriceCurrency": {"type": "STRING", "nullable": true,
|
|
87
93
|
"description": "The currency code for the unit price, such as EUR, USD, etc."},
|
|
94
|
+
"unitPrice": {"type": "STRING", "nullable": true,
|
|
95
|
+
"description": "The price per unit of the item or service in the line item. Check the naming in a different languages, such as 'Einzelpreis', 'Unit Price', 'Prezzo unitario', 'Preis pro Einheit', etc.. Refer to 'Prezzo unitario' field in the italian invoice example"},
|
|
88
96
|
"vatAmount": {"type": "STRING", "nullable": true,
|
|
89
97
|
"description": "The VAT amount applied to the line item. This is the tax charged on the totalAmount of the line item."},
|
|
90
98
|
"vatPercentage": {"type": "STRING", "nullable": true,
|
|
@@ -53,11 +53,18 @@ Your role is to accurately extract specific entities from these invoices to supp
|
|
|
53
53
|
- lineItem: Details of each COGS and Customs line item on the invoice from each page. Make sure to extract each amount and currency separately.
|
|
54
54
|
- uniqueId: A unique id which associated with the lineItem as each line item can belong to a different shipment. Extract only if its available in the line item. Either a shipmentId starting with an S and followed by 6 or 8 numeric values or a mblNumber. If shipmentId or mblNumber does not exist, set it to containerNumber.
|
|
55
55
|
- lineItemDescription: The name or description of the item. Usually, it will be a one line sentence.
|
|
56
|
-
-
|
|
57
|
-
- totalAmount: The total amount for the item. It can be in different currencies, so ensure to capture the
|
|
56
|
+
- totalAmountCurrency: original/native currency code for the line item's total amount. In 3 letters such as USD, EUR
|
|
57
|
+
- totalAmount: The total amount for the item. It can be in different currencies, so ensure to capture the amount according to the totalAmountCurrency.
|
|
58
|
+
- totalAmountInOriginalCurrency: line item amount in its original/native currency
|
|
59
|
+
- totalAmountInInvoiceCurrency: line item amount converted to the invoice's main currency (the currency used for grandTotal)
|
|
58
60
|
- totalAmountEuro: Few line items contains a total amount in Euro. You can find it by looking for the term "Total EUR" or "Amount in Euro" in the line item but it's always in the EURO / € currency. Sometimes, it can be same as totalAmount if the line item is already in Euro.
|
|
59
|
-
- quantity: The quantity of the item or service provided in the line item. Pay attention to 2 x 40HC or 2x40HC. It means, quantity is 2 and 40HC is containerSize
|
|
60
|
-
-
|
|
61
|
+
- quantity: The quantity of the item or service provided in the line item. Pay attention to 2 x 40HC or 2x40HC. It means, quantity is 2 and 40HC is containerSize
|
|
62
|
+
- unitPriceCurrency: The original/native currency code for the unit price. 3 letters
|
|
63
|
+
- unitPrice: Even if the quantity is not mentioned, you can still extract the unit price. Check the naming of the columns in a different languages, it can be "Unit Price", "Prezzo unitario", "Prix Unitaire", "Unitario", etc. Refer to "Prezzo unitario" field in the italian invoice example.
|
|
64
|
+
- vatAmount: The VAT amount applied to the line item. This is the tax charged on the totalAmount of the line item
|
|
65
|
+
- vatPercentage: The percentage rate of VAT applied to the totalAmount of the line item. This is used to calculate the vatAmount
|
|
66
|
+
- containerNumber: Container Number always starts with 4 letters and is followed by 7 digits (e.g., ABCD1234567, XALU 8593678).
|
|
67
|
+
- containerSize: The size of the container associated with the containerNumber, such as 20ft, 40ft, 40HC, 20DC etc.
|
|
61
68
|
|
|
62
69
|
- hblNumber and mblNumber:
|
|
63
70
|
- The Master Bill of Lading number. Commonly known as "Bill of Lading Number", "BILL OF LADING NO.", "BL Number", "BL No.", "B/L No.", "BL-Nr.", "B/L", or "HBL No.".
|
{data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/constants_sandbox.py
RENAMED
|
File without changes
|
|
File without changes
|
{data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/docai_processor_config.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{data_science_document_ai-1.60.3 → data_science_document_ai-1.61.1}/src/prompts/prompt_library.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|