Skip to main content

InferenceClient

Struct InferenceClient 

Source
pub struct InferenceClient { /* private fields */ }
Expand description

Resource client for inference operations.

Requests use the untagged TermInputDto format. Use the psi, var, constrained, and guard builders to construct request payloads.

Implementations§

Source§

impl InferenceClient

Source

pub async fn add_rule( &self, request: AddRuleRequest, options: Option<&RequestOptions>, ) -> Result<AddRuleResponse, Error>

Add an inference rule.

Source

pub async fn add_fact( &self, request: AddFactRequest, options: Option<&RequestOptions>, ) -> Result<AddFactResponse, Error>

Add a fact.

Source

pub async fn bulk_add_rules( &self, request: BulkAddRulesRequest, options: Option<&RequestOptions>, ) -> Result<BulkAddRulesResponse, Error>

Bulk-add rules.

Source

pub async fn bulk_add_facts( &self, request: BulkAddFactsRequest, options: Option<&RequestOptions>, ) -> Result<BulkAddFactsResponse, Error>

Bulk-add facts.

Source

pub async fn get_facts( &self, options: Option<&RequestOptions>, ) -> Result<GetFactsResponse, Error>

Get all stored facts for the tenant.

Source

pub async fn clear_facts( &self, options: Option<&RequestOptions>, ) -> Result<ClearFactsResponse, Error>

Clear all stored facts for the tenant.

Source

pub async fn backward_chain( &self, request: BackwardChainRequest, options: Option<&RequestOptions>, ) -> Result<BackwardChainResponse, Error>

Query for matching data by searching rules and facts backwards from a goal.

Source

pub async fn forward_chain( &self, request: ForwardChainRequest, options: Option<&RequestOptions>, ) -> Result<ForwardChainResponse, Error>

Derive new facts by applying rules forward from existing facts.

Source

pub async fn forward_chain_tagged( &self, request: TaggedForwardChainRequest, options: Option<&RequestOptions>, ) -> Result<TaggedForwardChainResponse, Error>

Forward chain with probabilistic provenance tags.

Source

pub async fn fuzzy_prove( &self, request: FuzzyProveRequest, options: Option<&RequestOptions>, ) -> Result<FuzzyProveResponse, Error>

Fuzzy proof search.

Source

pub async fn bulk_fuzzy_prove( &self, request: BulkFuzzyProveRequest, options: Option<&RequestOptions>, ) -> Result<BulkFuzzyProveResponse, Error>

Bulk fuzzy inference.

Source

pub async fn bayesian_predict( &self, request: BayesianPredictRequest, options: Option<&RequestOptions>, ) -> Result<BayesianPredictResponse, Error>

Bayesian prediction.

Source

pub async fn naf_prove( &self, request: NafProveRequest, options: Option<&RequestOptions>, ) -> Result<NafProveResponse, Error>

Negation-as-failure proof search.

Source

pub async fn prove_with_negation( &self, request: NafProveRequest, options: Option<&RequestOptions>, ) -> Result<NafProveResponse, Error>

Source

pub async fn create_goal( &self, request: CreateGoalRequest, options: Option<&RequestOptions>, ) -> Result<CreateGoalResponse, Error>

Create a saved goal for reuse.

Source

pub async fn list_goals( &self, options: Option<&RequestOptions>, ) -> Result<ListGoalsResponse, Error>

List all saved goals.

Source

pub async fn get_goal( &self, goal_id: &str, options: Option<&RequestOptions>, ) -> Result<PsiTermDto, Error>

Get a saved goal by ID.

Source

pub async fn delete_goal( &self, goal_id: &str, options: Option<&RequestOptions>, ) -> Result<DeleteGoalResponse, Error>

Delete a saved goal.

Source

pub async fn get_meta_sorts( &self, options: Option<&RequestOptions>, ) -> Result<MetaSortsResponse, Error>

Get meta-sorts used by the inference engine.

Source

pub async fn query( &self, request: BackwardChainRequest, options: Option<&RequestOptions>, ) -> Result<BackwardChainResponse, Error>

Source

pub async fn derive( &self, request: ForwardChainRequest, options: Option<&RequestOptions>, ) -> Result<ForwardChainResponse, Error>

Source

pub async fn assert_fact( &self, request: AddFactRequest, options: Option<&RequestOptions>, ) -> Result<AddFactResponse, Error>

Trait Implementations§

Source§

impl Clone for InferenceClient

Source§

fn clone(&self) -> InferenceClient

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for InferenceClient

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more