public class LLM extends BusinessDomainObject
Business domain object (BDO) representing a configured Large Language Model (LLM).

Wraps observable JavaFX properties for name, API provider, model identifier, API key, and temperature bounds. Versioning is inherited from BusinessDomainObject and updated automatically when observed properties change.

A lazily created Promptable instance can be obtained from the configured PromptableApi using PromptableFactory.

Since:
1.0
Author:
Felix Seggebäing
  • Property Details

  • Constructor Details

    • LLM

      public LLM()
      Creates a new LLM instance with default values.

      Initializes all string fields as empty, the API as null, temperatures as 0 and 1, and the version as null.

    • LLM

      public LLM(String name, PromptableApi promptableApi, String model, String apiKey, double minTemperature, double maxTemperature)
      Creates a new LLM instance with the given configuration.

      Sets the version to null, causing it to be initialized automatically.

      Parameters:
      name - non-null name of the LLM
      promptableApi - non-null API provider
      model - non-null model identifier
      apiKey - non-null API key
      minTemperature - minimum temperature value
      maxTemperature - maximum temperature value
      Throws:
      NullPointerException - if any string or promptableApi is null
    • LLM

      public LLM(String name, PromptableApi promptableApi, String model, String apiKey, double minTemperature, double maxTemperature, Long version)
      Creates a new LLM instance with the given configuration.

      Initializes all fields and registers property listeners so that changes automatically update the version. If version is null, the version is initialized to the current time.

      Parameters:
      name - non-null name of the LLM
      promptableApi - non-null API provider
      model - non-null model identifier
      apiKey - non-null API key
      minTemperature - minimum temperature value
      maxTemperature - maximum temperature value
      version - initial version value, or null for auto-generation
      Throws:
      NullPointerException - if name, model, or apiKey is null
  • Method Details

    • toString

      public String toString()
      Returns a human-readable string representation of this LLM.

      Format: name (model).

      Overrides:
      toString in class Object
      Returns:
      string representation of this LLM
    • getName

      public String getName()
      Gets the value of the name property.
      Property description:
      Returns:
      the value of the name property
      See Also:
    • nameProperty

      public javafx.beans.property.StringProperty nameProperty()
      Returns:
      the name property
      See Also:
    • getPromptable

      public Promptable getPromptable()
      Returns the Promptable instance associated with this LLM.

      The instance is created lazily via PromptableFactory using the current getLlmApi() value and cached for subsequent calls.

      Returns:
      the lazily initialized Promptable for this LLM
    • setName

      public void setName(String name)
      Sets the value of the name property.
      Property description:
      Parameters:
      name - the value for the name property
      See Also:
    • setLlmApi

      public void setLlmApi(PromptableApi promptableApi)
      Sets the API provider for this LLM.

      Also resets the cached Promptable instance so it will be recreated on the next call to getPromptable().

      Parameters:
      promptableApi - API provider
    • getLlmApi

      public PromptableApi getLlmApi()
      Gets the value of the llmApi property.
      Property description:
      Returns:
      the value of the llmApi property
      See Also:
    • llmApiProperty

      public javafx.beans.property.ObjectProperty<PromptableApi> llmApiProperty()
      Returns:
      the llmApi property
      See Also:
    • setMinTemperature

      public void setMinTemperature(double minTemperature)
      Sets the value of the minTemperature property.
      Property description:
      Parameters:
      minTemperature - the value for the minTemperature property
      See Also:
    • getMinTemperature

      public double getMinTemperature()
      Gets the value of the minTemperature property.
      Property description:
      Returns:
      the value of the minTemperature property
      See Also:
    • minTemperatureProperty

      public javafx.beans.property.DoubleProperty minTemperatureProperty()
      Returns:
      the minTemperature property
      See Also:
    • setMaxTemperature

      public void setMaxTemperature(double maxTemperature)
      Sets the value of the maxTemperature property.
      Property description:
      Parameters:
      maxTemperature - the value for the maxTemperature property
      See Also:
    • getMaxTemperature

      public double getMaxTemperature()
      Gets the value of the maxTemperature property.
      Property description:
      Returns:
      the value of the maxTemperature property
      See Also:
    • maxTemperatureProperty

      public javafx.beans.property.DoubleProperty maxTemperatureProperty()
      Returns:
      the maxTemperature property
      See Also:
    • setModel

      public void setModel(String model)
      Sets the value of the model property.
      Property description:
      Parameters:
      model - the value for the model property
      See Also:
    • getModel

      public String getModel()
      Gets the value of the model property.
      Property description:
      Returns:
      the value of the model property
      See Also:
    • modelProperty

      public javafx.beans.property.StringProperty modelProperty()
      Returns:
      the model property
      See Also:
    • setApiKey

      public void setApiKey(String model)
      Sets the value of the apiKey property.
      Property description:
      Parameters:
      model - the value for the apiKey property
      See Also:
    • getApiKey

      public String getApiKey()
      Gets the value of the apiKey property.
      Property description:
      Returns:
      the value of the apiKey property
      See Also:
    • apiKeyProperty

      public javafx.beans.property.StringProperty apiKeyProperty()
      Returns:
      the apiKey property
      See Also: