Class StructuredOutputParser
java.lang.Object
com.hw.langchain.schema.BaseLLMOutputParser<T>
com.hw.langchain.schema.BaseOutputParser<Map<String,Object>>
com.hw.langchain.output.parsers.structured.StructuredOutputParser
- All Implemented Interfaces:
Serializable
- Author:
- HamaWhite
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic StructuredOutputParser
fromResponseSchemas
(List<ResponseSchema> responseSchemas) Instructions on how the LLM output should be formatted.Parse the output of an LLM call.Methods inherited from class com.hw.langchain.schema.BaseOutputParser
parseResult, parseWithPrompt
-
Constructor Details
-
StructuredOutputParser
-
-
Method Details
-
fromResponseSchemas
-
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<Map<String,
Object>> - Parameters:
text
- output of language model- Returns:
- structured output
-
getFormatInstructions
Description copied from class:BaseOutputParser
Instructions on how the LLM output should be formatted.- Overrides:
getFormatInstructions
in classBaseOutputParser<Map<String,
Object>> - Returns:
- format instructions
-