Docs /Templates/ sinapsis-generic-data-tools

TextContentFilter

sinapsis-generic-data-toolscommunity

Python template · sinapsis_generic_data_tools.templates.text_content_filter

Overview

Base class for all Templates in Sinapsis. A template is a reusable blueprint for implementing Agent executable components. In summary, templates can encapsulate a series of operations, ranging from simple methods to sophisticated orchestrations of multiple functions or other templates.

Properties: * Highly parameterized through Template attributes. * Single input and output design. * Standalone functionality. * Enable the creation of modular and scalable agents. * Can be dynamically created from existing python methods or classes.

Capabilities

Capabilities: not set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-generic-data-tools==1.0.0
uv pip install sinapsis-generic-data-tools==1.0.0
uv add sinapsis-generic-data-tools==1.0.0

Configuration

Effective fields from the inspector schema, including nested Pydantic model fields.

metadata

Field used to set the template instance name and agent name. Defaults to None.

sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null
window_size
int
Optional
Default: 20
repeated_word_threshold
int
Optional
Default: 10
unique_words_ratio_threshold
float
Optional
Default: 0.1

Configuration example

Generated from documented defaults. Replace any placeholders and complete required nested settings before running.

yaml
templates:
  - template_name: "TextContentFilter"
    class_name: "TextContentFilter"
    attributes:
      window_size: 20
      repeated_word_threshold: 10
      unique_words_ratio_threshold: 0.1

Inheritance

Immediate parent: sinapsis_core.template_base.template.Template

Environment variables

Environment definitions belong to their canonical Python modules.

No directly related environment variables listed.