11provider "oci" {
2+ # version = "6.21.0"
23}
34
45variable "tenancy_ocid" {
5- default = " ocid1.tenancy.oc1..aaaaaaaaikox5b3adi2w237m2fwomzxybp52i7byjrj5fxradayjqxum7bsq "
6+ default = " "
67}
78
89variable "region" {
910 default = " us-phoenix-1"
1011}
1112
1213variable "model_model_version" {
13- default = " modelVersion "
14+ default = " V1.0 "
1415}
1516
16- variable "compartment_id" { default = " ocid1.compartment.oc1..aaaaaaaa3jewat7ub6yf257bsxvfcfz5zt46fruduji37ekbsefwmcmzvgxq " }
17+ variable "compartment_id" { default = " " }
1718
1819variable defined_tag_namespace_name { default = " " }
1920
@@ -22,17 +23,19 @@ resource "oci_ai_document_project" "test_project" {
2223 compartment_id = var. compartment_id
2324}
2425
25- resource "oci_ai_document_model" "test_model1 " {
26+ resource "oci_ai_document_model" "test_model " {
2627 # Required
2728 compartment_id = var. compartment_id
2829 model_type = " KEY_VALUE_EXTRACTION"
2930 project_id = oci_ai_document_project. test_project . id
31+ inference_units = 1
32+ language = " ENG"
3033
3134 training_dataset {
32- bucket = " tf_test_bucket "
35+ bucket = " canary_test "
3336 dataset_type = " OBJECT_STORAGE"
34- namespace = " axgexwaxnm7k "
35- object = " tf_test_dataset_1680065500556 .jsonl"
37+ namespace = " axylfvgphoea "
38+ object = " canary-aadhar-dataset_1686632830312 .jsonl"
3639 }
3740
3841 # Optional
@@ -41,41 +44,61 @@ resource "oci_ai_document_model" "test_model1" {
4144 model_version = var. model_model_version
4245}
4346
44- resource "oci_ai_document_model" "test_model2" {
45- # Required
46- compartment_id = var. compartment_id
47- model_type = " KEY_VALUE_EXTRACTION"
48- project_id = oci_ai_document_project. test_project . id
47+ variable "object_locations" {
48+ type = list (map (string ))
49+ default = [
50+ {
51+ bucket = " canary_test"
52+ namespace = " axylfvgphoea"
53+ object = " dus_test.pdf"
54+ }
55+ ]
56+ }
4957
50- training_dataset {
51- bucket = " tf_test_bucket"
52- dataset_type = " OBJECT_STORAGE"
53- namespace = " axgexwaxnm7k"
54- object = " tf_test_aadhar_1686719828190.jsonl"
55- }
5658
57- # Optional
58- display_name = " test_tf_model2"
59- is_quick_mode = " false"
60- model_version = var. model_model_version
59+ variable "features" {
60+ type = list (map (string ))
61+ default = [
62+ {
63+ feature_type = " KEY_VALUE_EXTRACTION"
64+ selection_mark_detection = false
65+ }
66+ ]
6167}
6268
63- resource "oci_ai_document_model" "test_compose_model" {
64- # Required
69+ resource "oci_ai_document_processor_job" "test_processor_job" {
6570 compartment_id = var. compartment_id
66- model_type = " KEY_VALUE_EXTRACTION"
67- project_id = oci_ai_document_project. test_project . id
68-
69- component_models {
70- model_id = oci_ai_document_model. test_model1 . id
71+ display_name = " test_tf_processor_job"
72+ input_location {
73+
74+ dynamic "object_locations" {
75+ for_each = var. object_locations
76+ content {
77+ bucket = object_locations. value [" bucket" ]
78+ namespace = object_locations. value [" namespace" ]
79+ object = object_locations. value [" object" ]
80+ }
81+ }
82+
83+ source_type = " OBJECT_STORAGE_LOCATIONS"
7184 }
72-
73- component_models {
74- model_id = oci_ai_document_model. test_model2 . id
85+ output_location {
86+ bucket = " canary_test"
87+ namespace = " axylfvgphoea"
88+ prefix = " test"
7589 }
76-
77- # Optional
78- display_name = " test_compose_model"
79- is_quick_mode = " false"
80- model_version = var. model_model_version
81- }
90+ processor_config {
91+
92+ dynamic "features" {
93+ for_each = var. features
94+ content {
95+ feature_type = features. value [" feature_type" ]
96+ selection_mark_detection = features. value [" selection_mark_detection" ]
97+ }
98+ }
99+
100+ processor_type = " GENERAL"
101+ document_type = " INVOICE"
102+ language = " ENG"
103+ }
104+ }
0 commit comments