PgDocumentRegistry

org.llm4s.rag.loader.PgDocumentRegistry
See thePgDocumentRegistry companion class
@Experimental

Attributes

Companion
class
Source
PgDocumentRegistry.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(jdbcUrl: String, user: String, password: Secret, tableName: String, maxPoolSize: Int): Result[PgDocumentRegistry]

A registry with a connection pool of its own, which PgDocumentRegistry.close closes. Creates the table if it does not exist.

A registry with a connection pool of its own, which PgDocumentRegistry.close closes. Creates the table if it does not exist.

Value parameters

jdbcUrl

e.g. jdbc:postgresql://localhost:5432/mydb

maxPoolSize

the pool's size; a registry makes one short call per document

password

database password

tableName

the registry table; a valid SQL identifier

user

database user

Attributes

Source
PgDocumentRegistry.scala
def fromDataSource(dataSource: DataSource, tableName: String): Result[PgDocumentRegistry]

A registry over dataSource, a pool the caller owns: a doobie HikariTransactor's kernel, a Play or Slick pool, pgjdbc's PGSimpleDataSource, or the pool a PgVectorStore was built over. PgDocumentRegistry.close leaves it open. Creates the table if it does not exist.

A registry over dataSource, a pool the caller owns: a doobie HikariTransactor's kernel, a Play or Slick pool, pgjdbc's PGSimpleDataSource, or the pool a PgVectorStore was built over. PgDocumentRegistry.close leaves it open. Creates the table if it does not exist.

Value parameters

dataSource

a javax.sql.DataSource the caller owns and closes

tableName

the registry table; a valid SQL identifier

Attributes

Source
PgDocumentRegistry.scala

Concrete fields

The table a registry uses when none is named.

The table a registry uses when none is named.

Attributes

Source
PgDocumentRegistry.scala