Class: OutputFixingParser
output_parsers.OutputFixingParser
Class to parse the output of an LLM call.
Hierarchyβ
β³
OutputFixingParser
Constructorsβ
constructorβ
β’ new OutputFixingParser(Β«destructuredΒ»
)
Parametersβ
Name | Type |
---|---|
Β«destructuredΒ» | Object |
βΊΒ parser | BaseOutputParser |
βΊΒ retryChain | LLMChain |
Overridesβ
Defined inβ
langchain/src/output_parsers/fix.ts:24
Propertiesβ
parserβ
β’ parser: BaseOutputParser
Defined inβ
langchain/src/output_parsers/fix.ts:8
retryChainβ
β’ retryChain: LLMChain
Defined inβ
langchain/src/output_parsers/fix.ts:10
Methodsβ
_typeβ
βΈ _type(): string
Return the string type key uniquely identifying this class of parser
Returnsβ
string
Inherited fromβ
Defined inβ
langchain/src/schema/index.ts:169
getFormatInstructionsβ
βΈ getFormatInstructions(): string
Return a string describing the format of the output.
Example
{
"foo": "bar"
}
Returnsβ
string
Format instructions.
Overridesβ
BaseOutputParser.getFormatInstructions
Defined inβ
langchain/src/output_parsers/fix.ts:54
parseβ
βΈ parse(completion
): Promise
<unknown
>
Parse the output of an LLM call.
Parametersβ
Name | Type | Description |
---|---|---|
completion | string | LLM output to parse. |
Returnsβ
Promise
<unknown
>
Parsed output.
Overridesβ
Defined inβ
langchain/src/output_parsers/fix.ts:36
parseWithPromptβ
βΈ parseWithPrompt(text
, _prompt
): Promise
<unknown
>
Parametersβ
Name | Type |
---|---|
text | string |
_prompt | BasePromptValue |
Returnsβ
Promise
<unknown
>
Inherited fromβ
BaseOutputParser.parseWithPrompt
Defined inβ
langchain/src/schema/index.ts:147
fromLLMβ
βΈ Static
fromLLM(llm
, parser
, fields?
): OutputFixingParser
Parametersβ
Name | Type |
---|---|
llm | BaseLanguageModel |
parser | BaseOutputParser |
fields? | Object |
fields.prompt? | BasePromptTemplate |
Returnsβ
Defined inβ
langchain/src/output_parsers/fix.ts:12