pub struct DeepThoughtRouter { /* private fields */ }Implementations§
Source§impl DeepThoughtRouter
impl DeepThoughtRouter
pub fn add_url_to_catalog(&mut self, doc: &str, url: &str) -> Result<(), Error>
pub fn add_endpoint_to_catalog( &mut self, endpoint_type: &str, doc: &str, url: &str, ) -> Result<(), Error>
pub fn add_route_to_catalog( &mut self, doc: &str, route: &str, ) -> Result<(), Error>
pub fn add_object_to_catalog(&mut self, obj: Value) -> Result<(), Error>
pub fn query_catalog( &mut self, q: &str, ) -> Result<Vec<VecStoreNeighbors>, Error>
Source§impl DeepThoughtRouter
impl DeepThoughtRouter
pub fn refine_prompt( &mut self, prompt: &str, ) -> Result<DeepThoughtRecommededPrompt, Error>
Source§impl DeepThoughtRouter
impl DeepThoughtRouter
pub fn query_vecstore( &mut self, route_name: &str, query: &str, ) -> Result<Vec<String>, Error>
pub fn query_vecstore_templated( &mut self, route_name: &str, template_name: &str, query: &str, ) -> Result<HashMap<String, Value>, Error>
pub fn rag( &mut self, route_name: &str, template_name: &str, query: &str, ) -> Result<String, Error>
Source§impl DeepThoughtRouter
impl DeepThoughtRouter
pub fn new_route( &mut self, name: &str, config: DeepThoughtBuilder, ) -> Result<(), Error>
pub fn new_ctx_route( &mut self, name: &str, ctx_route: DeepThoughtCtxModel, ) -> Result<(), Error>
pub fn get_route(&mut self, name: &str) -> Option<&mut DeepThought>
pub fn get_ctx_route(&mut self, name: &str) -> Option<&mut DeepThoughtCtxModel>
pub fn list_routes(&mut self) -> Vec<String>
pub fn list_ctx_routes(&mut self) -> Vec<String>
pub fn drop_route(&mut self, name: &str) -> Result<(), Error>
pub fn drop_ctx_route(&mut self, name: &str) -> Result<(), Error>
Source§impl DeepThoughtRouter
impl DeepThoughtRouter
pub fn new_session(&mut self, name: &str) -> Result<(), Error>
pub fn new_session_with_prompt( &mut self, name: &str, prompt: &str, ) -> Result<(), Error>
pub fn get_session( &mut self, name: &str, ) -> Result<&mut DeepThoughtContext, Error>
pub fn drop_session(&mut self, name: &str) -> Result<(), Error>
pub fn list_sessions(&mut self) -> Vec<String>
Auto Trait Implementations§
impl Freeze for DeepThoughtRouter
impl RefUnwindSafe for DeepThoughtRouter
impl Send for DeepThoughtRouter
impl Sync for DeepThoughtRouter
impl Unpin for DeepThoughtRouter
impl UnwindSafe for DeepThoughtRouter
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