View module source on GitHub

BedrockUtils

class BedrockUtils()

parse_message_param

@staticmethod
def parse_message_param(
        messages: Iterable[BedrockMessageParam]
) -> List[GenerationRequestMessage]

Parses Bedrock Converse API message format into GenerationRequestMessage format.

get_model_parameters

@staticmethod
def get_model_parameters(**kwargs: Any) -> Dict[str, Any]

Extracts model parameters for logging.

parse_message

@staticmethod
def parse_message(response: BedrockMessage) -> Dict[str, Any]

Parse the Message response from Bedrock Converse API into a standardized format.

get_model_name

@staticmethod
def get_model_name(model_id: str) -> str

Extracts the model name from the model ID or ARN.