#[non_exhaustive]pub enum Action {
RunExperiment {
name: String,
research_line: String,
hypothesis: String,
params: BTreeMap<String, Value>,
parent: Option<String>,
},
Conclude {
reason: String,
},
}Expand description
An action the agent decided to take.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
RunExperiment
Run an experiment with specific parameters.
Fields
Conclude
Stop: the objective is met, or nothing left is worth trying.
Implementations§
Source§impl Action
impl Action
Sourcepub fn response_schema() -> Value
pub fn response_schema() -> Value
The JSON Schema a model is asked to answer in.
Constraining the reply is what turns “the model suggested something” into “the agent decided something” — a free-text plan has to be parsed, and a parser for prose is a source of silent misreadings.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Whether this ends the loop.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Action
impl<'de> Deserialize<'de> for Action
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
Auto Trait Implementations§
impl Freeze for Action
impl RefUnwindSafe for Action
impl Send for Action
impl Sync for Action
impl Unpin for Action
impl UnsafeUnpin for Action
impl UnwindSafe for Action
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