pub struct BehaviorModel { /* private fields */ }Expand description
Behavior model that uses LLMs to generate intelligent responses
Implementations§
Source§impl BehaviorModel
impl BehaviorModel
Sourcepub fn new(config: BehaviorModelConfig) -> Self
pub fn new(config: BehaviorModelConfig) -> Self
Create a new behavior model
Sourcepub async fn generate_response(
&self,
method: &str,
path: &str,
request_body: Option<Value>,
context: &StatefulAiContext,
) -> Result<Value>
pub async fn generate_response( &self, method: &str, path: &str, request_body: Option<Value>, context: &StatefulAiContext, ) -> Result<Value>
Sourcepub fn rules(&self) -> &BehaviorRules
pub fn rules(&self) -> &BehaviorRules
Get behavior rules
Sourcepub fn config(&self) -> &BehaviorModelConfig
pub fn config(&self) -> &BehaviorModelConfig
Get configuration
Auto Trait Implementations§
impl Freeze for BehaviorModel
impl !RefUnwindSafe for BehaviorModel
impl Send for BehaviorModel
impl Sync for BehaviorModel
impl Unpin for BehaviorModel
impl UnsafeUnpin for BehaviorModel
impl !UnwindSafe for BehaviorModel
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