Interface ChatRequestParameters
-
- All Implemented Interfaces:
public interface ChatRequestParametersRepresents common chat request parameters supported by most LLM providers. Specific LLM provider integrations can extend this interface to add provider-specific parameters.
-
-
Method Summary
Modifier and Type Method Description abstract StringmodelName()abstract Doubletemperature()abstract DoubletopP()abstract IntegertopK()abstract DoublefrequencyPenalty()abstract DoublepresencePenalty()abstract IntegermaxOutputTokens()abstract List<String>stopSequences()abstract List<ToolSpecification>toolSpecifications()abstract ToolChoicetoolChoice()abstract ResponseFormatresponseFormat()static DefaultChatRequestParameters.Builder<out Object>builder()abstract ChatRequestParametersoverrideWith(ChatRequestParameters parameters)Creates a new ChatRequestParameters by combining the current parameters with the specified ones. -
-
Method Detail
-
temperature
abstract Double temperature()
-
frequencyPenalty
abstract Double frequencyPenalty()
-
presencePenalty
abstract Double presencePenalty()
-
maxOutputTokens
abstract Integer maxOutputTokens()
-
stopSequences
abstract List<String> stopSequences()
-
toolSpecifications
abstract List<ToolSpecification> toolSpecifications()
-
toolChoice
abstract ToolChoice toolChoice()
-
responseFormat
abstract ResponseFormat responseFormat()
-
builder
static DefaultChatRequestParameters.Builder<out Object> builder()
-
overrideWith
abstract ChatRequestParameters overrideWith(ChatRequestParameters parameters)
Creates a new ChatRequestParameters by combining the current parameters with the specified ones. Values from the specified parameters override values from the current parameters when there is overlap. Neither the current nor the specified ChatRequestParameters objects are modified.
Example:
Current parameters: temperature = 1.0 maxOutputTokens = 100 Specified parameters: temperature = 0.5 modelName = my-model Result: temperature = 0.5 // Overridden from specified maxOutputTokens = 100 // Preserved from current modelName = my-model // Added from specified- Parameters:
parameters- the parameters whose values will override the current ones- Returns:
a new ChatRequestParameters instance combining both sets of parameters
-
-
-
-