Class DefaultChatOptions

java.lang.Object
org.springframework.ai.chat.prompt.DefaultChatOptions
All Implemented Interfaces:
ChatOptions, ModelOptions
Direct Known Subclasses:
DefaultStructuredOutputChatOptions, DefaultToolCallingChatOptions

public class DefaultChatOptions extends Object implements ChatOptions
Default implementation for the ChatOptions.
  • Constructor Details

    • DefaultChatOptions

      protected DefaultChatOptions(@Nullable String model, @Nullable Double frequencyPenalty, @Nullable Integer maxTokens, @Nullable Double presencePenalty, @Nullable List<String> stopSequences, @Nullable Double temperature, @Nullable Integer topK, @Nullable Double topP)
  • Method Details

    • getModel

      public @Nullable 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 @Nullable 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
    • getMaxTokens

      public @Nullable 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
    • getPresencePenalty

      public @Nullable 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
    • getStopSequences

      public @Nullable 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
    • getTemperature

      public @Nullable 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
    • getTopK

      public @Nullable 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
    • getTopP

      public @Nullable 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
    • mutate

      public ChatOptions.Builder<?> mutate()
      Description copied from interface: ChatOptions
      Returns a new ChatOptions.Builder initialized with the values of this ChatOptions. Concrete ChatOptions classes must implement this and return the most concrete builder implementation.
      Specified by:
      mutate in interface ChatOptions
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object