Package akka.javasdk.agent
Record Class ModelProvider.Anthropic
- All Implemented Interfaces:
ModelProvider
- Enclosing interface:
ModelProvider
public static record ModelProvider.Anthropic(String apiKey, String modelName, String baseUrl, double temperature, double topP, int topK, int maxTokens)
extends Record
implements ModelProvider
Settings for the Anthropic Large Language Model provider.
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.javasdk.agent.ModelProvider
ModelProvider.Anthropic, ModelProvider.Custom, ModelProvider.FromConfig, ModelProvider.GoogleAIGemini, ModelProvider.HuggingFace, ModelProvider.LocalAI, ModelProvider.Ollama, ModelProvider.OpenAi
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiKey()
Returns the value of theapiKey
record component.baseUrl()
Returns the value of thebaseUrl
record component.final boolean
Indicates whether some other object is "equal to" this one.static ModelProvider.Anthropic
fromConfig
(com.typesafe.config.Config config) final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxTokens
record component.Returns the value of themodelName
record component.double
Returns the value of thetemperature
record component.int
topK()
Returns the value of thetopK
record component.double
topP()
Returns the value of thetopP
record component.final String
toString()
Returns a string representation of this record class.withApiKey
(String apiKey) withBaseUrl
(String baseUrl) withMaxTokens
(int maxTokens) withModelName
(String modelName) withTemperature
(double temperature) withTopK
(int topK) withTopP
(double topP)
-
Constructor Details
-
Anthropic
public Anthropic(String apiKey, String modelName, String baseUrl, double temperature, double topP, int topK, int maxTokens) Creates an instance of aAnthropic
record class.- Parameters:
apiKey
- the value for theapiKey
record componentmodelName
- the value for themodelName
record componentbaseUrl
- the value for thebaseUrl
record componenttemperature
- the value for thetemperature
record componenttopP
- the value for thetopP
record componenttopK
- the value for thetopK
record componentmaxTokens
- the value for themaxTokens
record component
-
-
Method Details
-
fromConfig
-
withApiKey
-
withModelName
-
withBaseUrl
-
withTemperature
-
withTopP
-
withTopK
-
withMaxTokens
-
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 '=='. -
apiKey
Returns the value of theapiKey
record component.- Returns:
- the value of the
apiKey
record component
-
modelName
Returns the value of themodelName
record component.- Returns:
- the value of the
modelName
record component
-
baseUrl
Returns the value of thebaseUrl
record component.- Returns:
- the value of the
baseUrl
record component
-
temperature
public double temperature()Returns the value of thetemperature
record component.- Returns:
- the value of the
temperature
record component
-
topP
public double topP()Returns the value of thetopP
record component.- Returns:
- the value of the
topP
record component
-
topK
public int topK()Returns the value of thetopK
record component.- Returns:
- the value of the
topK
record component
-
maxTokens
public int maxTokens()Returns the value of themaxTokens
record component.- Returns:
- the value of the
maxTokens
record component
-