janus.converter.requirements#

Attributes#

log

Classes#

RequirementsDocumenter

RequirementsGenerator

Module Contents#

janus.converter.requirements.log#
class janus.converter.requirements.RequirementsDocumenter(combine_output=False, **kwargs)#

Bases: janus.converter.document.Documenter

RequirementsGenerator

A class that translates code from one programming language to its requirements.

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).

  • max_prompts – The maximum number of prompts to try before giving up.

  • max_tokens – The maximum number of tokens to use in the LLM. If None, the converter will use half the model’s token limit.

  • prompt_templates – The name of the prompt templates to use.

  • db_path – The path to the database to use for vectorization.

  • db_config – The configuration for the database.

  • protected_node_types – A set of node types that aren’t to be merged.

  • prune_node_types – A set of node types which should be pruned.

  • splitter_type – The type of splitter to use. Valid values are “file”, “tag”, “chunk”, “ast-strict”, and “ast-flex”.

  • refiner_type – The type of refiner to use. Valid values: - “parser” - “reflection” - None

  • retriever_type – The type of retriever to use. Valid values: - “active_usings” - “language_docs” - None

  • combine_output (bool) – Whether to combine the output into a single file or not.

  • use_janus_inputs – Whether to use janus inputs or not.

  • target_language – The target programming language.

  • target_version – The target programming language version.