ContextChunker
Python template · sinapsis_generic_data_tools.templates.context_chunker
Overview
Template to chunk a list of sentences keeping a context window Attributes: window_size (int): Total sentences per chunk overlap (int): Sentences to carry over to the next chunk override_text (bool): Whether to override the text packets in the container
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-generic-data-tools==1.0.0uv pip install sinapsis-generic-data-tools==1.0.0uv add sinapsis-generic-data-tools==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: 2
Field used to set the template instance name and agent name. Defaults to None.
Optional
Default: null
Optional
Default: 5
Optional
Default: false
Configuration example
Generated from documented defaults. Replace any placeholders and complete required nested settings before running.
templates:
- template_name: "ContextChunker"
class_name: "ContextChunker"
attributes:
overlap: 2
window_size: 5
override_text: false
Inheritance
sinapsis_core.template_base.template.TemplateEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.