Package dev.langchain4j.image_to_diagram
Class DiagramCorrectionProcess
java.lang.Object
dev.langchain4j.image_to_diagram.DiagramCorrectionProcess
- All Implemented Interfaces:
ImageToDiagram
Represents the process for correcting diagrams from images using asynchronous node and edge actions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.langchain4j.image_to_diagram.ImageToDiagram
ImageToDiagram.EvaluationResult, ImageToDiagram.State
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionworkflow()
Executes the workflow for diagram correction using the default JSONStateSerializer.workflow
(StateSerializer<ImageToDiagram.State> stateSerializer) Executes the workflow for diagram correction using a specified state serializer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.image_to_diagram.ImageToDiagram
getModel, getVisionModel
-
Constructor Details
-
DiagramCorrectionProcess
public DiagramCorrectionProcess()
-
-
Method Details
-
workflow
Executes the workflow for diagram correction using the default JSONStateSerializer.- Returns:
- The resulting StateGraph
- Throws:
Exception
- If an error occurs during the workflow execution
-
workflow
public StateGraph<ImageToDiagram.State> workflow(StateSerializer<ImageToDiagram.State> stateSerializer) throws Exception Executes the workflow for diagram correction using a specified state serializer.- Parameters:
stateSerializer
- The state serializer to use- Returns:
- The resulting StateGraph
- Throws:
Exception
- If an error occurs during the workflow execution
-