pub struct GotMode { /* private fields */ }Expand description
Graph-of-Thoughts mode handler for managing complex reasoning graphs.
Implementations§
Source§impl GotMode
impl GotMode
Sourcepub fn new(
storage: SqliteStorage,
langbase: LangbaseClient,
config: &Config,
) -> Self
pub fn new( storage: SqliteStorage, langbase: LangbaseClient, config: &Config, ) -> Self
Create a new GoT mode handler
Sourcepub async fn initialize(
&self,
params: GotInitParams,
) -> AppResult<GotInitResult>
pub async fn initialize( &self, params: GotInitParams, ) -> AppResult<GotInitResult>
Initialize a new GoT graph
Sourcepub async fn generate(
&self,
params: GotGenerateParams,
) -> AppResult<GotGenerateResult>
pub async fn generate( &self, params: GotGenerateParams, ) -> AppResult<GotGenerateResult>
Generate continuations from a node
Sourcepub async fn score(&self, params: GotScoreParams) -> AppResult<GotScoreResult>
pub async fn score(&self, params: GotScoreParams) -> AppResult<GotScoreResult>
Score a node
Sourcepub async fn aggregate(
&self,
params: GotAggregateParams,
) -> AppResult<GotAggregateResult>
pub async fn aggregate( &self, params: GotAggregateParams, ) -> AppResult<GotAggregateResult>
Aggregate multiple nodes
Sourcepub async fn refine(
&self,
params: GotRefineParams,
) -> AppResult<GotRefineResult>
pub async fn refine( &self, params: GotRefineParams, ) -> AppResult<GotRefineResult>
Refine a node
Sourcepub async fn prune(&self, params: GotPruneParams) -> AppResult<GotPruneResult>
pub async fn prune(&self, params: GotPruneParams) -> AppResult<GotPruneResult>
Prune low-scoring nodes
Sourcepub async fn finalize(
&self,
params: GotFinalizeParams,
) -> AppResult<GotFinalizeResult>
pub async fn finalize( &self, params: GotFinalizeParams, ) -> AppResult<GotFinalizeResult>
Finalize the graph and get conclusions
Sourcepub async fn get_state(
&self,
params: GotGetStateParams,
) -> AppResult<GotStateResult>
pub async fn get_state( &self, params: GotGetStateParams, ) -> AppResult<GotStateResult>
Get current graph state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GotMode
impl !RefUnwindSafe for GotMode
impl Send for GotMode
impl Sync for GotMode
impl Unpin for GotMode
impl !UnwindSafe for GotMode
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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