pub struct AgentStep {
pub state: Value,
pub questions: Map<String, Value>,
/* private fields */
}Expand description
The questions for one step and what is needed to read the answers.
Fields§
§state: Valuepage, elements and recent_actions.
questions: Map<String, Value>operation and one <op>_target head per operation with candidates.
Implementations§
Source§impl AgentStep
impl AgentStep
Sourcepub fn body_json(&self, model: &str) -> String
pub fn body_json(&self, model: &str) -> String
The request body as JSON text, written without copying the state first.
Sourcepub fn decide(&self, answers: &Value) -> Result<Decision, Invalid>
pub fn decide(&self, answers: &Value) -> Result<Decision, Invalid>
Reads the answers of a response into the action to run. Only the target head of the
chosen operation is checked, since the others cannot cause an action.
§Errors
When an answer that is needed is missing or would fail jev-ultrafast’s checks.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentStep
impl RefUnwindSafe for AgentStep
impl Send for AgentStep
impl Sync for AgentStep
impl Unpin for AgentStep
impl UnsafeUnpin for AgentStep
impl UnwindSafe for AgentStep
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