janus.parsers.partition_parser#

Attributes#

Classes#

Module Contents#

janus.parsers.partition_parser.log#
janus.parsers.partition_parser.RNG#
class janus.parsers.partition_parser.PartitionObject#

Bases: langchain_core.pydantic_v1.BaseModel

reasoning: str#
location: str#
class janus.parsers.partition_parser.PartitionList#

Bases: langchain_core.pydantic_v1.BaseModel

class janus.parsers.partition_parser.PartitionParser(token_limit, model)#

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

Parameters:
  • token_limit (int) –

  • model (langchain_core.language_models.BaseLanguageModel) –

token_limit: int#
model: langchain_core.language_models.BaseLanguageModel#
lines: list[str] = []#
line_id_to_index: dict[str, int]#
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