Package com.intellijava.core.model.input
Class LanguageModelInput.Builder
java.lang.Object
com.intellijava.core.model.input.LanguageModelInput.Builder
- Enclosing class:
LanguageModelInput
Builder class for LanguageModelInput.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the final LanguageModelInput object.setMaxTokens
(int maxTokens) Sets the maxTokens.Sets the model.setNumberOfOutputs
(int numberOfOutputs) Sets the numberOfOutputsSets the prompt.setTemperature
(float temperature) Sets the temperature.
-
Constructor Details
-
Builder
Language input Constructor.- Parameters:
prompt
- text of the required action or the question.
-
-
Method Details
-
setModel
Sets the model.- Parameters:
model
- the model name. The largest OpenAI model is text-davinci-003. The largest cohere model is xlarge.- Returns:
- instance of Builder
-
setPrompt
Sets the prompt.- Parameters:
prompt
- text of the required action or the question.- Returns:
- instance of Builder.
-
setTemperature
Sets the temperature.- Parameters:
temperature
- higher values means more risks and creativity.- Returns:
- instance of Builder.
-
setMaxTokens
Sets the maxTokens.- Parameters:
maxTokens
- maximum size of the model input and output.- Returns:
- instance of Builder
-
setNumberOfOutputs
Sets the numberOfOutputs- Parameters:
numberOfOutputs
- number of model outputs, default value is 1. Cohere maximum value is five.- Returns:
- instance of Builder
-
build
Build the final LanguageModelInput object.- Returns:
- final LanguageModelInput object
-