pub enum SimStep {
Show 14 variants
User(String),
Set {
key: String,
value: Value,
},
Remove {
key: String,
},
ToolOk(String),
ToolFailed(String),
Interrupt,
ToolResult {
tool: String,
ok: bool,
},
ScheduleTool {
tool: String,
after: u32,
},
Turn,
ExpectActive(Vec<String>),
ExpectDenied(String),
ExpectAllowed(String),
ExpectSlot {
key: String,
value: Value,
},
ExpectComplete,
}Expand description
One step in a serializable Scenario.
Variants§
User(String)
The fake user speaks (recognizers fill slots), then a turn advances.
Set
Set a state value directly.
Remove
Remove a state value, as the recorded runtime did.
ToolOk(String)
A tool succeeds now.
ToolFailed(String)
A tool fails (or times out) now; counts toward the active stage’s repair policy. Does not advance a turn.
Interrupt
The user barges in on the model; counts toward the active stage’s repair policy. Does not advance a turn.
ToolResult
A tool call completes, successfully or not, where the live runtime
records it: the flow observes it without advancing a turn (unlike
ToolOk). This is what a scenario extracted from a
recording uses.
ScheduleTool
Schedule a tool to succeed after N turns (latency).
Turn
Advance a turn with no input.
ExpectActive(Vec<String>)
Assert these step ids are active.
ExpectDenied(String)
Assert a tool is currently blocked.
ExpectAllowed(String)
Assert a tool is currently admitted.
ExpectSlot
Assert a slot equals a value.
ExpectComplete
Assert the conversation is complete.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SimStep
impl<'de> Deserialize<'de> for SimStep
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>,
Source§impl JsonSchema for SimStep
impl JsonSchema for SimStep
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for SimStep
impl RefUnwindSafe for SimStep
impl Send for SimStep
impl Sync for SimStep
impl Unpin for SimStep
impl UnwindSafe for SimStep
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].