Struct aleph_alpha_client::TaskExplanation
source · 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 paramaters for the explanation
Trait Implementations§
source§impl Task for TaskExplanation<'_>
impl Task for TaskExplanation<'_>
§type Output = ExplanationOutput
type Output = ExplanationOutput
Output returned by
crate::Client::output_of
§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> 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