pub struct AskClient { /* private fields */ }Expand description
High-level client for talon ask planning and synthesis.
Implementations§
Source§impl AskClient
impl AskClient
Sourcepub fn new(chat: ChatClient) -> Self
pub fn new(chat: ChatClient) -> Self
Builds an ask client from an existing chat client.
Sourcepub const fn with_stage_clients(
planning_chat: ChatClient,
synthesis_chat: ChatClient,
) -> Self
pub const fn with_stage_clients( planning_chat: ChatClient, synthesis_chat: ChatClient, ) -> Self
Builds an ask client with distinct planner and synthesis clients.
Sourcepub fn plan_queries_detailed(
&self,
question: &str,
limit: u8,
) -> Result<AskPlan, AskError>
pub fn plan_queries_detailed( &self, question: &str, limit: u8, ) -> Result<AskPlan, AskError>
Sourcepub fn synthesize(
&self,
question: &str,
queries: &[String],
sources: &[AskSource],
) -> Result<String, AskError>
pub fn synthesize( &self, question: &str, queries: &[String], sources: &[AskSource], ) -> Result<String, AskError>
Sourcepub fn synthesize_detailed(
&self,
question: &str,
queries: &[String],
sources: &[AskSource],
) -> Result<AskSynthesis, AskError>
pub fn synthesize_detailed( &self, question: &str, queries: &[String], sources: &[AskSource], ) -> Result<AskSynthesis, AskError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AskClient
impl !RefUnwindSafe for AskClient
impl Send for AskClient
impl Sync for AskClient
impl Unpin for AskClient
impl UnsafeUnpin for AskClient
impl !UnwindSafe for AskClient
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