LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Browser
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
  • Tools
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Llms
  • Profile
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Testing
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
BrowserUniversalHubNodeLoadSerializableEncoder BackedFile SystemIn MemoryTools
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsLlmsProfileStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryTestingToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coreoutput_parsers
Module●Since v0.3

output_parsers

Copy
import { ... } from "@langchain/core/output_parsers";

Functions

function
parseJsonMarkdown→ any
function
parsePartialJson→ any
function
parseXMLMarkdown→ XMLResult

Classes

class
AsymmetricStructuredOutputParser
class
BaseCumulativeTransformOutputParser
class
BaseLLMOutputParser
class
BaseOutputParser
class
BaseTransformOutputParser
class
BytesOutputParser
class
CommaSeparatedListOutputParser
class
CustomListOutputParser
class
JsonMarkdownStructuredOutputParser
class
JsonOutputParser
class
ListOutputParser
class
MarkdownListOutputParser
class
NumberedListOutputParser
class
OutputParserException
class
StandardSchemaOutputParser
class
StringOutputParser
class
StructuredOutputParser
class
XMLOutputParser

Interfaces

Type Aliases

Variables

View source on GitHub
interface
AsymmetricStructuredOutputParserFields
interface
FormatInstructionsOptions

Options for formatting instructions.

interface
JsonMarkdownFormatInstructionsOptions

Options for formatting instructions.

interface
XMLOutputParserFields
typeAlias
BaseCumulativeTransformOutputParserInput
typeAlias
Content: string | undefined | __type[]
typeAlias
JsonMarkdownStructuredOutputParserInput
typeAlias
XMLResult: __type
variable
XML_FORMAT_INSTRUCTIONS

A type of StructuredOutputParser that handles asymmetric input and output schemas.

A base class for output parsers that can handle streaming input. It extends the BaseTransformOutputParser class and provides a method for converting parsed outputs into a diff format.

Abstract base class for parsing the output of a Large Language Model (LLM) call. It provides methods for parsing the result of an LLM call and invoking the parser with a given input.

Class to parse the output of an LLM call.

Class to parse the output of an LLM call that also allows streaming inputs.

OutputParser that parses LLMResult into the top likely string and encodes it into bytes.

Class to parse the output of an LLM call as a comma-separated list.

Class to parse the output of an LLM call to a list with a specific length and separator.

A specific type of StructuredOutputParser that parses JSON data formatted as a markdown code snippet.

Class for parsing the output of an LLM into a JSON object.

Class to parse the output of an LLM call to a list.

Class to parse the output of an LLM call to a list.

Class to parse the output of an LLM call to a list.

Exception that output parsers should raise to signify a parsing error.

This exists to differentiate parsing errors from other code or execution errors that also may arise inside the output parser. OutputParserExceptions will be available to catch and handle in ways to fix the parsing error, while other errors will be raised.

Class to parse the output of an LLM call.

OutputParser that parses LLMResult into the top likely string.

Class to parse the output of an LLM call.

A base class for output parsers that can handle streaming input. It extends the BaseTransformOutputParser class and provides a method for converting parsed outputs into a diff format.