pub struct Capability {
pub name: String,
pub value: Value,
}Expand description
Schema declaration of a capability supported by a backend plugin.
Returned from on_session_type_configured / on_session_created /
on_session_updated to tell Chat Engine what is tunable. Chat Engine
stores these in session.enabled_capabilities and exposes the menu to
clients. See also CapabilityValue for the chosen-value counterpart.
Fields§
§name: StringCapability identifier (e.g., "model", "temperature", "stream").
value: ValueSchema descriptor for allowed values — plugin-defined JSON. Typical
shape: { type: "enum", enum_values: [...], default_value: ... } or
{ type: "float", min: 0.0, max: 2.0, default_value: 0.7 }.
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
Source§fn clone(&self) -> Capability
fn clone(&self) -> Capability
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Capability
impl Debug for Capability
Source§impl<'de> Deserialize<'de> for Capability
impl<'de> Deserialize<'de> for Capability
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 Capability
impl RefUnwindSafe for Capability
impl Send for Capability
impl Sync for Capability
impl Unpin for Capability
impl UnsafeUnpin for Capability
impl UnwindSafe for Capability
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