pub struct CortexInternalClient { /* private fields */ }Expand description
The internal Cortex client used by WASM host functions.
Implementations§
Source§impl CortexInternalClient
impl CortexInternalClient
Sourcepub fn new(config: CortexClientConfig) -> Self
pub fn new(config: CortexClientConfig) -> Self
Create a new Cortex internal client.
Sourcepub fn default_client() -> Self
pub fn default_client() -> Self
Create a client with default configuration.
Sourcepub async fn graph_query(
&self,
input: GraphQueryInput,
) -> Result<GraphQueryOutput, String>
pub async fn graph_query( &self, input: GraphQueryInput, ) -> Result<GraphQueryOutput, String>
Query the semantic graph.
Sourcepub async fn graph_store(
&self,
input: GraphStoreInput,
) -> Result<GraphStoreOutput, String>
pub async fn graph_store( &self, input: GraphStoreInput, ) -> Result<GraphStoreOutput, String>
Store a triple in the semantic graph.
Sourcepub async fn memory_recall(
&self,
input: MemoryRecallInput,
) -> Result<MemoryRecallOutput, String>
pub async fn memory_recall( &self, input: MemoryRecallInput, ) -> Result<MemoryRecallOutput, String>
Recall memories from the Titans system.
Sourcepub async fn memory_remember(
&self,
input: MemoryRememberInput,
) -> Result<MemoryRememberOutput, String>
pub async fn memory_remember( &self, input: MemoryRememberInput, ) -> Result<MemoryRememberOutput, String>
Store a new memory in the Titans system.
Sourcepub async fn health_check(&self) -> bool
pub async fn health_check(&self) -> bool
Check if Cortex is healthy and reachable.
Auto Trait Implementations§
impl Freeze for CortexInternalClient
impl !RefUnwindSafe for CortexInternalClient
impl Send for CortexInternalClient
impl Sync for CortexInternalClient
impl Unpin for CortexInternalClient
impl UnsafeUnpin for CortexInternalClient
impl !UnwindSafe for CortexInternalClient
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
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