ChatCompletionCommonModelParameters Class
- java.
lang. Object - com.
azure. search. documents. indexes. models. ChatCompletionCommonModelParameters
- com.
Implements
public final class ChatCompletionCommonModelParameters
implements JsonSerializable<ChatCompletionCommonModelParameters>
Common language model parameters for Chat Completions. If omitted, default values are used.
Constructor Summary
| Constructor | Description |
|---|---|
| ChatCompletionCommonModelParameters() |
Creates an instance of Chat |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Chat |
fromJson(JsonReader jsonReader)
Reads an instance of Chat |
| Double |
getFrequencyPenalty()
Get the frequency |
| Integer |
getMaxTokens()
Get the max |
| String |
getModelName()
Get the model |
| Double |
getPresencePenalty()
Get the presence |
| Integer |
getSeed()
Get the seed property: Random seed for controlling deterministic outputs. |
| List<String> |
getStop()
Get the stop property: List of stop sequences that will cut off text generation. |
| Double |
getTemperature()
Get the temperature property: Sampling temperature. |
|
Chat |
setFrequencyPenalty(Double frequencyPenalty)
Set the frequency |
|
Chat |
setMaxTokens(Integer maxTokens)
Set the max |
|
Chat |
setModelName(String modelName)
Set the model |
|
Chat |
setPresencePenalty(Double presencePenalty)
Set the presence |
|
Chat |
setSeed(Integer seed)
Set the seed property: Random seed for controlling deterministic outputs. |
|
Chat |
setStop(List<String> stop)
Set the stop property: List of stop sequences that will cut off text generation. |
|
Chat |
setStop(String[] stop)
Set the stop property: List of stop sequences that will cut off text generation. |
|
Chat |
setTemperature(Double temperature)
Set the temperature property: Sampling temperature. |
|
Json |
toJson(JsonWriter jsonWriter) |
Methods inherited from java.lang.Object
Constructor Details
ChatCompletionCommonModelParameters
public ChatCompletionCommonModelParameters()
Creates an instance of ChatCompletionCommonModelParameters class.
Method Details
fromJson
public static ChatCompletionCommonModelParameters fromJson(JsonReader jsonReader)
Reads an instance of ChatCompletionCommonModelParameters from the JsonReader.
Parameters:
Returns:
Throws:
getFrequencyPenalty
public Double getFrequencyPenalty()
Get the frequencyPenalty property: A float in the range [-2,2] that reduces or increases likelihood of repeated tokens. Default is 0.
Returns:
getMaxTokens
public Integer getMaxTokens()
Get the maxTokens property: Maximum number of tokens to generate.
Returns:
getModelName
public String getModelName()
Get the modelName property: The name of the model to use (e.g., 'gpt-4o', etc.). Default is null if not specified.
Returns:
getPresencePenalty
public Double getPresencePenalty()
Get the presencePenalty property: A float in the range [-2,2] that penalizes new tokens based on their existing presence. Default is 0.
Returns:
getSeed
public Integer getSeed()
Get the seed property: Random seed for controlling deterministic outputs. If omitted, randomization is used.
Returns:
getStop
public List<String> getStop()
Get the stop property: List of stop sequences that will cut off text generation. Default is none.
Returns:
getTemperature
public Double getTemperature()
Get the temperature property: Sampling temperature. Default is 0.7.
Returns:
setFrequencyPenalty
public ChatCompletionCommonModelParameters setFrequencyPenalty(Double frequencyPenalty)
Set the frequencyPenalty property: A float in the range [-2,2] that reduces or increases likelihood of repeated tokens. Default is 0.
Parameters:
Returns:
setMaxTokens
public ChatCompletionCommonModelParameters setMaxTokens(Integer maxTokens)
Set the maxTokens property: Maximum number of tokens to generate.
Parameters:
Returns:
setModelName
public ChatCompletionCommonModelParameters setModelName(String modelName)
Set the modelName property: The name of the model to use (e.g., 'gpt-4o', etc.). Default is null if not specified.
Parameters:
Returns:
setPresencePenalty
public ChatCompletionCommonModelParameters setPresencePenalty(Double presencePenalty)
Set the presencePenalty property: A float in the range [-2,2] that penalizes new tokens based on their existing presence. Default is 0.
Parameters:
Returns:
setSeed
public ChatCompletionCommonModelParameters setSeed(Integer seed)
Set the seed property: Random seed for controlling deterministic outputs. If omitted, randomization is used.
Parameters:
Returns:
setStop
public ChatCompletionCommonModelParameters setStop(List<String> stop)
Set the stop property: List of stop sequences that will cut off text generation. Default is none.
Parameters:
Returns:
setStop
public ChatCompletionCommonModelParameters setStop(String[] stop)
Set the stop property: List of stop sequences that will cut off text generation. Default is none.
Parameters:
Returns:
setTemperature
public ChatCompletionCommonModelParameters setTemperature(Double temperature)
Set the temperature property: Sampling temperature. Default is 0.7.
Parameters:
Returns: