janus.converter.document#

Attributes#

log

Classes#

Documenter

Parent class that converts code into something else.

MultiDocumenter

Parent class that converts code into something else.

MadLibsDocumenter

Parent class that converts code into something else.

Module Contents#

janus.converter.document.log#
class janus.converter.document.Documenter(source_language='fortran', drop_comments=True, **kwargs)#

Bases: janus.converter.converter.Converter

Parent class that converts code into something else.

Children will determine what the code gets converted into. Whether that’s translated into another language, into pseudocode, requirements, documentation, etc., or converted into embeddings

Initialize a Converter instance.

Parameters:
  • source_language (str) – The source programming language.

  • parser_type – The type of parser to use for parsing the LLM output. Valid values are “code”, “text”, “eval”, and None (default). If None, the Converter assumes you won’t be parsing an output (i.e., adding to an embedding DB).

  • drop_comments (bool) –

class janus.converter.document.MultiDocumenter(**kwargs)#

Bases: Documenter

Parent class that converts code into something else.

Children will determine what the code gets converted into. Whether that’s translated into another language, into pseudocode, requirements, documentation, etc., or converted into embeddings

Initialize a Converter instance.

Parameters:
  • source_language – The source programming language.

  • parser_type – The type of parser to use for parsing the LLM output. Valid values are “code”, “text”, “eval”, and None (default). If None, the Converter assumes you won’t be parsing an output (i.e., adding to an embedding DB).

class janus.converter.document.MadLibsDocumenter(comments_per_request=None, **kwargs)#

Bases: Documenter

Parent class that converts code into something else.

Children will determine what the code gets converted into. Whether that’s translated into another language, into pseudocode, requirements, documentation, etc., or converted into embeddings

Initialize a Converter instance.

Parameters:
  • source_language – The source programming language.

  • parser_type – The type of parser to use for parsing the LLM output. Valid values are “code”, “text”, “eval”, and None (default). If None, the Converter assumes you won’t be parsing an output (i.e., adding to an embedding DB).

  • comments_per_request (int | None) –