pub struct GraphExtractor { /* private fields */ }Implementations§
Source§impl GraphExtractor
impl GraphExtractor
pub fn new(provider: AnyProvider, max_entities: usize, max_edges: usize) -> Self
Sourcepub async fn extract(
&self,
message: &str,
context_messages: &[&str],
) -> Result<Option<ExtractionResult>, MemoryError>
pub async fn extract( &self, message: &str, context_messages: &[&str], ) -> Result<Option<ExtractionResult>, MemoryError>
Extract entities and relations from a message with surrounding context.
Returns None if the message is empty, extraction fails, or the LLM returns
unparseable output. Callers should treat None as a graceful degradation.
§Errors
Returns an error only for transport-level failures (network, auth).
JSON parse failures are logged and return Ok(None).
Auto Trait Implementations§
impl !Freeze for GraphExtractor
impl !RefUnwindSafe for GraphExtractor
impl Send for GraphExtractor
impl Sync for GraphExtractor
impl Unpin for GraphExtractor
impl UnsafeUnpin for GraphExtractor
impl !UnwindSafe for GraphExtractor
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request