Docs /Templates/ sinapsis-llama-index

LLaMAIndexClearTable

sinapsis-llama-indexLlamaIndexdatabaseembeddingsllamaindexpostgresql

Python template · sinapsis_llama_index.templates.llama_index_clear_table

Overview

A template that connects to a specified PostgreSQL `PGVectorStore` table and deletes all its contents.

This is a destructive, irreversible operation that removes the data inside the vector store.

Capabilities

Capabilities: not set

Installation

Install the published package using pip or uv.

Terminalbash
pip install sinapsis-llama-index==1.0.0
uv pip install sinapsis-llama-index==1.0.0
uv add sinapsis-llama-index==1.0.0

Configuration

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

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

Configuration for connecting to the PostgreSQL database, handling credentials via environment variables if needed.

VectorStoreDBConfig
Optional
Default: null
host

Database host address (hostname or IP). Loaded from PGVECTOR_HOST if not provided. Defaults to `"localhost"`.

str
Optional
Default: "localhost"
port

Database port number. Loaded from PGVECTOR_PORT if not provided. Defaults to `5432`.

int
Optional
Default: 5432
user

Database user name. Loaded from PGVECTOR_USER if not provided. Defaults to `None`.

str | None
Optional
Default: null
db_name

Name of the specific database to connect to. Defaults to `"sinapsis_db"`.

str
Optional
Default: "sinapsis_db"
password

Database password. Loaded from PGVECTOR_PASSWORD if not provided. Defaults to `None`.

str | None
Optional
Default: null
provider

Database provider. Supabase uses the existing database and SSL. Defaults to `"postgres"`.

typing.Literal['postgres', 'supabase']
Optional
Default: "postgres"
table_name

Name of the table within the database containing the vectors. Defaults to `"sinapsis_table"`.

str
Optional
Default: "sinapsis_table"
embedding_dimension

The dimension of the vector table. Required to properly interface with the table.

int
Optional
Default: 384

Configuration example

Example from the Python docstring:

yaml
agent:
  name: my_test_agent
templates:
- template_name: InputTemplate
  class_name: InputTemplate
  attributes: {}
- template_name: LLaMAIndexClearTable
  class_name: LLaMAIndexClearTable
  template_input: InputTemplate
  attributes:
    db_config:
      user: my_user
      password: my_password
      port: 5432
      host: localhost
      db_name: my_db
      table_name: my_embeddings
    embedding_dimension: 384
Show schema-based configuration skeleton
yaml
templates:
  - template_name: "LLaMAIndexClearTable"
    class_name: "LLaMAIndexClearTable"
    attributes:
      db_config:
        host: "localhost"
        port: 5432
        user: null
        db_name: "sinapsis_db"
        password: null
        provider: "postgres"
        table_name: "sinapsis_table"
      embedding_dimension: 384

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.