
Node Details
- Name: promptTemplate
- Type: PromptTemplate
- Version: 1.0
- Category: Prompts
Base Classes
- PromptTemplate
- BasePromptTemplate
Parameters
Inputs
-
Template (Required)
- Type: string
- Rows: 4
-
Placeholder:
"What is a good name for a company that makes {product}?"
-
Description: The prompt template with variables in curly braces
{ }
, which will be replaced with actual values
-
Format Prompt Values (Optional)
- Type: json
- Accept Variable: true
- List: true
- Description: JSON object containing values for template variables
-
Example:
Functionality
-
Template Processing
- Variable extraction
- Placeholder validation
- Format verification
- Dynamic content insertion
-
Value Management
- JSON parsing
- Variable mapping
- Type validation
- Error checking
Use Cases
-
Dynamic Content Generation
- Customized prompts
- Variable content
- Consistent formatting
- Template reuse
-
Standardization
- Format consistency
- Error reduction
- Quality control
- Pattern enforcement
Integration Notes
- Supports variable injection
- Handles JSON formatting
- Validates template syntax
- Manages error states
Best Practices
-
Template Design
- Clear variable naming
- Consistent formatting
- Descriptive placeholders
- Proper documentation
-
Value Management
- Valid JSON structure
- Complete variable sets
- Type consistency
- Error handling
-
Performance Optimization
- Efficient templates
- Minimal complexity
- Reusable patterns
- Clear structure