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: langchain.output_parsers.PydanticOutputParser, janus.parsers.code_parser.JanusParser

block_name: str = ''#
set_reference(block)#
Parameters:

block (janus.language.block.CodeBlock) –

parse(text)#
Parameters:

text (str) –

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: langchain.schema.output_parser.BaseOutputParser[str], janus.parsers.code_parser.JanusParser

expected_keys: set[str]#
set_reference(block)#
Parameters:

block (janus.language.block.CodeBlock) –

parse(text)#
Parameters:

text (str) –

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