pub struct PineconeStore { /* private fields */ }Expand description
Pinecone vector store adapter.
In stub mode (default), entries are stored in-memory and searched with
brute-force cosine similarity. In HTTP mode (feature http-vectorstore),
a [reqwest::Client] is constructed to talk to the Pinecone API.
Implementations§
Source§impl PineconeStore
impl PineconeStore
Sourcepub fn new(
api_key: impl Into<String>,
index_name: impl Into<String>,
environment: impl Into<String>,
) -> Self
pub fn new( api_key: impl Into<String>, index_name: impl Into<String>, environment: impl Into<String>, ) -> Self
Create a new Pinecone adapter in stub mode.
Sourcepub fn with_namespace(self, ns: impl Into<String>) -> Self
pub fn with_namespace(self, ns: impl Into<String>) -> Self
Set the namespace for multi-tenant isolation.
Sourcepub fn index_name(&self) -> &str
pub fn index_name(&self) -> &str
Return the configured index name.
Sourcepub fn environment(&self) -> &str
pub fn environment(&self) -> &str
Return the configured environment.
Trait Implementations§
Source§impl VectorStore for PineconeStore
impl VectorStore for PineconeStore
Source§fn insert<'life0, 'async_trait>(
&'life0 self,
entry: MemoryEntry,
) -> Pin<Box<dyn Future<Output = ArgentorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn insert<'life0, 'async_trait>(
&'life0 self,
entry: MemoryEntry,
) -> Pin<Box<dyn Future<Output = ArgentorResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert a memory entry.
Source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query_embedding: &'life1 [f32],
top_k: usize,
session_filter: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = ArgentorResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query_embedding: &'life1 [f32],
top_k: usize,
session_filter: Option<Uuid>,
) -> Pin<Box<dyn Future<Output = ArgentorResult<Vec<SearchResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Search for the top-k most similar entries to a query embedding.
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = ArgentorResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = ArgentorResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a memory entry by ID.
Auto Trait Implementations§
impl !Freeze for PineconeStore
impl !RefUnwindSafe for PineconeStore
impl Send for PineconeStore
impl Sync for PineconeStore
impl Unpin for PineconeStore
impl UnsafeUnpin for PineconeStore
impl !UnwindSafe for PineconeStore
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