Skip to main content

Crate p_memory

Crate p_memory 

Source
Expand description

Shared, offline storage and retrieval for memories, graphs and notes.

SQLite is authoritative. Full-text indexes are replayable projections. Model requests and filesystem watching belong to callers.

Re-exports§

pub use events::LogEvent;
pub use memory::Memory;
pub use memory::MemoryInput;
pub use memory::MemoryState;
pub use memory::DecayPolicy;
pub use memory::FeedbackRequest;
pub use graph::Entity;
pub use graph::EntityInput;
pub use graph::Relation;
pub use graph::RelationInput;
pub use graph::Event;
pub use graph::EventInput;
pub use graph::GraphBatch;
pub use notes::Note;
pub use notes::NoteFileInput;
pub use notes::Chunk;
pub use embeddings::EmbeddingSpace;
pub use embeddings::Embedder;
pub use embeddings::EmbedderOptions;
pub use embeddings::EmbedCallbackError;
pub use embeddings::EmbedErrorKind;
pub use embeddings::SyncReport;
pub use search::SearchRequest;
pub use search::SearchResult;
pub use search::SearchHit;
pub use search::ChunkRef;
pub use search::GraphPrune;
pub use search::ContextualHit;
pub use search::Reranker;
pub use search::RerankerOptions;
pub use preset::SearchPreset;
pub use preset::PresetBudget;
pub use preset::PresetRequest;
pub use preset::PresetResult;
pub use preset::GraphSection;
pub use preset::NoteSection;
pub use types::*;

Modules§

embeddings
events
库内事件流:把「这次执行发生了什么、各阶段花了多久」交给宿主。
graph
graph_search
图谱搜索:基于 petgraph 的内存态图
legacy
Read-only, repeatable migration into a separate p-memory directory.
memory
notes
preset
预设检索:库预先配好的几种搜索方法。
protocol
Versioned JSON boundary for thin foreign-language bindings. Domain behavior lives in the typed Rust stores; this module only decodes and dispatches.
search
text
types

Structs§

KnowledgeBase
Clone shares one process-local engine. Close invalidates all its handles.

Enums§

Error

Type Aliases§

Result