Package dev.langchain4j.image_to_diagram
Class DiagramOutputParser
java.lang.Object
dev.langchain4j.image_to_diagram.DiagramOutputParser
This class provides functionality to parse a JSON formatted string and convert it into a `Diagram.Element` object.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionParses a JSON string and converts it into a Diagram.Element object.
-
Constructor Details
-
DiagramOutputParser
public DiagramOutputParser()
-
-
Method Details
-
parse
Parses a JSON string and converts it into a Diagram.Element object.- Parameters:
s
- The JSON string to be parsed.- Returns:
- A Diagram.Element object representing the parsed JSON data.
- Throws:
IllegalArgumentException
- If no valid JSON is found in the input string.
-