Class BedrockAi21Jurassic2ChatOptions

java.lang.Object
org.springframework.ai.bedrock.jurassic2.BedrockAi21Jurassic2ChatOptions
All Implemented Interfaces:
ChatOptions, ModelOptions

public class BedrockAi21Jurassic2ChatOptions extends Object implements ChatOptions
Request body for the /complete endpoint of the Jurassic-2 API.
Since:
1.0.0
Author:
Ahmed Yousri, Thomas Vitale
  • Constructor Details

    • BedrockAi21Jurassic2ChatOptions

      public BedrockAi21Jurassic2ChatOptions()
  • Method Details

    • builder

      public static BedrockAi21Jurassic2ChatOptions.Builder builder()
    • fromOptions

      public static BedrockAi21Jurassic2ChatOptions fromOptions(BedrockAi21Jurassic2ChatOptions fromOptions)
    • getPrompt

      public String getPrompt()
      Gets the prompt text for the model to continue.
      Returns:
      The prompt text.
    • setPrompt

      public void setPrompt(String prompt)
      Sets the prompt text for the model to continue.
      Parameters:
      prompt - The prompt text.
    • getNumResults

      public Integer getNumResults()
      Gets the number of completions to sample and return.
      Returns:
      The number of results.
    • setNumResults

      public void setNumResults(Integer numResults)
      Sets the number of completions to sample and return.
      Parameters:
      numResults - The number of results.
    • getMaxTokens

      public Integer getMaxTokens()
      Gets the maximum number of tokens to generate per result.
      Specified by:
      getMaxTokens in interface ChatOptions
      Returns:
      The maximum number of tokens.
    • setMaxTokens

      public void setMaxTokens(Integer maxTokens)
      Sets the maximum number of tokens to generate per result.
      Parameters:
      maxTokens - The maximum number of tokens.
    • getMinTokens

      public Integer getMinTokens()
      Gets the minimum number of tokens to generate per result.
      Returns:
      The minimum number of tokens.
    • setMinTokens

      public void setMinTokens(Integer minTokens)
      Sets the minimum number of tokens to generate per result.
      Parameters:
      minTokens - The minimum number of tokens.
    • getTemperature

      public Double getTemperature()
      Gets the temperature for modifying the token sampling distribution.
      Specified by:
      getTemperature in interface ChatOptions
      Returns:
      The temperature.
    • setTemperature

      public void setTemperature(Double temperature)
      Sets the temperature for modifying the token sampling distribution.
      Parameters:
      temperature - The temperature.
    • getTopP

      public Double getTopP()
      Gets the topP parameter for sampling tokens from the top percentile of probability mass.
      Specified by:
      getTopP in interface ChatOptions
      Returns:
      The topP parameter.
    • setTopP

      public void setTopP(Double topP)
      Sets the topP parameter for sampling tokens from the top percentile of probability mass.
      Parameters:
      topP - The topP parameter.
    • getTopK

      public Integer getTopK()
      Gets the top-K (topKReturn) alternative tokens to return.
      Specified by:
      getTopK in interface ChatOptions
      Returns:
      The top-K parameter. (topKReturn)
    • setTopK

      public void setTopK(Integer topK)
      Sets the top-K (topKReturn) alternative tokens to return.
      Parameters:
      topK - The top-K parameter (topKReturn).
    • getStopSequences

      public List<String> getStopSequences()
      Gets the stop sequences for stopping decoding if any of the strings is generated.
      Specified by:
      getStopSequences in interface ChatOptions
      Returns:
      The stop sequences.
    • setStopSequences

      public void setStopSequences(List<String> stopSequences)
      Sets the stop sequences for stopping decoding if any of the strings is generated.
      Parameters:
      stopSequences - The stop sequences.
    • 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
    • setFrequencyPenalty

      public void setFrequencyPenalty(Double frequencyPenalty)
    • getFrequencyPenaltyOptions

      public BedrockAi21Jurassic2ChatOptions.Penalty getFrequencyPenaltyOptions()
      Gets the frequency penalty object.
      Returns:
      The frequency penalty object.
    • setFrequencyPenaltyOptions

      public void setFrequencyPenaltyOptions(BedrockAi21Jurassic2ChatOptions.Penalty frequencyPenaltyOptions)
      Sets the frequency penalty object.
      Parameters:
      frequencyPenaltyOptions - The frequency penalty object.
    • 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
    • setPresencePenalty

      public void setPresencePenalty(Double presencePenalty)
    • getPresencePenaltyOptions

      public BedrockAi21Jurassic2ChatOptions.Penalty getPresencePenaltyOptions()
      Gets the presence penalty object.
      Returns:
      The presence penalty object.
    • setPresencePenaltyOptions

      public void setPresencePenaltyOptions(BedrockAi21Jurassic2ChatOptions.Penalty presencePenaltyOptions)
      Sets the presence penalty object.
      Parameters:
      presencePenaltyOptions - The presence penalty object.
    • getCountPenaltyOptions

      public BedrockAi21Jurassic2ChatOptions.Penalty getCountPenaltyOptions()
      Gets the count penalty object.
      Returns:
      The count penalty object.
    • setCountPenaltyOptions

      public void setCountPenaltyOptions(BedrockAi21Jurassic2ChatOptions.Penalty countPenaltyOptions)
      Sets the count penalty object.
      Parameters:
      countPenaltyOptions - The count penalty object.
    • 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
    • copy

      Description copied from interface: ChatOptions
      Returns a copy of this ChatOptions.
      Specified by:
      copy in interface ChatOptions
      Returns:
      a copy of this ChatOptions