Skip to main content

Crate synaptic_parsers

Crate synaptic_parsers 

Source

Structs§

BooleanOutputParser
Parses yes/no, true/false, y/n style responses into a boolean.
EnumOutputParser
Validates that the trimmed input matches one of the allowed enum values.
JsonOutputParser
Parses a string as JSON, returning a serde_json::Value.
ListOutputParser
Parses a string into a list of strings by splitting on the configured separator.
MarkdownListOutputParser
Parses markdown-formatted lists (both - item and * item).
NumberedListOutputParser
Parses numbered lists like 1. item, 2. item.
OutputFixingParser
A parser that uses an LLM to fix outputs that fail to parse.
RetryOutputParser
A parser that uses an LLM to fix outputs that fail to parse, including the original prompt context for better correction.
StrOutputParser
Extracts the text content from a Message.
StructuredOutputParser
Parses a JSON string and deserializes it into type T.
XmlElement
Represents a parsed XML element.
XmlOutputParser
Parses XML-formatted LLM output into an XmlElement tree.

Enums§

ListSeparator
Separator used to split the input into a list.

Traits§

FormatInstructions
Trait for parsers that can provide format instructions to include in prompts.