Package akka.javasdk.agent
Record Class ModelProvider.Ollama
- All Implemented Interfaces:
ModelProvider
- Enclosing interface:
ModelProvider
public static record ModelProvider.Ollama(String baseUrl, String modelName, Double temperature, Double topP)
extends Record
implements ModelProvider
Settings for the Ollama 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 TypeMethodDescriptionbaseUrl()
Returns the value of thebaseUrl
record component.final boolean
Indicates whether some other object is "equal to" this one.static ModelProvider.Ollama
fromConfig
(com.typesafe.config.Config config) final int
hashCode()
Returns a hash code value for this object.Returns the value of themodelName
record component.Returns the value of thetemperature
record component.topP()
Returns the value of thetopP
record component.final String
toString()
Returns a string representation of this record class.withBaseUrl
(String baseUrl) withModelName
(String modelName) withTemperature
(double temperature) withTopP
(double topP)
-
Constructor Details
-
Ollama
Creates an instance of aOllama
record class.- Parameters:
baseUrl
- the value for thebaseUrl
record componentmodelName
- the value for themodelName
record componenttemperature
- the value for thetemperature
record componenttopP
- the value for thetopP
record component
-
-
Method Details
-
fromConfig
-
withBaseUrl
-
withModelName
-
withTemperature
-
withTopP
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
baseUrl
Returns the value of thebaseUrl
record component.- Returns:
- the value of the
baseUrl
record component
-
modelName
Returns the value of themodelName
record component.- Returns:
- the value of the
modelName
record component
-
temperature
Returns the value of thetemperature
record component.- Returns:
- the value of the
temperature
record component
-
topP
Returns the value of thetopP
record component.- Returns:
- the value of the
topP
record component
-