File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed
test/java/com/mindee/workflow Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,23 @@ public class WorkflowOptions {
3232 */
3333 String publicUrl ;
3434
35+ /**
36+ * Whether to enable Retrieval-Augmented generation.
37+ */
38+ Boolean rag ;
39+
3540 @ Builder
3641 private WorkflowOptions (
3742 String alias ,
3843 ExecutionPriority priority ,
3944 Boolean fullText ,
40- String publicUrl
45+ String publicUrl ,
46+ Boolean rag
4147 ) {
4248 this .alias = alias ;
4349 this .priority = priority ;
4450 this .fullText = fullText == null ? Boolean .FALSE : fullText ;
4551 this .publicUrl = publicUrl ;
52+ this .rag = rag ;
4653 }
4754}
Original file line number Diff line number Diff line change @@ -388,6 +388,9 @@ private List<NameValuePair> buildPostParams(
388388 if (Boolean .TRUE .equals (requestParameters .getPredictOptions ().getFullText ())) {
389389 params .add (new BasicNameValuePair ("full_text_ocr" , "true" ));
390390 }
391+ if (Boolean .TRUE .equals (requestParameters .getWorkflowOptions ().getRag ())) {
392+ params .add (new BasicNameValuePair ("rag" , "true" ));
393+ }
391394 return params ;
392395 }
393396
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ protected Execution<GeneratedV1> getFinancialDocumentWorkflow(String workflowId)
3535 IOException , MindeeException {
3636
3737 WorkflowOptions options = WorkflowOptions .builder ().alias ("java-" + currentDateTime ).priority (
38- ExecutionPriority .LOW ).build ();
38+ ExecutionPriority .LOW ).rag ( true ). build ();
3939 WorkflowResponse <GeneratedV1 > response =
4040 client .executeWorkflow (workflowId , financialDocumentInputSource , options );
4141 return response .getExecution ();
You can’t perform that action at this time.
0 commit comments