smart-templates
v1.0.1
Published
Smart templates for generating content with AI.
Downloads
2
Readme
Smart Templates
Smart Templates is a powerful and flexible system for generating content with AI, designed to streamline the process of creating dynamic, context-aware templates.
Key Features
Unstructured Input: Unlike traditional template systems, Smart Templates can work with unstructured context, eliminating the need to specify exact values for each variable.
Mini-Prompts: Variables in templates act as mini-prompts, allowing for more nuanced and context-aware content generation.
EJS Base Syntax: Utilizes EJS (Embedded JavaScript) as the foundational template syntax engine.
Global Variable Mapping: Variables can be mapped to prompts, which are editable in settings and replaced using function calls.
AI-Powered Content Generation: Leverages AI models to generate content based on the provided context.
Adapter Support: Enables non-EJS template syntax through adapters, which convert to EJS for variable extraction and merging.
Why Smart Templates?
- Flexibility: Adapts to various content generation needs with minimal setup.
- Context-Awareness: Generates content that's relevant to the surrounding context.
Core Components
- SmartTemplates Class
The main class that handles template processing and content generation.