Record Class AiClientConfig

java.lang.Object
java.lang.Record
com.aispect.core.client.config.AiClientConfig
Record Components:
apiKey - access AI Interface authentication key
endpoint - 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 Details

    • AiClientConfig

      public AiClientConfig(String endpoint, String apiKey, String modelName, Double temperature, Integer maxTokens)
      Creates an instance of a AiClientConfig record class.
      Parameters:
      endpoint - the value for the endpoint record component
      apiKey - the value for the apiKey record component
      modelName - the value for the modelName record component
      temperature - the value for the temperature record component
      maxTokens - the value for the maxTokens record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • endpoint

      public String endpoint()
      Returns the value of the endpoint record component.
      Returns:
      the value of the endpoint record component
    • apiKey

      public String apiKey()
      Returns the value of the apiKey record component.
      Returns:
      the value of the apiKey record component
    • modelName

      public String modelName()
      Returns the value of the modelName record component.
      Returns:
      the value of the modelName record component
    • temperature

      public Double temperature()
      Returns the value of the temperature record component.
      Returns:
      the value of the temperature record component
    • maxTokens

      public Integer maxTokens()
      Returns the value of the maxTokens record component.
      Returns:
      the value of the maxTokens record component