pub struct ContentFilteringPlugin { /* private fields */ }Implementations§
Source§impl ContentFilteringPlugin
impl ContentFilteringPlugin
pub fn new(config: &PluginConfig) -> Result<Self, GatewayError>
Source§impl ContentFilteringPlugin
impl ContentFilteringPlugin
pub fn name(&self) -> &str
pub fn enabled(&self) -> bool
pub async fn before_request( &self, request: &mut Request<Body>, ) -> Result<(), GatewayError>
pub async fn after_response( &self, _response: &mut Response<Body>, ) -> Result<(), GatewayError>
pub async fn on_error(&self, _error: &GatewayError) -> Result<(), GatewayError>
pub fn filter_chat_request( &self, request: &ChatRequest, ) -> Result<(), GatewayError>
pub fn filter_embedding_request( &self, request: &EmbeddingRequest, ) -> Result<(), GatewayError>
pub fn filter_image_request( &self, request: &ImageRequest, ) -> Result<(), GatewayError>
Trait Implementations§
Source§impl Clone for ContentFilteringPlugin
impl Clone for ContentFilteringPlugin
Source§fn clone(&self) -> ContentFilteringPlugin
fn clone(&self) -> ContentFilteringPlugin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ContentFilteringPlugin
impl RefUnwindSafe for ContentFilteringPlugin
impl Send for ContentFilteringPlugin
impl Sync for ContentFilteringPlugin
impl Unpin for ContentFilteringPlugin
impl UnsafeUnpin for ContentFilteringPlugin
impl UnwindSafe for ContentFilteringPlugin
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