pub struct JSONConfig {
pub pretty: bool,
pub include_schema: bool,
pub allow_partial: bool,
}Expand description
JSON adapter configuration.
Fields§
§pretty: boolPretty print JSON in prompts
include_schema: boolInclude schema in prompt
allow_partial: boolAllow partial/streaming JSON
Implementations§
Source§impl JSONConfig
impl JSONConfig
Sourcepub const fn with_pretty(self, pretty: bool) -> Self
pub const fn with_pretty(self, pretty: bool) -> Self
Set pretty printing.
Sourcepub const fn with_schema(self, include: bool) -> Self
pub const fn with_schema(self, include: bool) -> Self
Set schema inclusion.
Sourcepub const fn with_partial(self, allow: bool) -> Self
pub const fn with_partial(self, allow: bool) -> Self
Set partial JSON allowance.
Trait Implementations§
Source§impl Clone for JSONConfig
impl Clone for JSONConfig
Source§fn clone(&self) -> JSONConfig
fn clone(&self) -> JSONConfig
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 Default for JSONConfig
impl Default for JSONConfig
impl Copy for JSONConfig
Auto Trait Implementations§
impl Freeze for JSONConfig
impl RefUnwindSafe for JSONConfig
impl Send for JSONConfig
impl Sync for JSONConfig
impl Unpin for JSONConfig
impl UnsafeUnpin for JSONConfig
impl UnwindSafe for JSONConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more