Skip to main content

Crate synaptic_bedrock

Crate synaptic_bedrock 

Source
Expand description

AWS Bedrock integration for Synaptic.

This crate provides BedrockChatModel, an implementation of the ChatModel trait backed by AWS Bedrock via the Converse API.

§Example

use synaptic_bedrock::{BedrockChatModel, BedrockConfig};

let config = BedrockConfig::new("anthropic.claude-3-5-sonnet-20241022-v2:0")
    .with_max_tokens(1024)
    .with_temperature(0.7);
let model = BedrockChatModel::new(config).await;

Structs§

BedrockChatModel
A ChatModel implementation backed by AWS Bedrock’s Converse API.
BedrockConfig
Configuration for the AWS Bedrock chat model.
ChatRequest
A request to a chat model containing messages, optional tool definitions, and tool choice configuration.
ChatResponse
A response from a chat model containing the AI message and optional token usage statistics.

Enums§

Message
Represents a chat message. Tagged enum with System, Human, AI, and Tool variants.

Traits§

ChatModel
The core trait for language model providers. Implementations provide chat() for single responses and optionally stream_chat() for streaming.