You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(this.options.fillFieldsFromImagesasany)[key]=`${value} Select ${key} from the list (USE ONLY VALUE FIELD. USE ONLY VALUES FROM THIS LIST): ${JSON.stringify(column.enum)}`;
76
-
columnEnums.push({
77
-
name: key,
78
-
enum: column.enum,
79
-
});
84
+
if(this.options.fillFieldsFromImages){
85
+
if(!this.options.attachFiles){
86
+
thrownewError('⚠️ attachFiles function must be provided in options when fillFieldsFromImages is used');
87
+
}
88
+
if(!this.options.visionAdapter){
89
+
thrownewError('⚠️ visionAdapter must be provided in options when fillFieldsFromImages is used');
(this.options.fillFieldsFromImagesasany)[key]=`${value} Select ${key} from the list (USE ONLY VALUE FIELD. USE ONLY VALUES FROM THIS LIST): ${JSON.stringify(column.enum)}`;
97
+
columnEnums.push({
98
+
name: key,
99
+
enum: column.enum,
100
+
});
101
+
}
102
+
}else{
103
+
thrownewError(`⚠️ No column found for key "${key}"`);
104
+
}
105
+
}
106
+
}
107
+
108
+
if(this.options.fillPlainFields){
109
+
if(!this.options.textCompleteAdapter){
110
+
thrownewError('⚠️ textCompleteAdapter must be provided in options when fillPlainFields is used');
(this.options.fillPlainFieldsasany)[key]=`${value} Select ${key} from the list (USE ONLY VALUE FIELD. USE ONLY VALUES FROM THIS LIST): ${JSON.stringify(column.enum)}`;
118
+
columnEnums.push({
119
+
name: key,
120
+
enum: column.enum,
121
+
});
122
+
}
123
+
}else{
124
+
thrownewError(`⚠️ No column found for key "${key}"`);
fillFieldsFromImages?: Record<string,string>,// can analyze what is on image and fill fields, typical tasks "find dominant color", "describe what is on image", "clasify to one enum item, e.g. what is on image dog/cat/plant"
0 commit comments