BedrockLLMClient

constructor(bedrockClient: BedrockRuntimeClient, apiMethod: BedrockAPIMethod = BedrockAPIMethod.InvokeModel, moderationGuardrailsSettings: BedrockGuardrailsSettings? = null, fallbackModelFamily: BedrockModelFamilies? = null, clock: Clock = kotlin.time.Clock.System)(source)

Parameters

bedrockClient

The runtime client for interacting with Bedrock, highly configurable

apiMethod

The API method to use for interacting with Bedrock models that support messages, defaults to BedrockAPIMethod.InvokeModel.

moderationGuardrailsSettings

Optional settings of the AWS bedrock Guardrails (see AWS documentation ) that would be used for the LLMClient.moderate request

fallbackModelFamily

Optional fallback model family to use for unsupported models. If not provided, unsupported models will throw an exception.

clock

A clock used for time-based operations


constructor(identityProvider: IdentityProvider, settings: BedrockClientSettings = BedrockClientSettings(), clock: Clock = kotlin.time.Clock.System)(source)

Creates a new Bedrock LLM client configured with the specified identity provider and settings.

Return

A configured LLMClient instance for Bedrock

Parameters

identityProvider

Supplies authentication to AWS Bedrock, supporting both CredentialsProvider for AWS credentials and BearerTokenProvider for API key-based access.

settings

Configuration settings for the Bedrock client, such as region and endpoint

clock

A clock used for time-based operations