Class LanguageModelInput

java.lang.Object
com.intellijava.core.model.input.LanguageModelInput

public class LanguageModelInput extends Object
LanguageModelInput handle the input parameters for the majority of the remote language models. Language models documentations: - Openai : https://beta.openai.com/docs/api-reference/completions. - Cohere : https://docs.cohere.ai/reference/generate
Author:
github.com/Barqawiz
  • Constructor Details

    • LanguageModelInput

      public LanguageModelInput(String model, String prompt, float temperature, int maxTokens, int numberOfOutputs)
      LanguageModelInput default constructor.
      Parameters:
      model - name.
      prompt - text.
      temperature - model creativity between 0 and 1.
      maxTokens - number of input and output tokens.
      numberOfOutputs - number of generated text.
  • Method Details

    • getModel

      public String getModel()
      Gets the model.
      Returns:
      model
    • getPrompt

      public String getPrompt()
      Gets the prompt.
      Returns:
      prompt
    • getTemperature

      public float getTemperature()
      Gets the temperature.
      Returns:
      temperature
    • getMaxTokens

      public int getMaxTokens()
      Gets the maxTokens.
      Returns:
      maxTokens
    • getNumberOfOutputs

      public int getNumberOfOutputs()
      Gets the number of model outputs.
      Returns:
      numberOfOutputs
    • setModel

      public void setModel(String model)
      Sets the model.
      Parameters:
      model -
    • setPrompt

      public void setPrompt(String prompt)
      Sets the prompt.
      Parameters:
      prompt -
    • setTemperature

      public void setTemperature(float temperature)
      Sets the temperature.
      Parameters:
      temperature - higher values means more risks and creativity.
    • setMaxTokens

      public void setMaxTokens(int maxTokens)
      Sets the maxTokens.
      Parameters:
      maxTokens - maximum size of the model input and output.
    • setNumberOfOutputs

      public void setNumberOfOutputs(int numberOfOutputs)
      Sets the numberOfOutputs.
      Parameters:
      numberOfOutputs - number of model outputs, default value is 1.