LLaMAIndexInsertNodes
Python template · sinapsis_llama_index.templates.llama_index_insert_nodes
Overview
Insert embedded `TextNode` objects into a PostgreSQL `PGVectorStore`.
This template reads nodes from `container.generic_data[input_nodes_key]` and inserts them into the configured PGVector table. The vector dimension is inferred lazily from the first valid node embedding, so it does not need to be configured manually.
Capabilities
Capabilities: not setInstallation
Install the published package using pip or uv.
pip install sinapsis-llama-index==1.0.0uv pip install sinapsis-llama-index==1.0.0uv add sinapsis-llama-index==1.0.0Configuration
Effective fields from the inspector schema, including nested Pydantic model fields.
Optional
Default: null
Configuration for connecting to the PostgreSQL database, handling credentials via environment variables if needed.
Optional
Default: null
Database host address (hostname or IP). Loaded from PGVECTOR_HOST if not provided. Defaults to `"localhost"`.
Optional
Default: "localhost"
Database port number. Loaded from PGVECTOR_PORT if not provided. Defaults to `5432`.
Optional
Default: 5432
Database user name. Loaded from PGVECTOR_USER if not provided. Defaults to `None`.
Optional
Default: null
Name of the specific database to connect to. Defaults to `"sinapsis_db"`.
Optional
Default: "sinapsis_db"
Database password. Loaded from PGVECTOR_PASSWORD if not provided. Defaults to `None`.
Optional
Default: null
Database provider. Supabase uses the existing database and SSL. Defaults to `"postgres"`.
Optional
Default: "postgres"
Name of the table within the database containing the vectors. Defaults to `"sinapsis_table"`.
Optional
Default: "sinapsis_table"
Key used to access the nodes to insert into the store.
Required
Default: null
Configuration example
Example from the Python docstring:
agent:
name: my_test_agent
templates:
- template_name: InputTemplate
class_name: InputTemplate
attributes: {}
- template_name: LLaMAIndexInsertNodes
class_name: LLaMAIndexInsertNodes
template_input: InputTemplate
attributes:
db_config:
user: my_user
password: my_password
port: 5432
host: localhost
db_name: my_db
table_name: my_embeddings
input_nodes_key: EmbeddingNodeGeneratorShow schema-based configuration skeleton
templates:
- template_name: "LLaMAIndexInsertNodes"
class_name: "LLaMAIndexInsertNodes"
attributes:
db_config:
host: "localhost"
port: 5432
user: null
db_name: "sinapsis_db"
password: null
provider: "postgres"
table_name: "sinapsis_table"
input_nodes_key: "<required>"
Inheritance
sinapsis_core.template_base.template.TemplateEnvironment variables
Environment definitions belong to their canonical Python modules.
No directly related environment variables listed.