#[non_exhaustive]pub struct MemoryPgvector {
pub long_term: Arc<dyn LongTermMemory>,
pub pgvector_long_term: Arc<PgvectorLongTerm>,
}Expand description
Factory bundle returned by MemoryPgvector::new.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.long_term: Arc<dyn LongTermMemory>Trait-object view for AgentContext; the same instance as
Self::pgvector_long_term (use this unless you need the concrete type).
pgvector_long_term: Arc<PgvectorLongTerm>Concrete PgvectorLongTerm handle. FilterableLongTermMemory lives
in klieo-memory-graph and cannot ride the LongTermMemory trait
object, so the GraphRAG composer needs the concrete type. Both fields
point at the same instance.
Implementations§
Source§impl MemoryPgvector
impl MemoryPgvector
Sourcepub async fn connect(url: impl Into<String>) -> Result<Self, MemoryError>
pub async fn connect(url: impl Into<String>) -> Result<Self, MemoryError>
Capability-shaped default — connect with DummyEmbedder and default
PgvectorConfig (table prefix klieo_facts, embedder id default).
Use Self::new for a real embedder or a non-default config.
Sourcepub async fn new(
cfg: PgvectorConfig,
embedder: Arc<dyn Embedder>,
) -> Result<Self, MemoryError>
pub async fn new( cfg: PgvectorConfig, embedder: Arc<dyn Embedder>, ) -> Result<Self, MemoryError>
Connect to Postgres and return a ready-to-use handle. The table is
provisioned lazily on the first remember, so concurrent process
starts don’t race on DDL.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryPgvector
impl !UnwindSafe for MemoryPgvector
impl Freeze for MemoryPgvector
impl Send for MemoryPgvector
impl Sync for MemoryPgvector
impl Unpin for MemoryPgvector
impl UnsafeUnpin for MemoryPgvector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more