pub struct TaskExplanation<'a> {
pub prompt: Prompt<'a>,
pub target: &'a str,
pub granularity: Granularity,
}
Expand description
Input for a crate::Client::explanation request.
Fields§
§prompt: Prompt<'a>
The prompt that typically was the input of a previous completion request
target: &'a str
The target string that should be explained. The influence of individual parts of the prompt for generating this target string will be indicated in the response.
granularity: Granularity
Granularity parameters for the explanation
Trait Implementations§
Source§impl Task for TaskExplanation<'_>
impl Task for TaskExplanation<'_>
Source§type Output = ExplanationOutput
type Output = ExplanationOutput
Output returned by
crate::Client::output_of
Source§type ResponseBody = ResponseExplanation
type ResponseBody = ResponseExplanation
Expected answer of the Aleph Alpha API
Source§fn build_request(
&self,
client: &Client,
base: &str,
model: &str,
) -> RequestBuilder
fn build_request( &self, client: &Client, base: &str, model: &str, ) -> RequestBuilder
Prepare the request for the Aleph Alpha API. Authentication headers can be assumed to be
already set.
Source§fn body_to_output(&self, response: Self::ResponseBody) -> Self::Output
fn body_to_output(&self, response: Self::ResponseBody) -> Self::Output
Parses the response of the server into higher level structs for the user.
Auto Trait Implementations§
impl<'a> Freeze for TaskExplanation<'a>
impl<'a> RefUnwindSafe for TaskExplanation<'a>
impl<'a> Send for TaskExplanation<'a>
impl<'a> Sync for TaskExplanation<'a>
impl<'a> Unpin for TaskExplanation<'a>
impl<'a> UnwindSafe for TaskExplanation<'a>
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