PostgresMemoryStore

org.llm4s.agent.memory.PostgresMemoryStore
See thePostgresMemoryStore companion class

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)

Attributes

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

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
SqlParam.type
sealed trait SqlParam

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class PBoolean
class PDouble
class PInt
class PLong
object PNullDouble
object PNullVector
class PString
class PTimestamp
Show all

Value members

Concrete methods

def apply(config: Config, embeddingService: Option[EmbeddingService]): Result[PostgresMemoryStore]

A store over a connection pool it creates from config, and closes on PostgresMemoryStore.close.

A store over a connection pool it creates from config, and closes on PostgresMemoryStore.close.

Attributes

def fromDataSource(dataSource: DataSource, tableName: String, embeddingService: Option[EmbeddingService]): Result[PostgresMemoryStore]

A store over dataSource, a pool the caller already has - a doobie HikariTransactor's kernel, a Play or Slick pool, or a platform-provided DataSource. The store creates its tables if absent, and never closes dataSource: PostgresMemoryStore.close leaves it open for its owner. Store calls are blocking JDBC; run them on a blocking pool (IO.blocking, Sync[F].blocking) from effectful code.

A store over dataSource, a pool the caller already has - a doobie HikariTransactor's kernel, a Play or Slick pool, or a platform-provided DataSource. The store creates its tables if absent, and never closes dataSource: PostgresMemoryStore.close leaves it open for its owner. Store calls are blocking JDBC; run them on a blocking pool (IO.blocking, Sync[F].blocking) from effectful code.

Value parameters

dataSource

a javax.sql.DataSource the caller owns and closes

embeddingService

the service embedding memories, if any

tableName

the memory table; at most 55 characters matching [a-zA-Z_][a-zA-Z0-9_]*

Attributes