pub struct AiClient { /* private fields */ }Expand description
Shared AI client in app state (req.state::<AiClient>() / req.ai()).
Implementations§
Source§impl AiClient
impl AiClient
pub fn model(&self) -> SharedModel
pub fn fake(&self) -> Option<&FakeAi>
pub fn default_system(&self) -> Option<&str>
Sourcepub fn builder(&self) -> LanguageModelRequestBuilder<SharedModel, SystemStage>
pub fn builder(&self) -> LanguageModelRequestBuilder<SharedModel, SystemStage>
Escape hatch: full AISDK request builder pre-seeded with the installed model.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AiClient
impl !UnwindSafe for AiClient
impl Freeze for AiClient
impl Send for AiClient
impl Sync for AiClient
impl Unpin for AiClient
impl UnsafeUnpin for AiClient
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