pub enum Question {
Noul {
instructions: Value,
criteria: Option<NoulCriteria>,
},
Choice {
instructions: Value,
criteria: BTreeMap<String, Value>,
},
Score {
instructions: Value,
criteria: Vec<Value>,
},
}Expand description
A typed judgment for System One to make against request state.
Instructions and criteria descriptions accept strings, objects, arrays, or JSON null.
Variants§
Noul
A yes/no judgment returned as the probability of yes.
Fields
§
criteria: Option<NoulCriteria>Optional descriptions of the positive and negative answers.
Choice
Selection of one label from a caller-defined set.
Fields
Score
A rating along an ordered caller-defined rubric.
Implementations§
Source§impl Question
impl Question
Sourcepub fn noul(instructions: impl Into<Value>) -> Self
pub fn noul(instructions: impl Into<Value>) -> Self
Creates a Noul question without explicit yes and no criteria.
Sourcepub fn noul_with_criteria(
instructions: impl Into<Value>,
criteria: NoulCriteria,
) -> Self
pub fn noul_with_criteria( instructions: impl Into<Value>, criteria: NoulCriteria, ) -> Self
Creates a Noul question with explicit positive and negative criteria.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Question
impl<'de> Deserialize<'de> for Question
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
impl StructuralPartialEq for Question
Auto Trait Implementations§
impl Forget for Question
impl Freeze for Question
impl RefUnwindSafe for Question
impl Send for Question
impl Sync for Question
impl Unpin for Question
impl UnsafeUnpin for Question
impl UnwindSafe for Question
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