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

    Constructors
    Constructor
    Description
    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 a LLMExportSpec record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the apiKeyEnv record component.
    Returns the value of the baseUrl record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    float
    Returns the value of the frequencyPenalty record component.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the maxTokens record component.
    Returns the value of the model record component.
    float
    Returns the value of the presencePenalty record component.
    Returns the value of the provider record component.
     
    boolean
    Returns the value of the streaming record component.
    float
    Returns the value of the temperature record component.
    int
    Returns the value of the timeoutMs record component.
    float
    Returns the value of the topP record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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 a LLMExportSpec record class.
      Parameters:
      provider - the value for the provider record component
      model - the value for the model record component
      temperature - the value for the temperature record component
      maxTokens - the value for the maxTokens record component
      topP - the value for the topP record component
      frequencyPenalty - the value for the frequencyPenalty record component
      presencePenalty - the value for the presencePenalty record component
      apiKeyEnv - the value for the apiKeyEnv record component
      baseUrl - the value for the baseUrl record component
      timeoutMs - the value for the timeoutMs record component
      streaming - the value for the streaming record component
  • Method Details

    • resolveApiKeyEnv

      public String resolveApiKeyEnv()
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • provider

      public String provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • model

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

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

      public int maxTokens()
      Returns the value of the maxTokens record component.
      Returns:
      the value of the maxTokens record component
    • topP

      public float topP()
      Returns the value of the topP record component.
      Returns:
      the value of the topP record component
    • frequencyPenalty

      public float frequencyPenalty()
      Returns the value of the frequencyPenalty record component.
      Returns:
      the value of the frequencyPenalty record component
    • presencePenalty

      public float presencePenalty()
      Returns the value of the presencePenalty record component.
      Returns:
      the value of the presencePenalty record component
    • apiKeyEnv

      public String apiKeyEnv()
      Returns the value of the apiKeyEnv record component.
      Returns:
      the value of the apiKeyEnv record component
    • baseUrl

      public String baseUrl()
      Returns the value of the baseUrl record component.
      Returns:
      the value of the baseUrl record component
    • timeoutMs

      public int timeoutMs()
      Returns the value of the timeoutMs record component.
      Returns:
      the value of the timeoutMs record component
    • streaming

      public boolean streaming()
      Returns the value of the streaming record component.
      Returns:
      the value of the streaming record component