Class: CommaSeparatedListOutputParser
output_parsers.CommaSeparatedListOutputParser
Class to parse the output of an LLM call as a comma-separated list.
Hierarchy
↳
CommaSeparatedListOutputParser
Constructors
constructor
• new CommaSeparatedListOutputParser()
Inherited from
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
ListOutputParser.getFormatInstructions
Defined in
langchain/src/output_parsers/list.ts:27
parse
▸ parse(text
): Promise
<string
[]>
Parse the output of an LLM call.
Parameters
Name | Type | Description |
---|---|---|
text | string | LLM output to parse. |
Returns
Promise
<string
[]>
Parsed output.
Overrides
Defined in
langchain/src/output_parsers/list.ts:16
parseWithPrompt
▸ parseWithPrompt(text
, _prompt
): Promise
<unknown
>
Parameters
Name | Type |
---|---|
text | string |
_prompt | BasePromptValue |
Returns
Promise
<unknown
>
Inherited from
ListOutputParser.parseWithPrompt
Defined in
langchain/src/schema/index.ts:147