Class BBjAdminAIConfig.OpenAI

java.lang.Object
com.basis.api.admin.BBjAdminAIConfig.OpenAI
All Implemented Interfaces:
Serializable
Enclosing class:
BBjAdminAIConfig

public static class BBjAdminAIConfig.OpenAI extends Object implements Serializable
Configuration for the OpenAI provider (ChatGPT).
See Also:
  • Constructor Details

    • OpenAI

      public OpenAI()
  • Method Details

    • getApiKey

      public String getApiKey()
      OpenAI API key. Encrypted when saved to disk.
    • setApiKey

      public void setApiKey(String apiKey)
    • getModels

      public List<String> getModels()
      Model identifiers configured for this provider, e.g. gpt-4o or gpt-4o-mini. At least one entry is always present.
    • setModels

      public void setModels(List<String> models)
    • addModel

      public void addModel(String model)
      Adds model to the configured list if not already present.
    • removeModel

      public void removeModel(String model)
      Removes model from the configured list. A provider must always have at least one model, so the last remaining entry cannot be removed. If the removed model was the default, the first remaining model becomes the new default.
    • getDefaultModel

      public String getDefaultModel()
      Which entry in getModels() is used when a call does not request a specific model.
    • setDefaultModel

      public void setDefaultModel(String defaultModel)
      Sets the default model, adding it to getModels() first if necessary.
    • getModelName

      @Deprecated public String getModelName()
      Deprecated.
    • setModelName

      @Deprecated public void setModelName(String modelName)
      Deprecated.
    • getBaseUrl

      public String getBaseUrl()
      Optional base-URL override. Leave null to use the public OpenAI endpoint. Useful for proxies or Azure OpenAI.
    • setBaseUrl

      public void setBaseUrl(String baseUrl)
    • getTimeoutSeconds

      public int getTimeoutSeconds()
      HTTP request timeout in seconds (default 60).
    • setTimeoutSeconds

      public void setTimeoutSeconds(int timeoutSeconds)
    • getMaxTokens

      public int getMaxTokens()
      Maximum tokens to generate (0 = model default).
    • setMaxTokens

      public void setMaxTokens(int maxTokens)
    • getTemperature

      public double getTemperature()
      Sampling temperature 0.0–1.0 (default 0.1 for deterministic SQL).
    • setTemperature

      public void setTemperature(double temperature)