Class StructuredQueryOutputParser
java.lang.Object
com.hw.langchain.schema.BaseLLMOutputParser<T>
com.hw.langchain.schema.BaseOutputParser<StructuredQuery>
com.hw.langchain.chains.query.constructor.base.StructuredQueryOutputParser
- All Implemented Interfaces:
Serializable
- Author:
- HamaWhite
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionI couldn't find a direct Java equivalent of Lark, which is available in Python.static StructuredQueryOutputParser
fromComponents
(List<Comparator> allowedComparators, List<Operator> allowedOperators) Parse the output of an LLM call.Methods inherited from class com.hw.langchain.schema.BaseOutputParser
getFormatInstructions, parseResult, parseWithPrompt
-
Constructor Details
-
StructuredQueryOutputParser
public StructuredQueryOutputParser()
-
-
Method Details
-
parse
Description copied from class:BaseOutputParser
Parse the output of an LLM call. A method which takes in a string (assumed output of a language model) and parses it into some structure.- Specified by:
parse
in classBaseOutputParser<StructuredQuery>
- Parameters:
text
- output of language model- Returns:
- structured output
- Throws:
OutputParserException
-
astParse
I couldn't find a direct Java equivalent of Lark, which is available in Python. For the time being, let's manually parse the simpler ones. -
fromComponents
public static StructuredQueryOutputParser fromComponents(List<Comparator> allowedComparators, List<Operator> allowedOperators)
-