Class AIGenPipeline


  • public class AIGenPipeline
    extends Object

    The main entry point of the AI Generation Pipeline.

    This class reads the command line arguments, reads the configuration files, and then executes the AI generation task.

    • Field Detail

      • AIGENPIPELINE_CONFIG

        public static final String AIGENPIPELINE_CONFIG
        Name of the environment variable where we read common configuration from.
        See Also:
        Constant Field Values
      • CONFIGFILE

        public static final String CONFIGFILE
        Name of configuration files we scan upwards from the output directory.
        See Also:
        Constant Field Values
      • ENVVARIABLE_PATTERN

        protected final Pattern ENVVARIABLE_PATTERN
        Pattern for accessing an environment variable, e.g. $FOO or ${FOO}
      • help

        protected boolean help
      • verbose

        protected boolean verbose
      • dryRun

        protected boolean dryRun
      • check

        protected boolean check
      • version

        protected boolean version
      • helpAIquestion

        protected String helpAIquestion
      • output

        protected String output
      • taskOutput

        protected AIInOut taskOutput
      • explain

        protected String explain
      • apiKey

        protected String apiKey
      • organizationId

        protected String organizationId
      • model

        protected String model
      • rootDir

        protected File rootDir
      • writePart

        protected String writePart
      • printconfig

        protected boolean printconfig
      • infilePromptMarker

        protected String infilePromptMarker
      • outputScan

        protected String outputScan
      • printdependencydiagram

        protected boolean printdependencydiagram
      • update

        protected boolean update
    • Constructor Detail

      • AIGenPipeline

        public AIGenPipeline()
    • Method Detail

      • processCommandFile

        protected static void processCommandFile​(String cmdfilepath)
                                          throws IOException
        Read command lines from the given file. Empty lines separate individual command lines. Lines starting with a # are ignored (comments). This saves the startup time when calling the tool multiple times. Incompatible to all other options.
        Throws:
        IOException
      • executeTask

        protected void executeTask()
      • runWithOutputScan

        protected void runWithOutputScan​(String[] args)
        Scans for files in outputScan and processes them.
        Parameters:
        args - the command line arguments
      • isStopCfgfileScan

        protected boolean isStopCfgfileScan​(AIGenArgumentList args)
      • isIgnoreEnvironmentArgs

        protected boolean isIgnoreEnvironmentArgs​(AIGenArgumentList args)
      • answerHelpAIQuestion

        protected void answerHelpAIQuestion()
                                     throws IOException
        This reads the collected texts of the website from /helpaitexts.md and gives them to the AI, and then has it answer the #helpAIquestion from that.
        Throws:
        IOException - if the help texts could not be read
      • printHelp

        protected void printHelp​(boolean onerror)