pub struct TaskDetokenization<'a> {
pub token_ids: &'a [u32],
}
Expand description
Input for a crate::Client::detokenize request.
Fields§
§token_ids: &'a [u32]
List of token ids which should be detokenized into text.
Trait Implementations§
Source§impl Task for TaskDetokenization<'_>
impl Task for TaskDetokenization<'_>
Source§type Output = DetokenizationOutput
type Output = DetokenizationOutput
Output returned by
crate::Client::output_of
Source§type ResponseBody = ResponseDetokenization
type ResponseBody = ResponseDetokenization
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 TaskDetokenization<'a>
impl<'a> RefUnwindSafe for TaskDetokenization<'a>
impl<'a> Send for TaskDetokenization<'a>
impl<'a> Sync for TaskDetokenization<'a>
impl<'a> Unpin for TaskDetokenization<'a>
impl<'a> UnwindSafe for TaskDetokenization<'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