Package com.aispect.core.client.config
Record Class AiClientConfig
java.lang.Object
java.lang.Record
com.aispect.core.client.config.AiClientConfig
- Record Components:
apiKey- access AI Interface authentication keyendpoint- AI The interface address of the service (Base URL or complete Endpoint)modelName- The model name expected to be used in this call (such as gpt-4o, llama3)temperature- Sampling temperature value to control the randomness of generated results (the larger the value, the more random it is)maxTokens- The maximum allowed model generation for this request is Token quantity
public record AiClientConfig(String endpoint, String apiKey, String modelName, Double temperature, Integer maxTokens)
extends Record
AI Client configuration parameter entity.
Encapsulated when initiating a single AI Key parameters required when requesting. These parameters can be used to override the global configuration, thereby providing different Agent Agents or methods provide customized model experiences.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapiKey()Returns the value of theapiKeyrecord component.endpoint()Returns the value of theendpointrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxTokensrecord component.Returns the value of themodelNamerecord component.Returns the value of thetemperaturerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AiClientConfig
public AiClientConfig(String endpoint, String apiKey, String modelName, Double temperature, Integer maxTokens) Creates an instance of aAiClientConfigrecord class.- Parameters:
endpoint- the value for theendpointrecord componentapiKey- the value for theapiKeyrecord componentmodelName- the value for themodelNamerecord componenttemperature- the value for thetemperaturerecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
endpoint
Returns the value of theendpointrecord component.- Returns:
- the value of the
endpointrecord component
-
apiKey
Returns the value of theapiKeyrecord component.- Returns:
- the value of the
apiKeyrecord component
-
modelName
Returns the value of themodelNamerecord component.- Returns:
- the value of the
modelNamerecord component
-
temperature
Returns the value of thetemperaturerecord component.- Returns:
- the value of the
temperaturerecord component
-
maxTokens
Returns the value of themaxTokensrecord component.- Returns:
- the value of the
maxTokensrecord component
-