PgVectorStore

org.llm4s.vectorstore.PgVectorStore
See thePgVectorStore companion class
object PgVectorStore

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class Config(host: String, port: Int, database: String, user: String, password: String, tableName: String, maxPoolSize: Int)

Configuration for PgVectorStore.

Configuration for PgVectorStore.

Value parameters

database

Database name

host

Database host

maxPoolSize

Maximum connection pool size (default: 10)

password

Database password

port

Database port

tableName

Table name for vectors (default: "vectors")

user

Database user

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def apply(config: Config): Result[PgVectorStore]

Create a PgVectorStore from configuration.

Create a PgVectorStore from configuration.

Value parameters

config

The store configuration

Attributes

Returns

The vector store or error

def apply(connectionString: String, user: String, password: String, tableName: String): Result[PgVectorStore]

Create a PgVectorStore from connection string.

Create a PgVectorStore from connection string.

Value parameters

connectionString

PostgreSQL connection string (jdbc:postgresql://...)

password

Database password

tableName

Table name for vectors

user

Database user

Attributes

Returns

The vector store or error

def local(tableName: String): Result[PgVectorStore]

Create a PgVectorStore with default local settings.

Create a PgVectorStore with default local settings.

Connects to localhost:5432/postgres with user postgres.

Value parameters

tableName

Table name for vectors

Attributes

Returns

The vector store or error