Class Block


  • public abstract class Block
    extends Object
    Base class for blocks parsed from a prompt template
    • Constructor Detail

      • Block

        public Block​(String content,
                     BlockTypes type)
        Base constructor
        Parameters:
        content - Block content
        type - Block type
    • Method Detail

      • getContent

        public String getContent()
        Get the block content
        Returns:
        Block content
      • isValid

        public abstract boolean isValid()
        Check if the block content is valid.
        Returns:
        True if the block content is valid
      • getType

        public BlockTypes getType()
        Get the block type
        Returns:
        Block type