Package akka.javasdk.agent
Record Class ModelProvider.Bedrock
- All Implemented Interfaces:
ModelProvider
- Enclosing interface:
ModelProvider
public static record ModelProvider.Bedrock(String region, String modelId, boolean returnThinking, boolean sendThinking, int maxOutputTokens, int reasoningTokenBudget, Map<String,Object> additionalModelRequestFields, String accessToken, double temperature, double topP, int maxTokens, Duration responseTimeout, int maxRetries)
extends Record
implements ModelProvider
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.ModelProvider
ModelProvider.Anthropic, ModelProvider.Bedrock, ModelProvider.Custom, ModelProvider.FromConfig, ModelProvider.GoogleAIGemini, ModelProvider.HuggingFace, ModelProvider.LocalAI, ModelProvider.Ollama, ModelProvider.OpenAi -
Constructor Summary
ConstructorsConstructorDescriptionBedrock(String region, String modelId, boolean returnThinking, boolean sendThinking, int maxOutputTokens, int reasoningTokenBudget, Map<String, Object> additionalModelRequestFields, String accessToken, double temperature, double topP, int maxTokens, Duration responseTimeout, int maxRetries) Creates an instance of aBedrockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.Returns the value of theadditionalModelRequestFieldsrecord component.final booleanIndicates whether some other object is "equal to" this one.static ModelProvider.BedrockfromConfig(com.typesafe.config.Config config) final inthashCode()Returns a hash code value for this object.intReturns the value of themaxOutputTokensrecord component.intReturns the value of themaxRetriesrecord component.intReturns the value of themaxTokensrecord component.modelId()Returns the value of themodelIdrecord component.intReturns the value of thereasoningTokenBudgetrecord component.region()Returns the value of theregionrecord component.Returns the value of theresponseTimeoutrecord component.booleanReturns the value of thereturnThinkingrecord component.booleanReturns the value of thesendThinkingrecord component.doubleReturns the value of thetemperaturerecord component.doubletopP()Returns the value of thetopPrecord component.final StringtoString()Returns a string representation of this record class.withAccessToken(String accessToken) withAdditionalModelRequestFields(Map<String, Object> additionalModelRequestFields) withMaxOutputTokens(int maxOutputTokens) withMaxRetries(int maxRetries) withMaxTokens(int maxTokens) withModelId(String modelId) withReasoningTokenBudget(int reasoningTokenBudget) withRegion(String region) withResponseTimeout(Duration responseTimeout) withReturnThinking(Boolean returnThinking) withSendThinking(Boolean sendThinking) withTemperature(double temperature) withTopP(double topP)
-
Constructor Details
-
Bedrock
public Bedrock(String region, String modelId, boolean returnThinking, boolean sendThinking, int maxOutputTokens, int reasoningTokenBudget, Map<String, Object> additionalModelRequestFields, String accessToken, double temperature, double topP, int maxTokens, Duration responseTimeout, int maxRetries) Creates an instance of aBedrockrecord class.- Parameters:
region- the value for theregionrecord componentmodelId- the value for themodelIdrecord componentreturnThinking- the value for thereturnThinkingrecord componentsendThinking- the value for thesendThinkingrecord componentmaxOutputTokens- the value for themaxOutputTokensrecord componentreasoningTokenBudget- the value for thereasoningTokenBudgetrecord componentadditionalModelRequestFields- the value for theadditionalModelRequestFieldsrecord componentaccessToken- the value for theaccessTokenrecord componenttemperature- the value for thetemperaturerecord componenttopP- the value for thetopPrecord componentmaxTokens- the value for themaxTokensrecord componentresponseTimeout- the value for theresponseTimeoutrecord componentmaxRetries- the value for themaxRetriesrecord component
-
-
Method Details
-
fromConfig
-
withRegion
-
withModelId
-
withReturnThinking
-
withSendThinking
-
withMaxOutputTokens
-
withReasoningTokenBudget
-
withAdditionalModelRequestFields
public ModelProvider.Bedrock withAdditionalModelRequestFields(Map<String, Object> additionalModelRequestFields) -
withAccessToken
-
withTemperature
-
withTopP
-
withMaxTokens
-
withResponseTimeout
-
withMaxRetries
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
modelId
Returns the value of themodelIdrecord component.- Returns:
- the value of the
modelIdrecord component
-
returnThinking
public boolean returnThinking()Returns the value of thereturnThinkingrecord component.- Returns:
- the value of the
returnThinkingrecord component
-
sendThinking
public boolean sendThinking()Returns the value of thesendThinkingrecord component.- Returns:
- the value of the
sendThinkingrecord component
-
maxOutputTokens
public int maxOutputTokens()Returns the value of themaxOutputTokensrecord component.- Returns:
- the value of the
maxOutputTokensrecord component
-
reasoningTokenBudget
public int reasoningTokenBudget()Returns the value of thereasoningTokenBudgetrecord component.- Returns:
- the value of the
reasoningTokenBudgetrecord component
-
additionalModelRequestFields
Returns the value of theadditionalModelRequestFieldsrecord component.- Returns:
- the value of the
additionalModelRequestFieldsrecord component
-
accessToken
Returns the value of theaccessTokenrecord component.- Returns:
- the value of the
accessTokenrecord component
-
temperature
public double temperature()Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-
topP
public double topP()Returns the value of thetopPrecord component.- Returns:
- the value of the
topPrecord component
-
maxTokens
public int maxTokens()Returns the value of themaxTokensrecord component.- Returns:
- the value of the
maxTokensrecord component
-
responseTimeout
Returns the value of theresponseTimeoutrecord component.- Returns:
- the value of the
responseTimeoutrecord component
-
maxRetries
public int maxRetries()Returns the value of themaxRetriesrecord component.- Returns:
- the value of the
maxRetriesrecord component
-