Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main/java/com/mindee/WorkflowOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,23 @@ public class WorkflowOptions {
*/
String publicUrl;

/**
* Whether to enable Retrieval-Augmented generation.
*/
Boolean rag;

@Builder
private WorkflowOptions(
String alias,
ExecutionPriority priority,
Boolean fullText,
String publicUrl
String publicUrl,
Boolean rag
) {
this.alias = alias;
this.priority = priority;
this.fullText = fullText == null ? Boolean.FALSE : fullText;
this.publicUrl = publicUrl;
this.rag = rag;
}
}
3 changes: 3 additions & 0 deletions src/main/java/com/mindee/http/MindeeHttpApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@ private List<NameValuePair> buildPostParams(
if (Boolean.TRUE.equals(requestParameters.getPredictOptions().getFullText())) {
params.add(new BasicNameValuePair("full_text_ocr", "true"));
}
if (Boolean.TRUE.equals(requestParameters.getWorkflowOptions().getRag())) {
params.add(new BasicNameValuePair("rag", "true"));
}
return params;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/mindee/workflow/WorkflowIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ protected Execution<GeneratedV1> getFinancialDocumentWorkflow(String workflowId)
IOException, MindeeException {

WorkflowOptions options = WorkflowOptions.builder().alias("java-" + currentDateTime).priority(
ExecutionPriority.LOW).build();
ExecutionPriority.LOW).rag(true).build();
WorkflowResponse<GeneratedV1> response =
client.executeWorkflow(workflowId, financialDocumentInputSource, options);
return response.getExecution();
Expand Down
Loading