Package akka.javasdk.ledger
Record Class ModelConfig
- Record Components:
providerName- the model provider (for exampleopenai,anthropic)modelName- the model name as configuredbaseUrl- the base URL the model was called through, or empty if not settemperature- the sampling temperaturetopP- the nucleus-sampling probability masstopK- the top-k sampling cutoffmaxTokens- the maximum number of tokens the model was allowed to produce
public record ModelConfig(String providerName, String modelName, String baseUrl, double temperature, double topP, int topK, int maxTokens)
extends Record
The model configuration used for an interaction.
The structured fields cover the settings the SDK recognises; any additional provider-specific
entries are available through InteractionMetadata.modelConfigMap().
-
Constructor Summary
ConstructorsConstructorDescriptionModelConfig(String providerName, String modelName, String baseUrl, double temperature, double topP, int topK, int maxTokens) Creates an instance of aModelConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbaseUrl()Returns the value of thebaseUrlrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxTokensrecord component.Returns the value of themodelNamerecord component.Returns the value of theproviderNamerecord component.doubleReturns the value of thetemperaturerecord component.inttopK()Returns the value of thetopKrecord component.doubletopP()Returns the value of thetopPrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelConfig
public ModelConfig(String providerName, String modelName, String baseUrl, double temperature, double topP, int topK, int maxTokens) Creates an instance of aModelConfigrecord class.- Parameters:
providerName- the value for theproviderNamerecord componentmodelName- the value for themodelNamerecord componentbaseUrl- the value for thebaseUrlrecord componenttemperature- the value for thetemperaturerecord componenttopP- the value for thetopPrecord componenttopK- the value for thetopKrecord componentmaxTokens- the value for themaxTokensrecord component
-
-
Method Details
-
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 '=='. -
providerName
Returns the value of theproviderNamerecord component.- Returns:
- the value of the
providerNamerecord component
-
modelName
Returns the value of themodelNamerecord component.- Returns:
- the value of the
modelNamerecord component
-
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord 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
-
topK
public int topK()Returns the value of thetopKrecord component.- Returns:
- the value of the
topKrecord component
-
maxTokens
public int maxTokens()Returns the value of themaxTokensrecord component.- Returns:
- the value of the
maxTokensrecord component
-