public class BoxAIAgentLLMEndpointParamsOpenAI extends BoxAIAgentLLMEndpointParams
Modifier and Type | Field and Description |
---|---|
static String |
TYPE
The type of the LLM endpoint parameters.
|
Constructor and Description |
---|
BoxAIAgentLLMEndpointParamsOpenAI(Double frequencyPenalty,
Double presencePenalty,
String stop,
Double temperature,
Double topP)
Constructs an AI agent with default settings.
|
BoxAIAgentLLMEndpointParamsOpenAI(JsonObject jsonObject)
Constructs an AI agent with default settings.
|
Modifier and Type | Method and Description |
---|---|
Double |
getFrequencyPenalty()
Gets the frequency penalty.
|
JsonObject |
getJSONObject() |
Double |
getPresencePenalty()
Gets the presence penalty.
|
String |
getStop()
Gets the stop.
|
Double |
getTemperature()
Gets the temperature.
|
Double |
getTopP()
Gets the top-P.
|
void |
setFrequencyPenalty(Double frequencyPenalty)
Sets the frequency penalty.
|
void |
setPresencePenalty(Double presencePenalty)
Sets the presence penalty.
|
void |
setStop(String stop)
Sets the stop.
|
void |
setTemperature(Double temperature)
Sets the temperature.
|
void |
setTopP(Double topP)
Sets the top-P.
|
getType, parse, setType
clearPendingChanges, getJson, getPendingChanges, getPendingChangesAsJsonObject, getPendingJSONObject
public static final String TYPE
public BoxAIAgentLLMEndpointParamsOpenAI(Double frequencyPenalty, Double presencePenalty, String stop, Double temperature, Double topP)
frequencyPenalty
- Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text
so far, decreasing the model's likelihood to repeat the same line verbatim.presencePenalty
- Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far,
increasing the model's likelihood to talk about new topics.stop
- Up to 4 sequences where the API will stop generating further tokens.temperature
- What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
while lower values like 0.2 will make it more focused and deterministic.
We generally recommend altering this or top_p but not both.topP
- An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of
the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass
are considered. We generally recommend altering this or temperature but not both.public BoxAIAgentLLMEndpointParamsOpenAI(JsonObject jsonObject)
jsonObject
- JSON object representing the AI agent.public Double getFrequencyPenalty()
public void setFrequencyPenalty(Double frequencyPenalty)
frequencyPenalty
- The frequency penalty.public Double getPresencePenalty()
public void setPresencePenalty(Double presencePenalty)
presencePenalty
- The presence penalty.public Double getTemperature()
public void setTemperature(Double temperature)
temperature
- The temperature.public JsonObject getJSONObject()
getJSONObject
in class BoxAIAgentLLMEndpointParams