1.0.2 • Published 9 months ago

@roadiehq/rag-ai-storage-pgvector v1.0.2

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
9 months ago

RoadiePgVectorStore - PostgreSQL RAG AI Vector Storage

A module enabling usage of PostgreSQL as a storage solution for RAG AI Backstage backend plugin.

Note, you need to have uuid-ossp and vector PostgreSQL extensions available on your database to be able to use this module.

This module construct a database and needed database tables to support storing embeddings vectors into your PostgreSQL DB. You can control the name of the database with the configured environment name within your Backstage backend application.

How to initialize

You can use the exported createRoadiePgVectorStore function to initialize the RoadiePGVectorStore. This initialization function expects an instance of logger and a Knex DB connection.

Here is a TypeScript example:

const config = {
  logger: Logger, // logger instance
  db: Knex, // database connection provided by Knex
  options: {
    chunkSize: number, // (optional) amount of documents to chunk when adding vectors, default is 500
    tableName: string, // (optional) Table naming to use to store embeddings. Default is 'embeddings'
  },
};

const vectorStore = await createRoadiePgVectorStore({
  logger,
  database,
  options: { chunkSize, tableName },
});
1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago

0.1.6

10 months ago

0.1.4

11 months ago

0.1.3

11 months ago

0.1.5

10 months ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago