janus.parsers.doc_parser#

Attributes#

log

Classes#

Module Contents#

janus.parsers.doc_parser.log#
class janus.parsers.doc_parser.MultiDoc#

Bases: langchain_core.pydantic_v1.BaseModel

docstring: str#
example_usage: str#
pseudocode: str#
class janus.parsers.doc_parser.MultiDocumentationParser#

Bases: janus.parsers.parser.JanusParser, langchain.output_parsers.PydanticOutputParser

block_name: str = ''#
parse_input(block)#

Parse the input block into raw string input ready to be passed to an LLM. Also perform any processing or saving of metadata.

Parameters:

block (janus.language.block.CodeBlock) – The CodeBlock to be processed

Returns:

A parsed version of the input text

Return type:

str

parse(text)#
Parameters:

text (str | langchain_core.messages.BaseMessage) –

Return type:

str

parse_combined_output(text)#

Parse the output text from the LLM when multiple inputs are combined.

Parameters:

text (str) – The output text from the LLM.

Returns:

A parsed version of the text.

Return type:

str

get_format_instructions()#

Get the format instructions for the parser.

Returns:

The format instructions for the LLM.

Return type:

str

class janus.parsers.doc_parser.MadlibsDocumentationParser#

Bases: janus.parsers.parser.JanusParser

expected_keys: set[str]#
parse_input(block)#

Parse the input block into raw string input ready to be passed to an LLM. Also perform any processing or saving of metadata.

Parameters:

block (janus.language.block.CodeBlock) – The CodeBlock to be processed

Returns:

A parsed version of the input text

Return type:

str

parse(text)#
Parameters:

text (str | langchain_core.messages.BaseMessage) –

Return type:

str

parse_combined_output(text)#

Parse the output text from the LLM when multiple inputs are combined.

Parameters:

text (str) – The output text from the LLM.

Returns:

A parsed version of the text.

Return type:

str

get_format_instructions()#

Get the format instructions for the parser.

Returns:

The format instructions for the LLM.

Return type:

str