pub struct BedrockClient<'a> { /* private fields */ }Implementations§
Source§impl BedrockClient<'_>
impl BedrockClient<'_>
Sourcepub async fn get_invocations(&self) -> Result<BedrockInvocationsResponse, Error>
pub async fn get_invocations(&self) -> Result<BedrockInvocationsResponse, Error>
List recorded Bedrock runtime invocations. Each invocation has an optional
error field that is set for calls faulted via Self::queue_fault.
Sourcepub async fn set_model_response(
&self,
model_id: &str,
response: &str,
) -> Result<BedrockModelResponseConfig, Error>
pub async fn set_model_response( &self, model_id: &str, response: &str, ) -> Result<BedrockModelResponseConfig, Error>
Configure a single canned response for a Bedrock model.
Sourcepub async fn set_response_rules(
&self,
model_id: &str,
rules: &[BedrockResponseRule],
) -> Result<BedrockModelResponseConfig, Error>
pub async fn set_response_rules( &self, model_id: &str, rules: &[BedrockResponseRule], ) -> Result<BedrockModelResponseConfig, Error>
Replace the prompt-conditional response rule list for a Bedrock model.
Sourcepub async fn clear_response_rules(
&self,
model_id: &str,
) -> Result<BedrockModelResponseConfig, Error>
pub async fn clear_response_rules( &self, model_id: &str, ) -> Result<BedrockModelResponseConfig, Error>
Clear all prompt-conditional response rules for a Bedrock model.
Sourcepub async fn queue_fault(
&self,
rule: &BedrockFaultRule,
) -> Result<BedrockStatusResponse, Error>
pub async fn queue_fault( &self, rule: &BedrockFaultRule, ) -> Result<BedrockStatusResponse, Error>
Queue a fault rule that will cause the next matching Bedrock runtime call(s) to fail.
Sourcepub async fn get_faults(&self) -> Result<BedrockFaultsResponse, Error>
pub async fn get_faults(&self) -> Result<BedrockFaultsResponse, Error>
List currently queued fault rules.
Sourcepub async fn clear_faults(&self) -> Result<BedrockStatusResponse, Error>
pub async fn clear_faults(&self) -> Result<BedrockStatusResponse, Error>
Clear all queued fault rules.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BedrockClient<'a>
impl<'a> !UnwindSafe for BedrockClient<'a>
impl<'a> Freeze for BedrockClient<'a>
impl<'a> Send for BedrockClient<'a>
impl<'a> Sync for BedrockClient<'a>
impl<'a> Unpin for BedrockClient<'a>
impl<'a> UnsafeUnpin for BedrockClient<'a>
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