Class GoogleGenAiChatOptions

java.lang.Object
org.springframework.ai.google.genai.GoogleGenAiChatOptions
All Implemented Interfaces:
org.springframework.ai.chat.prompt.ChatOptions, org.springframework.ai.model.ModelOptions, org.springframework.ai.model.tool.StructuredOutputChatOptions, org.springframework.ai.model.tool.ToolCallingChatOptions

public class GoogleGenAiChatOptions extends Object implements org.springframework.ai.model.tool.ToolCallingChatOptions, org.springframework.ai.model.tool.StructuredOutputChatOptions
Options for the Google GenAI Chat API.
Since:
1.0.0
Author:
Christian Tzolov, Thomas Vitale, Grogdunn, Ilayaperumal Gopinathan, Soby Chacko, Dan Dobrin, Sebastien Deleuze
  • Constructor Details

  • Method Details

    • builder

      public static GoogleGenAiChatOptions.Builder builder()
    • getStopSequences

      public @Nullable List<String> getStopSequences()
      Specified by:
      getStopSequences in interface org.springframework.ai.chat.prompt.ChatOptions
    • getTemperature

      public Double getTemperature()
      Specified by:
      getTemperature in interface org.springframework.ai.chat.prompt.ChatOptions
    • getTopP

      public Double getTopP()
      Specified by:
      getTopP in interface org.springframework.ai.chat.prompt.ChatOptions
    • getTopK

      public @Nullable Integer getTopK()
      Specified by:
      getTopK in interface org.springframework.ai.chat.prompt.ChatOptions
    • getToolChoice

      public @Nullable GoogleGenAiChatOptions.ToolChoice getToolChoice()
      Returns the tool choice configuration.
      Returns:
      the tool choice, or null if not set
      Since:
      2.0.1
    • getCandidateCount

      public @Nullable Integer getCandidateCount()
    • getMaxTokens

      public @Nullable Integer getMaxTokens()
      Specified by:
      getMaxTokens in interface org.springframework.ai.chat.prompt.ChatOptions
    • getMaxOutputTokens

      public @Nullable Integer getMaxOutputTokens()
    • getModel

      public String getModel()
      Specified by:
      getModel in interface org.springframework.ai.chat.prompt.ChatOptions
    • getResponseMimeType

      public @Nullable String getResponseMimeType()
    • getResponseSchema

      public @Nullable String getResponseSchema()
    • getToolCallbacks

      public @Nullable List<org.springframework.ai.tool.ToolCallback> getToolCallbacks()
      Specified by:
      getToolCallbacks in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • getFrequencyPenalty

      public @Nullable Double getFrequencyPenalty()
      Specified by:
      getFrequencyPenalty in interface org.springframework.ai.chat.prompt.ChatOptions
    • getPresencePenalty

      public @Nullable Double getPresencePenalty()
      Specified by:
      getPresencePenalty in interface org.springframework.ai.chat.prompt.ChatOptions
    • getThinkingBudget

      public @Nullable Integer getThinkingBudget()
    • getIncludeThoughts

      public @Nullable Boolean getIncludeThoughts()
    • getThinkingLevel

      public @Nullable GoogleGenAiThinkingLevel getThinkingLevel()
    • getIncludeExtendedUsageMetadata

      public @Nullable Boolean getIncludeExtendedUsageMetadata()
    • getCachedContentName

      public @Nullable String getCachedContentName()
    • getUseCachedContent

      public @Nullable Boolean getUseCachedContent()
    • getAutoCacheThreshold

      public @Nullable Integer getAutoCacheThreshold()
    • getAutoCacheTtl

      public @Nullable Duration getAutoCacheTtl()
    • getGoogleSearchRetrieval

      public @Nullable Boolean getGoogleSearchRetrieval()
    • getIncludeServerSideToolInvocations

      public @Nullable Boolean getIncludeServerSideToolInvocations()
    • getSafetySettings

      public @Nullable List<GoogleGenAiSafetySetting> getSafetySettings()
    • getLabels

      public @Nullable Map<String,String> getLabels()
    • getServiceTier

      public @Nullable GoogleGenAiServiceTier getServiceTier()
      Since:
      2.0.0
    • getToolContext

      public @Nullable Map<String,Object> getToolContext()
      Specified by:
      getToolContext in interface org.springframework.ai.model.tool.ToolCallingChatOptions
    • getOutputSchema

      public @Nullable String getOutputSchema()
      Specified by:
      getOutputSchema in interface org.springframework.ai.model.tool.StructuredOutputChatOptions
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object
    • mutate

      Specified by:
      mutate in interface org.springframework.ai.chat.prompt.ChatOptions
      Specified by:
      mutate in interface org.springframework.ai.model.tool.StructuredOutputChatOptions
      Specified by:
      mutate in interface org.springframework.ai.model.tool.ToolCallingChatOptions