Docs /Templates/ sinapsis-data-readers

TextInput

sinapsis-data-readerscommunityinputreaderstext

Python template · sinapsis_data_readers.templates.text_readers.text_input

Overview

A template for adding text content to a data container.

This class uses the provided attributes to create a `TextPacket` and appends it to the container's text data.

Capabilities

Capabilities: not set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-data-readers==1.0.0
uv pip install sinapsis-data-readers==1.0.0
uv add sinapsis-data-readers==1.0.0

Configuration

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

textRequired

The text content to be added to the data container.

str
Required
Default: null
source

The source identifier for the text input. If provided, it will be used to set the `source` attribute of the created `TextPacket`.

str | None
Optional
Default: null
metadata
sinapsis_core.template_base.base_models.TemplateMetadata | None
Optional
Default: null

Configuration example

Example from the Python docstring:

yaml
agent:
  name: my_test_agent
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: TextInput
  class_name: TextInput
  template_input: InputTemplate
  attributes:
    source: local
    text: 'text to be added to the TextPacket'
Show schema-based configuration skeleton
yaml
templates:
  - template_name: "TextInput"
    class_name: "TextInput"
    attributes:
      text: "<required>"
      source: null

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.