Class BedrockCohereChatOptions
java.lang.Object
org.springframework.ai.bedrock.cohere.BedrockCohereChatOptions
- All Implemented Interfaces:
ChatOptions
,ModelOptions
Options for the Bedrock Cohere chat API.
- Since:
- 0.8.0
- Author:
- Christian Tzolov, Thomas Vitale, Ilayaperumal Gopinathan
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a newChatOptions.Builder
to create the defaultChatOptions
.copy()
Returns a copy of thisChatOptions
.static BedrockCohereChatOptions
fromOptions
(BedrockCohereChatOptions fromOptions) Returns the frequency penalty to use for the chat.Returns the maximum number of tokens to use for the chat.getModel()
Returns the model to use for the chat.Returns the presence penalty to use for the chat.Returns the stop sequences to use for the chat.Returns the temperature to use for the chat.getTopK()
Returns the top K to use for the chat.getTopP()
Returns the top P to use for the chat.void
void
setMaxTokens
(Integer maxTokens) void
setNumGenerations
(Integer numGenerations) void
setReturnLikelihoods
(CohereChatBedrockApi.CohereChatRequest.ReturnLikelihoods returnLikelihoods) void
setStopSequences
(List<String> stopSequences) void
setTemperature
(Double temperature) void
void
void
-
Constructor Details
-
BedrockCohereChatOptions
public BedrockCohereChatOptions()
-
-
Method Details
-
builder
Description copied from interface:ChatOptions
Creates a newChatOptions.Builder
to create the defaultChatOptions
.- Returns:
- Returns a new
ChatOptions.Builder
.
-
fromOptions
-
getTemperature
Description copied from interface:ChatOptions
Returns the temperature to use for the chat.- Specified by:
getTemperature
in interfaceChatOptions
- Returns:
- the temperature to use for the chat
-
setTemperature
-
getTopP
Description copied from interface:ChatOptions
Returns the top P to use for the chat.- Specified by:
getTopP
in interfaceChatOptions
- Returns:
- the top P to use for the chat
-
setTopP
-
getTopK
Description copied from interface:ChatOptions
Returns the top K to use for the chat.- Specified by:
getTopK
in interfaceChatOptions
- Returns:
- the top K to use for the chat
-
setTopK
-
getMaxTokens
Description copied from interface:ChatOptions
Returns the maximum number of tokens to use for the chat.- Specified by:
getMaxTokens
in interfaceChatOptions
- Returns:
- the maximum number of tokens to use for the chat
-
setMaxTokens
-
getStopSequences
Description copied from interface:ChatOptions
Returns the stop sequences to use for the chat.- Specified by:
getStopSequences
in interfaceChatOptions
- Returns:
- the stop sequences to use for the chat
-
setStopSequences
-
getReturnLikelihoods
-
setReturnLikelihoods
public void setReturnLikelihoods(CohereChatBedrockApi.CohereChatRequest.ReturnLikelihoods returnLikelihoods) -
getNumGenerations
-
setNumGenerations
-
getLogitBias
-
setLogitBias
-
getTruncate
-
setTruncate
-
getModel
Description copied from interface:ChatOptions
Returns the model to use for the chat.- Specified by:
getModel
in interfaceChatOptions
- Returns:
- the model to use for the chat
-
getFrequencyPenalty
Description copied from interface:ChatOptions
Returns the frequency penalty to use for the chat.- Specified by:
getFrequencyPenalty
in interfaceChatOptions
- Returns:
- the frequency penalty to use for the chat
-
getPresencePenalty
Description copied from interface:ChatOptions
Returns the presence penalty to use for the chat.- Specified by:
getPresencePenalty
in interfaceChatOptions
- Returns:
- the presence penalty to use for the chat
-
copy
Description copied from interface:ChatOptions
Returns a copy of thisChatOptions
.- Specified by:
copy
in interfaceChatOptions
- Returns:
- a copy of this
ChatOptions
-