Package com.tnsai.roles.metadata
Record Class RoleSpecExtractor.LLMExportSpec
java.lang.Object
java.lang.Record
com.tnsai.roles.metadata.RoleSpecExtractor.LLMExportSpec
- Enclosing class:
RoleSpecExtractor
public static record RoleSpecExtractor.LLMExportSpec(String provider, String model, float temperature, int maxTokens, float topP, float frequencyPenalty, float presencePenalty, String apiKeyEnv, String baseUrl, int timeoutMs, boolean streaming)
extends Record
Immutable LLM configuration extracted from a role's
@RoleSpec.llm()
(@LLMSpec) for the role-export subsystem. baseUrl carries the
@LLMSpec.endpoint() value. (Renamed from LLMSpec in TNS-642 to
resolve the simple-name collision with the @LLMSpec annotation, when the
parallel TYPE-level @LLM annotation was removed.)-
Constructor Summary
ConstructorsConstructorDescriptionLLMExportSpec(String provider, String model, float temperature, int maxTokens, float topP, float frequencyPenalty, float presencePenalty, String apiKeyEnv, String baseUrl, int timeoutMs, boolean streaming) Creates an instance of aLLMExportSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapiKeyEnvrecord component.baseUrl()Returns the value of thebaseUrlrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of thefrequencyPenaltyrecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxTokensrecord component.model()Returns the value of themodelrecord component.floatReturns the value of thepresencePenaltyrecord component.provider()Returns the value of theproviderrecord component.booleanReturns the value of thestreamingrecord component.floatReturns the value of thetemperaturerecord component.intReturns the value of thetimeoutMsrecord component.floattopP()Returns the value of thetopPrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
LLMExportSpec
public LLMExportSpec(String provider, String model, float temperature, int maxTokens, float topP, float frequencyPenalty, float presencePenalty, String apiKeyEnv, String baseUrl, int timeoutMs, boolean streaming) Creates an instance of aLLMExportSpecrecord class.- Parameters:
provider- the value for theproviderrecord componentmodel- the value for themodelrecord componenttemperature- the value for thetemperaturerecord componentmaxTokens- the value for themaxTokensrecord componenttopP- the value for thetopPrecord componentfrequencyPenalty- the value for thefrequencyPenaltyrecord componentpresencePenalty- the value for thepresencePenaltyrecord componentapiKeyEnv- the value for theapiKeyEnvrecord componentbaseUrl- the value for thebaseUrlrecord componenttimeoutMs- the value for thetimeoutMsrecord componentstreaming- the value for thestreamingrecord component
-
-
Method Details
-
resolveApiKeyEnv
-
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 '=='. -
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
temperature
public float temperature()Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-
maxTokens
public int maxTokens()Returns the value of themaxTokensrecord component.- Returns:
- the value of the
maxTokensrecord component
-
topP
public float topP()Returns the value of thetopPrecord component.- Returns:
- the value of the
topPrecord component
-
frequencyPenalty
public float frequencyPenalty()Returns the value of thefrequencyPenaltyrecord component.- Returns:
- the value of the
frequencyPenaltyrecord component
-
presencePenalty
public float presencePenalty()Returns the value of thepresencePenaltyrecord component.- Returns:
- the value of the
presencePenaltyrecord component
-
apiKeyEnv
Returns the value of theapiKeyEnvrecord component.- Returns:
- the value of the
apiKeyEnvrecord component
-
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
timeoutMs
public int timeoutMs()Returns the value of thetimeoutMsrecord component.- Returns:
- the value of the
timeoutMsrecord component
-
streaming
public boolean streaming()Returns the value of thestreamingrecord component.- Returns:
- the value of the
streamingrecord component
-