pub enum Question {
Choice {
instructions: Value,
criteria: Options,
},
Score {
instructions: Value,
criteria: Vec<Value>,
},
Noul {
instructions: Value,
criteria: Option<NoulCriteria>,
},
}Expand description
A question. The id it is sent under is never shown to the model, so instructions should say
everything. It reads from JSON too, in the endpoint’s own shape.
Variants§
Choice
Which one of these options? criteria maps each option to its description.
Score
Which level, from the lowest to the highest? Two to ten levels.
Noul
Is this true? The answer is the probability of yes.
Implementations§
Source§impl Question
impl Question
Sourcepub fn choice<K: Into<String>, V: Into<Value>>(
instructions: impl Into<Value>,
options: impl IntoIterator<Item = (K, V)>,
) -> Question
pub fn choice<K: Into<String>, V: Into<Value>>( instructions: impl Into<Value>, options: impl IntoIterator<Item = (K, V)>, ) -> Question
A Choice between options: (name, description) pairs, kept in the order given.
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 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