BedrockAnthropicInvokeModel

data class BedrockAnthropicInvokeModel(val anthropicVersion: String = "bedrock-2023-05-31", val maxTokens: Int = MAX_TOKENS_DEFAULT, val system: String = "", val temperature: Double? = 1.0, val messages: List<BedrockAnthropicInvokeModelMessage> = emptyList(), val tools: List<BedrockAnthropicInvokeModelTool>? = null, val toolChoice: BedrockAnthropicToolChoice? = null)(source)

Represents the model to invoke an Anthropic service using Bedrock. refer to https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages-request-response.html

Constructors

Link copied to clipboard
constructor(anthropicVersion: String = "bedrock-2023-05-31", maxTokens: Int = MAX_TOKENS_DEFAULT, system: String = "", temperature: Double? = 1.0, messages: List<BedrockAnthropicInvokeModelMessage> = emptyList(), tools: List<BedrockAnthropicInvokeModelTool>? = null, toolChoice: BedrockAnthropicToolChoice? = null)

Types

Link copied to clipboard
object Companion

Provides shared logic and utility functions for managing and interacting with the Bedrock Anthropic service model. This companion object includes methods and constants that are central to constructing and handling request payloads, ensuring adherence to Bedrock-specific requirements for the Anthropic Claude model family.

Properties

Link copied to clipboard
@SerialName(value = "anthropic_version")
val anthropicVersion: String

The version of the Anthropic API or service being invoked.

Link copied to clipboard
@SerialName(value = "max_tokens")
val maxTokens: Int

The maximum number of tokens to generate in the response. default to 4k tokens because of Claude Haiku 3, refer to https://docs.anthropic.com/en/docs/about-claude/models/overview#model-comparison

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val temperature: Double? = 1.0
Link copied to clipboard
@SerialName(value = "tool_choice")
val toolChoice: BedrockAnthropicToolChoice? = null
Link copied to clipboard