pub struct ClassifierContractConfig { /* private fields */ }Expand description
User-configurable parts of a classifier’s prompt and verdict contract.
Fields are private so new contract settings can be added without breaking Rust struct literals.
Implementations§
Source§impl ClassifierContractConfig
impl ClassifierContractConfig
Sourcepub fn with_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_prompt(self, prompt: impl Into<String>) -> Self
Overrides the packaged classifier prompt.
Sourcepub fn with_response_format_type(
self,
response_format_type: ClassifierResponseFormat,
) -> Self
pub fn with_response_format_type( self, response_format_type: ClassifierResponseFormat, ) -> Self
Selects the provider-side structured-output mode.
Sourcepub fn response_format_type(&self) -> ClassifierResponseFormat
pub fn response_format_type(&self) -> ClassifierResponseFormat
Returns the configured provider-side structured-output mode.
Trait Implementations§
Source§impl Clone for ClassifierContractConfig
impl Clone for ClassifierContractConfig
Source§fn clone(&self) -> ClassifierContractConfig
fn clone(&self) -> ClassifierContractConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ClassifierContractConfig
impl Debug for ClassifierContractConfig
Source§impl Default for ClassifierContractConfig
impl Default for ClassifierContractConfig
Source§fn default() -> ClassifierContractConfig
fn default() -> ClassifierContractConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ClassifierContractConfig
impl<'de> Deserialize<'de> for ClassifierContractConfig
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 ClassifierContractConfig
impl RefUnwindSafe for ClassifierContractConfig
impl Send for ClassifierContractConfig
impl Sync for ClassifierContractConfig
impl Unpin for ClassifierContractConfig
impl UnsafeUnpin for ClassifierContractConfig
impl UnwindSafe for ClassifierContractConfig
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