Class DefaultChatOptionsBuilder
java.lang.Object
org.springframework.ai.chat.prompt.DefaultChatOptionsBuilder
- All Implemented Interfaces:
ChatOptions.Builder
Implementation of
ChatOptions.Builder
to create DefaultChatOptions
.-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build theChatOptions
.frequencyPenalty
(Double frequencyPenalty) Builds with the frequency penalty to use for the chat.Builds with the maximum number of tokens to use for the chat.Builds with the model to use for the chat.presencePenalty
(Double presencePenalty) Builds with the presence penalty to use for the chat.stopSequences
(List<String> stop) Builds with the stop sequences to use for the chat.temperature
(Double temperature) Builds with the temperature to use for the chat.Builds with the top K to use for the chat.Builds with the top P to use for the chat.
-
Field Details
-
options
-
-
Constructor Details
-
DefaultChatOptionsBuilder
public DefaultChatOptionsBuilder() -
DefaultChatOptionsBuilder
-
-
Method Details
-
model
Description copied from interface:ChatOptions.Builder
Builds with the model to use for the chat.- Specified by:
model
in interfaceChatOptions.Builder
- Returns:
- the builder
-
frequencyPenalty
Description copied from interface:ChatOptions.Builder
Builds with the frequency penalty to use for the chat.- Specified by:
frequencyPenalty
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
maxTokens
Description copied from interface:ChatOptions.Builder
Builds with the maximum number of tokens to use for the chat.- Specified by:
maxTokens
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
presencePenalty
Description copied from interface:ChatOptions.Builder
Builds with the presence penalty to use for the chat.- Specified by:
presencePenalty
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
stopSequences
Description copied from interface:ChatOptions.Builder
Builds with the stop sequences to use for the chat.- Specified by:
stopSequences
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
temperature
Description copied from interface:ChatOptions.Builder
Builds with the temperature to use for the chat.- Specified by:
temperature
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
topK
Description copied from interface:ChatOptions.Builder
Builds with the top K to use for the chat.- Specified by:
topK
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
topP
Description copied from interface:ChatOptions.Builder
Builds with the top P to use for the chat.- Specified by:
topP
in interfaceChatOptions.Builder
- Returns:
- the builder.
-
build
Description copied from interface:ChatOptions.Builder
Build theChatOptions
.- Specified by:
build
in interfaceChatOptions.Builder
- Returns:
- the Chat options.
-