Class Block
- java.lang.Object
-
- com.microsoft.semantickernel.templateengine.blocks.Block
-
public abstract class Block extends Object
Base class for blocks parsed from a prompt template
-
-
Constructor Summary
Constructors Constructor Description Block(String content, BlockTypes type)Base constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetContent()Get the block contentBlockTypesgetType()Get the block typeabstract booleanisValid()Check if the block content is valid.
-
-
-
Constructor Detail
-
Block
public Block(String content, BlockTypes type)
Base constructor- Parameters:
content- Block contenttype- 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
-
-