#[non_exhaustive]pub enum Capability {
Tools,
Images,
}Expand description
Something a TextModel adapter may or may not be able to do beyond a
plain completion. A port whose shape grows over time needs a way for the
router to ask “can the model behind this tier actually do this” before a
caller wastes a request on one that cannot.
#[non_exhaustive]: today the capabilities are Self::Tools and
Self::Images, and the next one — a provider-native structured
output — should not be a breaking change for every match a caller
writes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Tools
The adapter carries tools: a prompt’s Prompt::tools reach the
provider, and the answer may carry Completion::tool_calls. An
adapter that does not implement this is never asked to.
Images
The adapter carries images: a prompt’s Part::Images reach the
provider. An adapter without vision is refused with
TextModelError::Unsupported, never sent an image to drop.
Implementations§
Trait Implementations§
Source§impl Clone for Capability
impl Clone for Capability
impl Copy for Capability
Source§impl Debug for Capability
impl Debug for Capability
Source§impl Display for Capability
impl Display for Capability
impl Eq for Capability
Source§impl Hash for Capability
impl Hash for Capability
Source§impl PartialEq for Capability
impl PartialEq for Capability
impl StructuralPartialEq for Capability
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.