Skip to main content

Function: embeddingStoreSchema()

embeddingStoreSchema(prefix?, dialect?): readonly string[]

Defined in: packages/agentos/src/cognition/rag/embeddings/SqlEmbeddingStore.ts:110

The statements that create the store's table and its index when they are missing, for a host's migration. The table holds a tenant, a model, a vector size, an input hash, the vector as a blob of four-byte floats, a token count and two times in epoch milliseconds; its primary key is the first four. It has no column for text.

Parameters​

prefix?​

string = 'agentos_embedding'

Table-name prefix, as embeddingStoreTables takes it.

dialect?​

SqlDialect = ...

The database's dialect; PostgreSQL unless given. createStorageFeatures(adapter).dialect gives an adapter's.

Returns​

readonly string[]

The statements, in the order they run.

Throws​

invalid_embedding_table_prefix for a malformed prefix.