Class RouteDiagramTranslation
java.lang.Object
dev.langchain4j.image_to_diagram.actions.RouteDiagramTranslation
- All Implemented Interfaces:
Function<ImageToDiagram.State,
,CompletableFuture<String>> AsyncEdgeAction<ImageToDiagram.State>
public class RouteDiagramTranslation
extends Object
implements AsyncEdgeAction<ImageToDiagram.State>
RouteDiagramTranslation class implements AsyncEdgeAction interface for processing
ImageToDiagram.State and determining the type of diagram.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapply
(ImageToDiagram.State state) Applies the transformation to convert anImageToDiagram.State
to a diagram type.
-
Constructor Details
-
RouteDiagramTranslation
public RouteDiagramTranslation()
-
-
Method Details
-
apply
Applies the transformation to convert anImageToDiagram.State
to a diagram type. If the state's diagram type is "sequence" (case-insensitive), it returns "sequence"; otherwise, it returns "generic".- Specified by:
apply
in interfaceAsyncEdgeAction<ImageToDiagram.State>
- Specified by:
apply
in interfaceFunction<ImageToDiagram.State,
CompletableFuture<String>> - Parameters:
state
- The current state of the image-to-diagram conversion process.- Returns:
- A
CompletableFuture
that completes with the determined diagram type as a string.
-