Struct SlotSpec
pub struct SlotSpec {
pub name: String,
pub state_key: String,
pub prompt: Option<String>,
pub reprompt: Option<String>,
pub confirm: ConfirmPolicy,
pub pii: bool,
pub recognizer: Option<SlotRecognizer>,
pub validate: Option<SlotValidator>,
}Expand description
Metadata for a single slot within a FrameSpec.
Fields§
§name: StringThe slot (field) name.
state_key: StringThe State key the slot is stored under (defaults to name).
prompt: Option<String>Prompt asked to elicit the slot.
reprompt: Option<String>Reprompt used after a failed/empty first attempt.
confirm: ConfirmPolicyWhen to confirm the slot’s value.
pii: boolWhether the slot holds PII (redact in logs/transcripts).
recognizer: Option<SlotRecognizer>The deterministic recognizer that fills this slot, if any.
validate: Option<SlotValidator>A validator applied to recognized values; invalid values are rejected.
Implementations§
Trait Implementations§
§impl<'de> Deserialize<'de> for SlotSpec
impl<'de> Deserialize<'de> for SlotSpec
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SlotSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SlotSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Serialize for SlotSpec
impl Serialize for SlotSpec
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for SlotSpec
impl RefUnwindSafe for SlotSpec
impl Send for SlotSpec
impl Sync for SlotSpec
impl Unpin for SlotSpec
impl UnwindSafe for SlotSpec
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