pub struct SystemOneResponse {
pub model: String,
pub answers: HashMap<String, Answer>,
pub usage: Usage,
}Expand description
Response from POST /v1/systemone.
Fields§
§model: StringThe versioned model id that answered, e.g. jev-1.13.0.
answers: HashMap<String, Answer>One answer per question, under the same keys.
usage: UsageToken accounting for this request.
Implementations§
Source§impl SystemOneResponse
impl SystemOneResponse
Sourcepub fn noul(&self, id: &str) -> Result<f64>
pub fn noul(&self, id: &str) -> Result<f64>
The yes-probability of the Noul question id.
§Errors
Error::MissingAnswer if there is no answer under id or it is not a Noul.
Sourcepub fn choice(&self, id: &str) -> Result<&ChoiceAnswer>
pub fn choice(&self, id: &str) -> Result<&ChoiceAnswer>
The answer to the Choice question id.
§Errors
Error::MissingAnswer if there is no answer under id or it is not a Choice.
Sourcepub fn score(&self, id: &str) -> Result<&ScoreAnswer>
pub fn score(&self, id: &str) -> Result<&ScoreAnswer>
The answer to the Score question id.
§Errors
Error::MissingAnswer if there is no answer under id or it is not a Score.
Trait Implementations§
Source§impl Clone for SystemOneResponse
impl Clone for SystemOneResponse
Source§impl Debug for SystemOneResponse
impl Debug for SystemOneResponse
Source§impl<'de> Deserialize<'de> for SystemOneResponse
impl<'de> Deserialize<'de> for SystemOneResponse
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 SystemOneResponse
impl PartialEq for SystemOneResponse
impl StructuralPartialEq for SystemOneResponse
Auto Trait Implementations§
impl Freeze for SystemOneResponse
impl RefUnwindSafe for SystemOneResponse
impl Send for SystemOneResponse
impl Sync for SystemOneResponse
impl Unpin for SystemOneResponse
impl UnsafeUnpin for SystemOneResponse
impl UnwindSafe for SystemOneResponse
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