Package com.tnsai.llm
Record Class LLMClientSettings
java.lang.Object
java.lang.Record
com.tnsai.llm.LLMClientSettings
public record LLMClientSettings(String endpoint, String apiKeyEnv, int timeoutMs, float frequencyPenalty, float presencePenalty)
extends Record
Phase 1 transport / sampling extras from
LLMSpec (TAN-3637).
Defaults match LLMSpec: empty endpoint and apiKeyEnv,
timeoutMs=60000, penalties 0. Non-default values
are honored by OpenAI and Ollama; other providers fail loud.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLLMClientSettings(String endpoint, String apiKeyEnv, int timeoutMs, float frequencyPenalty, float presencePenalty) Creates an instance of aLLMClientSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapiKeyEnvrecord component.static LLMClientSettingsdefaults()endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.floatReturns the value of thefrequencyPenaltyrecord component.static LLMClientSettingsfrom(com.tnsai.annotations.LLMSpec spec) final inthashCode()Returns a hash code value for this object.booleanfloatReturns the value of thepresencePenaltyrecord component.intReturns the value of thetimeoutMsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_TIMEOUT_MS
public static final int DEFAULT_TIMEOUT_MS- See Also:
-
-
Constructor Details
-
LLMClientSettings
public LLMClientSettings(String endpoint, String apiKeyEnv, int timeoutMs, float frequencyPenalty, float presencePenalty) Creates an instance of aLLMClientSettingsrecord class.- Parameters:
endpoint- the value for theendpointrecord componentapiKeyEnv- the value for theapiKeyEnvrecord componenttimeoutMs- the value for thetimeoutMsrecord componentfrequencyPenalty- the value for thefrequencyPenaltyrecord componentpresencePenalty- the value for thepresencePenaltyrecord component
-
-
Method Details
-
defaults
-
from
-
hasNonDefault
public boolean hasNonDefault() -
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 '=='. -
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
apiKeyEnv
Returns the value of theapiKeyEnvrecord component.- Returns:
- the value of the
apiKeyEnvrecord component
-
timeoutMs
public int timeoutMs()Returns the value of thetimeoutMsrecord component.- Returns:
- the value of the
timeoutMsrecord 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
-