langchain_experimental.pal_chain.base
.PALValidationΒΆ
- class langchain_experimental.pal_chain.base.PALValidation(solution_expression_name: Optional[str] = None, solution_expression_type: Optional[type] = None, allow_imports: bool = False, allow_command_exec: bool = False)[source]ΒΆ
Initialize a PALValidation instance.
- Parameters
solution_expression_name (str) β Name of the expected solution expression. If passed, solution_expression_type must be passed as well.
solution_expression_type (str) β AST type of the expected solution expression. If passed, solution_expression_name must be passed as well. Must be one of PALValidation.SOLUTION_EXPRESSION_TYPE_FUNCTION, PALValidation.SOLUTION_EXPRESSION_TYPE_VARIABLE.
allow_imports (bool) β Allow import statements.
allow_command_exec (bool) β Allow using known command execution functions.
Methods
__init__
([solution_expression_name,Β ...])Initialize a PALValidation instance.
- __init__(solution_expression_name: Optional[str] = None, solution_expression_type: Optional[type] = None, allow_imports: bool = False, allow_command_exec: bool = False)[source]ΒΆ
Initialize a PALValidation instance.
- Parameters
solution_expression_name (str) β Name of the expected solution expression. If passed, solution_expression_type must be passed as well.
solution_expression_type (str) β AST type of the expected solution expression. If passed, solution_expression_name must be passed as well. Must be one of PALValidation.SOLUTION_EXPRESSION_TYPE_FUNCTION, PALValidation.SOLUTION_EXPRESSION_TYPE_VARIABLE.
allow_imports (bool) β Allow import statements.
allow_command_exec (bool) β Allow using known command execution functions.