pub enum ItemImportance {
TokenIds {
scores: Vec<f32>,
},
Target {
scores: Vec<ScoredSegment>,
},
Text {
scores: Vec<ScoredSegment>,
},
Image {
scores: Vec<ScoredRect>,
},
}
Variants§
TokenIds
Explains the importance of a request prompt item of type “token_ids”. Will contain one floating point importance value for each token in the same order as in the original prompt.
Target
Explains the importance of text in the target string that came before the currently to-be-explained target token. The amount of items in the “scores” array depends on the granularity setting. Each score object contains an inclusive start character and a length of the substring plus a floating point score value.
Fields
scores: Vec<ScoredSegment>
Text
Explains the importance of a text prompt item. The amount of items in the “scores” array depends on the granularity setting. Each score object contains an inclusive start character and a length of the substring plus a floating point score value.
Fields
scores: Vec<ScoredSegment>
Image
Explains the importance of an image prompt item. The amount of items in the “scores” array depends on the granularity setting. Each score object contains the top-left corner of a rectangular area in the image prompt. The coordinates are all between 0 and 1 in terms of the total image size
Fields
scores: Vec<ScoredRect>
Trait Implementations§
Source§impl Debug for ItemImportance
impl Debug for ItemImportance
Source§impl<'de> Deserialize<'de> for ItemImportance
impl<'de> Deserialize<'de> for ItemImportance
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ItemImportance
impl RefUnwindSafe for ItemImportance
impl Send for ItemImportance
impl Sync for ItemImportance
impl Unpin for ItemImportance
impl UnwindSafe for ItemImportance
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
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>
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>
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