Struct cohere_rust::api::classify::Classification
source · pub struct Classification {
pub id: String,
pub prediction: String,
pub confidence: f32,
pub labels: HashMap<String, LabelProperties>,
pub input: String,
}
Fields§
§id: String
§prediction: String
The top predicted label for the text.
confidence: f32
Confidence score for the top predicted label.
labels: HashMap<String, LabelProperties>
Confidence score for each label.
input: String
The text that is being classified.
Trait Implementations§
source§impl Debug for Classification
impl Debug for Classification
source§impl<'de> Deserialize<'de> for Classification
impl<'de> Deserialize<'de> for Classification
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Classification
impl PartialEq for Classification
source§fn eq(&self, other: &Classification) -> bool
fn eq(&self, other: &Classification) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for Classification
Auto Trait Implementations§
impl RefUnwindSafe for Classification
impl Send for Classification
impl Sync for Classification
impl Unpin for Classification
impl UnwindSafe for Classification
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