pub struct BedrockChatModel { /* private fields */ }Expand description
A ChatModel implementation backed by AWS Bedrock’s Converse API.
Supports both synchronous and streaming responses, tool calling, and all Bedrock-supported foundation models.
Implementations§
Source§impl BedrockChatModel
impl BedrockChatModel
Sourcepub async fn new(config: BedrockConfig) -> Self
pub async fn new(config: BedrockConfig) -> Self
Create a new BedrockChatModel by loading AWS configuration from the
environment. Respects AWS_REGION, AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY, and other standard AWS SDK environment variables.
Sourcepub fn from_client(config: BedrockConfig, client: Client) -> Self
pub fn from_client(config: BedrockConfig, client: Client) -> Self
Create a new BedrockChatModel with a pre-existing AWS SDK client.
Trait Implementations§
Source§impl ChatModel for BedrockChatModel
impl ChatModel for BedrockChatModel
fn chat<'life0, 'async_trait>(
&'life0 self,
request: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stream_chat(&self, request: ChatRequest) -> ChatStream<'_>
Source§fn profile(&self) -> Option<ModelProfile>
fn profile(&self) -> Option<ModelProfile>
Return the model’s capability profile, if known.
Auto Trait Implementations§
impl Freeze for BedrockChatModel
impl !RefUnwindSafe for BedrockChatModel
impl Send for BedrockChatModel
impl Sync for BedrockChatModel
impl Unpin for BedrockChatModel
impl UnsafeUnpin for BedrockChatModel
impl !UnwindSafe for BedrockChatModel
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.