Class DefaultChatOptionsBuilder<B extends DefaultChatOptionsBuilder<B>>
java.lang.Object
org.springframework.ai.chat.prompt.DefaultChatOptionsBuilder<B>
- All Implemented Interfaces:
ChatOptions.Builder<B>
- Direct Known Subclasses:
DefaultToolCallingChatOptions.Builder
public class DefaultChatOptionsBuilder<B extends DefaultChatOptionsBuilder<B>>
extends Object
implements ChatOptions.Builder<B>
Implementation of
ChatOptions.Builder to create DefaultChatOptions.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build theChatOptions.combineWith(ChatOptions.Builder<?> other) Mutate this builder by taking allother's values that are non-null, retainingthisother values.frequencyPenalty(@Nullable 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(@Nullable Double presencePenalty) Builds with the presence penalty to use for the chat.protected Bself()stopSequences(@Nullable List<String> stop) Builds with the stop sequences to use for the chat.temperature(@Nullable 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
-
model
-
frequencyPenalty
-
maxTokens
-
presencePenalty
-
stopSequences
-
temperature
-
topK
-
topP
-
-
Constructor Details
-
DefaultChatOptionsBuilder
public DefaultChatOptionsBuilder()
-
-
Method Details
-
self
-
model
Description copied from interface:ChatOptions.BuilderBuilds with the model to use for the chat.- Specified by:
modelin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
model-- Returns:
- the builder
-
frequencyPenalty
Description copied from interface:ChatOptions.BuilderBuilds with the frequency penalty to use for the chat.- Specified by:
frequencyPenaltyin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
frequencyPenalty-- Returns:
- the builder.
-
maxTokens
Description copied from interface:ChatOptions.BuilderBuilds with the maximum number of tokens to use for the chat.- Specified by:
maxTokensin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
maxTokens-- Returns:
- the builder.
-
presencePenalty
Description copied from interface:ChatOptions.BuilderBuilds with the presence penalty to use for the chat.- Specified by:
presencePenaltyin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
presencePenalty-- Returns:
- the builder.
-
stopSequences
Description copied from interface:ChatOptions.BuilderBuilds with the stop sequences to use for the chat.- Specified by:
stopSequencesin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
stop-- Returns:
- the builder.
-
temperature
Description copied from interface:ChatOptions.BuilderBuilds with the temperature to use for the chat.- Specified by:
temperaturein interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
temperature-- Returns:
- the builder.
-
topK
Description copied from interface:ChatOptions.BuilderBuilds with the top K to use for the chat.- Specified by:
topKin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
topK-- Returns:
- the builder.
-
topP
Description copied from interface:ChatOptions.BuilderBuilds with the top P to use for the chat.- Specified by:
topPin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Parameters:
topP-- Returns:
- the builder.
-
combineWith
Description copied from interface:ChatOptions.BuilderMutate this builder by taking allother's values that are non-null, retainingthisother values.- Specified by:
combineWithin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>
-
build
Description copied from interface:ChatOptions.BuilderBuild theChatOptions.- Specified by:
buildin interfaceChatOptions.Builder<B extends DefaultChatOptionsBuilder<B>>- Returns:
- the Chat options.
-