#[non_exhaustive]pub struct Needs {
pub tools: bool,
pub structured_output: bool,
pub prompt_caching: bool,
pub thinking: bool,
pub images: bool,
}Expand description
What a request needs, as a set of yes or no answers.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.tools: boolThe request offers tools.
structured_output: boolThe request asks for output matching a schema.
prompt_caching: boolThe request places cache breakpoints.
thinking: boolThe request asks the model to reason.
images: boolThe request carries an image.
Implementations§
Source§impl Needs
impl Needs
Sourcepub fn unmet_by(self, have: &ModelCapabilities) -> Vec<&'static str>
pub fn unmet_by(self, have: &ModelCapabilities) -> Vec<&'static str>
What this request needs and the model cannot do, by name.
An empty list means the request will be sent as written. A non empty one lists what the provider will silently drop, which is worth knowing before you are billed for a reply that ignored half your request.
Trait Implementations§
impl Copy for Needs
impl Eq for Needs
impl StructuralPartialEq for Needs
Auto Trait Implementations§
impl Freeze for Needs
impl RefUnwindSafe for Needs
impl Send for Needs
impl Sync for Needs
impl Unpin for Needs
impl UnsafeUnpin for Needs
impl UnwindSafe for Needs
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