ncover21 commented on code in PR #9825:
URL: https://github.com/apache/nifi/pull/9825#discussion_r2025269340


##########
nifi-extension-bundles/nifi-box-bundle/nifi-box-processors/src/main/java/org/apache/nifi/processors/box/ExtractStructuredBoxFileMetadata.java:
##########
@@ -58,17 +59,26 @@
 
 @InputRequirement(InputRequirement.Requirement.INPUT_REQUIRED)
 @Tags({"box", "storage", "metadata", "ai", "extract"})
-@CapabilityDescription("Extracts metadata from a Box file using Box AI and a 
template. The extracted metadata is written to the FlowFile content as JSON.")
+@CapabilityDescription("""
+        Extracts metadata from a Box file using Box AI. The extraction can use 
either a template or a list of fields.\s
+        The extracted metadata is written to the FlowFile content as JSON.
+        """)
 @SeeAlso({ListBoxFileMetadataTemplates.class, ListBoxFile.class, 
FetchBoxFile.class, UpdateBoxFileMetadataInstance.class})
 @WritesAttributes({
         @WritesAttribute(attribute = "box.id", description = "The ID of the 
file from which metadata was extracted"),
-        @WritesAttribute(attribute = "box.ai.template.key", description = "The 
template key used for extraction"),
+        @WritesAttribute(attribute = "box.ai.template.key", description = "The 
template key used for extraction (when using TEMPLATE extraction method)"),
+        @WritesAttribute(attribute = "box.ai.extraction.method", description = 
"The extraction method used (TEMPLATE or FIELDS)"),
         @WritesAttribute(attribute = "box.ai.completion.reason", description = 
"The completion reason from the AI extraction"),
         @WritesAttribute(attribute = "mime.type", description = "Set to 
'application/json' for the JSON content"),
         @WritesAttribute(attribute = ERROR_CODE, description = 
ERROR_CODE_DESC),
         @WritesAttribute(attribute = ERROR_MESSAGE, description = 
ERROR_MESSAGE_DESC)
 })
-public class ExtractBoxFileMetadataWithBoxAI extends AbstractProcessor {
+public class ExtractStructuredBoxFileMetadata extends AbstractProcessor {
+
+    public static class ExtractionMethod {
+        public static final String TEMPLATE = "TEMPLATE";
+        public static final String FIELDS = "FIELDS";
+    }

Review Comment:
   Added this and some descriptions



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to