pub struct GraphRAGEngine<V, E, S, L>{ /* private fields */ }Expand description
Main GraphRAG engine
Implementations§
Source§impl<V, E, S, L> GraphRAGEngine<V, E, S, L>
impl<V, E, S, L> GraphRAGEngine<V, E, S, L>
Sourcepub fn new(
vec_index: Arc<V>,
embedding_model: Arc<E>,
sparql_engine: Arc<S>,
llm_client: Arc<L>,
config: GraphRAGConfig,
) -> Self
pub fn new( vec_index: Arc<V>, embedding_model: Arc<E>, sparql_engine: Arc<S>, llm_client: Arc<L>, config: GraphRAGConfig, ) -> Self
Create a new GraphRAG engine
Sourcepub fn with_cache_config(
vec_index: Arc<V>,
embedding_model: Arc<E>,
sparql_engine: Arc<S>,
llm_client: Arc<L>,
config: GraphRAGConfig,
cache_config: CacheConfig,
) -> Self
pub fn with_cache_config( vec_index: Arc<V>, embedding_model: Arc<E>, sparql_engine: Arc<S>, llm_client: Arc<L>, config: GraphRAGConfig, cache_config: CacheConfig, ) -> Self
Create a new GraphRAG engine with custom cache configuration
Sourcepub fn record_graph_update(&self)
pub fn record_graph_update(&self)
Record graph update for adaptive TTL calculation
Sourcepub async fn get_cache_stats(&self) -> (usize, usize)
pub async fn get_cache_stats(&self) -> (usize, usize)
Get current cache hit rate for monitoring
Sourcepub async fn query(&self, query: &str) -> GraphRAGResult<GraphRAGResult2>
pub async fn query(&self, query: &str) -> GraphRAGResult<GraphRAGResult2>
Execute a GraphRAG query
Auto Trait Implementations§
impl<V, E, S, L> Freeze for GraphRAGEngine<V, E, S, L>
impl<V, E, S, L> !RefUnwindSafe for GraphRAGEngine<V, E, S, L>
impl<V, E, S, L> Send for GraphRAGEngine<V, E, S, L>
impl<V, E, S, L> Sync for GraphRAGEngine<V, E, S, L>
impl<V, E, S, L> Unpin for GraphRAGEngine<V, E, S, L>
impl<V, E, S, L> UnsafeUnpin for GraphRAGEngine<V, E, S, L>
impl<V, E, S, L> !UnwindSafe for GraphRAGEngine<V, E, S, L>
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