Class AnthropicChatOptions

java.lang.Object
org.springframework.ai.bedrock.anthropic.AnthropicChatOptions
All Implemented Interfaces:
ChatOptions, ModelOptions

public class AnthropicChatOptions extends Object implements ChatOptions
Options for the Anthropic Chat API.
Author:
Christian Tzolov, Thomas Vitale, Ilayaperumal Gopinathan
  • Constructor Details

    • AnthropicChatOptions

      public AnthropicChatOptions()
  • Method Details

    • builder

      public static AnthropicChatOptions.Builder builder()
      Description copied from interface: ChatOptions
      Creates a new ChatOptions.Builder to create the default ChatOptions.
      Returns:
      Returns a new ChatOptions.Builder.
    • fromOptions

      public static AnthropicChatOptions fromOptions(AnthropicChatOptions fromOptions)
    • getTemperature

      public Double getTemperature()
      Description copied from interface: ChatOptions
      Returns the temperature to use for the chat.
      Specified by:
      getTemperature in interface ChatOptions
      Returns:
      the temperature to use for the chat
    • setTemperature

      public void setTemperature(Double temperature)
    • getMaxTokens

      public Integer getMaxTokens()
      Description copied from interface: ChatOptions
      Returns the maximum number of tokens to use for the chat.
      Specified by:
      getMaxTokens in interface ChatOptions
      Returns:
      the maximum number of tokens to use for the chat
    • setMaxTokens

      public void setMaxTokens(Integer maxTokens)
    • getMaxTokensToSample

      public Integer getMaxTokensToSample()
    • setMaxTokensToSample

      public void setMaxTokensToSample(Integer maxTokensToSample)
    • getTopK

      public Integer getTopK()
      Description copied from interface: ChatOptions
      Returns the top K to use for the chat.
      Specified by:
      getTopK in interface ChatOptions
      Returns:
      the top K to use for the chat
    • setTopK

      public void setTopK(Integer topK)
    • getTopP

      public Double getTopP()
      Description copied from interface: ChatOptions
      Returns the top P to use for the chat.
      Specified by:
      getTopP in interface ChatOptions
      Returns:
      the top P to use for the chat
    • setTopP

      public void setTopP(Double topP)
    • getStopSequences

      public List<String> getStopSequences()
      Description copied from interface: ChatOptions
      Returns the stop sequences to use for the chat.
      Specified by:
      getStopSequences in interface ChatOptions
      Returns:
      the stop sequences to use for the chat
    • setStopSequences

      public void setStopSequences(List<String> stopSequences)
    • getAnthropicVersion

      public String getAnthropicVersion()
    • setAnthropicVersion

      public void setAnthropicVersion(String anthropicVersion)
    • getModel

      public String getModel()
      Description copied from interface: ChatOptions
      Returns the model to use for the chat.
      Specified by:
      getModel in interface ChatOptions
      Returns:
      the model to use for the chat
    • getFrequencyPenalty

      public Double getFrequencyPenalty()
      Description copied from interface: ChatOptions
      Returns the frequency penalty to use for the chat.
      Specified by:
      getFrequencyPenalty in interface ChatOptions
      Returns:
      the frequency penalty to use for the chat
    • getPresencePenalty

      public Double getPresencePenalty()
      Description copied from interface: ChatOptions
      Returns the presence penalty to use for the chat.
      Specified by:
      getPresencePenalty in interface ChatOptions
      Returns:
      the presence penalty to use for the chat
    • copy

      public AnthropicChatOptions copy()
      Description copied from interface: ChatOptions
      Returns a copy of this ChatOptions.
      Specified by:
      copy in interface ChatOptions
      Returns:
      a copy of this ChatOptions